Accept-Encoding: gzip, deflate is getting parsed also when it's the last
header.
This commit is contained in:
parent
8343703115
commit
fed4a83a8f
@ -156,6 +156,14 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case header_line_start:
|
case header_line_start:
|
||||||
|
if(header.name == "Accept-Encoding") {
|
||||||
|
/* giving gzip precedence over deflate */
|
||||||
|
if(header.value.find("deflate") != std::string::npos)
|
||||||
|
*compressionType = deflateRFC1951;
|
||||||
|
if(header.value.find("gzip") != std::string::npos)
|
||||||
|
*compressionType = gzipRFC1952;
|
||||||
|
}
|
||||||
|
|
||||||
if (input == '\r') {
|
if (input == '\r') {
|
||||||
state_ = expecting_newline_3;
|
state_ = expecting_newline_3;
|
||||||
return boost::indeterminate;
|
return boost::indeterminate;
|
||||||
@ -163,13 +171,6 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
state_ = header_name;
|
state_ = header_name;
|
||||||
if(header.name == "Accept-Encoding") {
|
|
||||||
/* giving gzip precedence over deflate */
|
|
||||||
if(header.value.find("deflate") != std::string::npos)
|
|
||||||
*compressionType = deflateRFC1951;
|
|
||||||
if(header.value.find("gzip") != std::string::npos)
|
|
||||||
*compressionType = gzipRFC1952;
|
|
||||||
}
|
|
||||||
header.Clear();
|
header.Clear();
|
||||||
header.name.push_back(input);
|
header.name.push_back(input);
|
||||||
return boost::indeterminate;
|
return boost::indeterminate;
|
||||||
|
Loading…
Reference in New Issue
Block a user