1
0
Fork 0
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:
tg(x) 2011-05-04 15:40:05 +02:00
parent 7f9fe71ed9
commit c9402a5a42

View file

@ -384,6 +384,9 @@ psycParseRC psyc_parse (psycParseState* state, char* oper,
&(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;