Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for issues with callback userData

MultipartReader always passes an uninitialized pointer as the userData argument for all callbacks, and a MultipartReader instance's userData cannot be set externally.
Modified MultipartReader to initialize and expose the userData property as in MultipartParser.
  • Loading branch information...
commit 691f37ed326a2b8c160376617b399892fc83a4d2 1 parent 374f11e
John Yanarella johnyanarella authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  MultipartReader.h
3  MultipartReader.h
@@ -30,13 +30,13 @@ class MultipartReader {
bool headersProcessed;
MultipartHeaders currentHeaders;
std::string currentHeaderName, currentHeaderValue;
- void *userData;
void resetReaderCallbacks() {
onPartBegin = NULL;
onPartData = NULL;
onPartEnd = NULL;
onEnd = NULL;
+ userData = NULL;
void setParserCallbacks() {
@@ -113,6 +113,7 @@ class MultipartReader {
PartDataCallback onPartData;
Callback onPartEnd;
Callback onEnd;
+ void *userData;
MultipartReader() {
Please sign in to comment.
Something went wrong with that request. Please try again.