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:
Gabor Adam Toth 2011-05-04 15:40:05 +02:00
parent b294afd0a4
commit a11c632e3d

View file

@ -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;