Skip to content

Commit

Permalink
Fix issue where CR/LF line breaks would be repeated in the data output
Browse files Browse the repository at this point in the history
  • Loading branch information
James committed Oct 23, 2012
1 parent 4708675 commit 1f318ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multipart_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ size_t multipart_parser_execute(multipart_parser* p, const char *buf, size_t len
}
EMIT_PART_DATA_CB(p->lookbehind, 1);
p->state = s_part_data;
-- i;
mark = i --;
break;

case s_part_data_boundary:
multipart_log("s_part_data_boundary");
if (p->multipart_boundary[p->index] != c) {
p->state = s_part_data;
EMIT_PART_DATA_CB(p->lookbehind, 2 + p->index);
-- i;
p->state = s_part_data;
mark = i --;
break;
}
p->lookbehind[2 + p->index] = c;
Expand Down

0 comments on commit 1f318ee

Please sign in to comment.