send http headers in original order

This commit is contained in:
orignal 2017-02-04 22:39:54 -05:00
parent 7ae38a71cc
commit 66f3bd186f
6 changed files with 113 additions and 66 deletions

View file

@ -714,9 +714,11 @@ namespace http {
return true;
}
/* method #2: 'Authorization' header sent */
if (req.headers.count("Authorization") > 0) {
auto provided = req.GetHeader ("Authorization");
if (provided.length () > 0)
{
bool result = false;
std::string provided = req.headers.find("Authorization")->second;
std::string expected = user + ":" + pass;
size_t b64_sz = i2p::data::Base64EncodingBufferSize(expected.length()) + 1;
char * b64_creds = new char[b64_sz];