Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for LAST_BOUNDARY handling in MultipartParser.

When the last boundary was encountered, the onPartEnd and onEnd callbacks were not being called, nor was the parser state set to END.
Modified last boundary handling logic to call these callbacks and set the parser state.
Mirrors a matching fix in formidable.js.
  • Loading branch information...
commit fa6f4091e04e3831b99a6293d42937457186420c 1 parent 691f37e
@johnyanarella authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 MultipartParser.h
View
4 MultipartParser.h
@@ -171,7 +171,9 @@ class MultipartParser {
}
} else if (flags & LAST_BOUNDARY) {
if (c == HYPHEN) {
- index++;
+ callback(onPartEnd);
+ callback(onEnd);
+ state = END;
} else {
index = 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.