mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
parser: fix for binary body length
This commit is contained in:
parent
7f9fe71ed9
commit
c9402a5a42
1 changed files with 4 additions and 1 deletions
|
@ -381,9 +381,12 @@ psycParseRC psyc_parse (psycParseState* state, char* oper,
|
|||
{
|
||||
if (state->contentParsed < state->contentLength &&
|
||||
psyc_parseBinaryValue(state, value, &(state->contentLength),
|
||||
&(state->contentParsed)) == PSYC_PARSE_INCOMPLETE)
|
||||
&(state->contentParsed)) == PSYC_PARSE_INCOMPLETE)
|
||||
return PSYC_PARSE_BODY_INCOMPLETE;
|
||||
|
||||
if (value->length)
|
||||
value->length--; // \n at the end is not part of the body
|
||||
|
||||
if (state->cursor >= state->buffer.length)
|
||||
return PSYC_PARSE_BODY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue