Fixed parsing of header field value with no data on the first line (folding).

This commit is contained in:
Vincent Richard 2010-05-14 16:56:20 +00:00
parent 6fb89acf38
commit 13ae80a4c7

View File

@ -146,6 +146,12 @@ ref <headerField> headerField::parseNext(const string& buffer, const string::siz
{
c = buffer[pos];
// Check for folded line
if (c == '\r' && pos + 2 < end && buffer[pos + 1] == '\n' &&
(buffer[pos + 2] == ' ' || buffer[pos + 2] == '\t'))
{
pos += 3;
}
// Check for end of contents
if (c == '\r' && pos + 1 < end && buffer[pos + 1] == '\n')
{