mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
@ -10,6 +10,7 @@ Version 58:
|
||||
* basic_parser::put doc
|
||||
* Use static string in basic_fields::reader
|
||||
* Remove redundant code
|
||||
* Fix parsing chunk size with leading zeroes
|
||||
|
||||
API Changes:
|
||||
|
||||
|
@ -267,7 +267,7 @@ protected:
|
||||
break;
|
||||
auto const v0 = v;
|
||||
v = 16 * v + d;
|
||||
if(v <= v0)
|
||||
if(v < v0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -1054,6 +1054,24 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
// https://github.com/vinniefalco/Beast/issues/496
|
||||
void
|
||||
testIssue496()
|
||||
{
|
||||
// The bug affected hex parsing with leading zeroes
|
||||
bufgrind<test_parser<false>>(
|
||||
"HTTP/1.1 200 OK\r\n"
|
||||
"Transfer-Encoding: chunked\r\n"
|
||||
"Content-Type: application/octet-stream\r\n"
|
||||
"\r\n"
|
||||
"0004\r\nabcd\r\n"
|
||||
"0\r\n\r\n"
|
||||
,[&](test_parser<false> const& p)
|
||||
{
|
||||
BEAST_EXPECT(p.body == "abcd");
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
@ -1072,6 +1090,7 @@ public:
|
||||
testSplit();
|
||||
testIssue430();
|
||||
testIssue452();
|
||||
testIssue496();
|
||||
testBufGrind();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user