From d5a705a45ee747f1a70b8e6f451f3501ab420103 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 16 May 2016 18:15:29 +0300 Subject: [PATCH] Fix header name normalization logic If the name begins with a hyphen, the following letter shall be uppercased. --- source/http/message.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/http/message.cpp b/source/http/message.cpp index 92321e8..b86f954 100644 --- a/source/http/message.cpp +++ b/source/http/message.cpp @@ -135,13 +135,13 @@ string Message::normalize_header_name(const string &hdr) const bool upper = true; for(string::iterator i=result.begin(); i!=result.end(); ++i) { - if(upper) + if(*i=='-') + upper = true; + else if(upper) { *i = toupper(*i); upper = false; } - else if(*i=='-') - upper = true; else *i = tolower(*i); } -- 2.45.2