Skip to content

Commit

Permalink
Merge pull request iafonov#8 from udp/master
Browse files Browse the repository at this point in the history
Fix issue where CR/LF line breaks would be repeated in the data output
  • Loading branch information
iafonov committed Oct 23, 2012
2 parents 053b9f5 + 1f318ee commit b05e8ce
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 b05e8ce

Please sign in to comment.