Commit 04a8293c authored by Nils Goroll's avatar Nils Goroll

Fix boolean logic in http_GetHdrToken

For quoted tokens, http_GetHdrToken should not try a case insensitive match
if the sensitive match fails
parent 181fed08
...@@ -443,8 +443,9 @@ http_GetHdrToken(const struct http *hp, const char *hdr, ...@@ -443,8 +443,9 @@ http_GetHdrToken(const struct http *hp, const char *hdr,
} }
/* Check for substrings before memcmp() */ /* Check for substrings before memcmp() */
if ((h + fl == e || vct_issepctl(h[fl])) && if ((h + fl == e || vct_issepctl(h[fl])) &&
((quoted && !memcmp(h, token, fl)) || (quoted
!strncasecmp(h, token, fl))) { ? !memcmp(h, token, fl)
: !strncasecmp(h, token, fl))) {
if (ptr != NULL) { if (ptr != NULL) {
h += fl; h += fl;
while (vct_islws(*h)) while (vct_islws(*h))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment