forked from boostorg/beast
Fix chunk delimiter parsing
This commit is contained in:
@@ -10,6 +10,7 @@ Version 50
|
|||||||
* Fields concept work
|
* Fields concept work
|
||||||
* Body documentation work
|
* Body documentation work
|
||||||
* Add missing handler_alloc nested types
|
* Add missing handler_alloc nested types
|
||||||
|
* Fix chunk delimiter parsing
|
||||||
|
|
||||||
API Changes:
|
API Changes:
|
||||||
|
|
||||||
|
@@ -512,11 +512,16 @@ parse_chunk_header(char const*& p,
|
|||||||
// be parsed in one call instead of two.
|
// be parsed in one call instead of two.
|
||||||
if(f_ & flagExpectCRLF)
|
if(f_ & flagExpectCRLF)
|
||||||
{
|
{
|
||||||
if(n < 2 || ! parse_crlf(p))
|
if(n < 2)
|
||||||
{
|
{
|
||||||
ec = error::need_more;
|
ec = error::need_more;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(! parse_crlf(p))
|
||||||
|
{
|
||||||
|
ec = error::bad_chunk;
|
||||||
|
return;
|
||||||
|
}
|
||||||
f_ &= ~flagExpectCRLF;
|
f_ &= ~flagExpectCRLF;
|
||||||
pbegin += 2;
|
pbegin += 2;
|
||||||
n -= 2;
|
n -= 2;
|
||||||
|
Reference in New Issue
Block a user