View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001680 | libmicrohttpd | HTTP POST | public | 2011-05-20 10:54 | 2011-05-20 22:19 |
| Reporter | ponponli2000 | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.9.10 | ||||
| Summary | 0001680: post processor doesn't handle multipart/form-data correctly | ||||
| Description | It cannot process HTTP POST requests made by libcurl. For example, making a HTTP POST request like following: Content-Type: multipart/form-data; boundary=----------------------------dfb9171b6138 ------------------------------dfb9171b6138 Content-Disposition: form-data; name="field" hello ------------------------------dfb9171b6138-- Then, the value parsed by the post processor will be: hello ------------------------------dfb9171b6138-- -----------------------------dfb9171b6138-- --------------------------dfb9171b6138-- The result contains garbage data. It's because the implementation of pp doesn't handle the string properly. I generate a patch for the bug fix. Please see the attached file. | ||||
| Tags | No tags attached. | ||||
| Attached Files | pp-multipart.patch (385 bytes)
--- postprocessor.c 2010-12-26 04:03:06.000000000 +0800
+++ postprocessor.c.new 2011-05-20 16:46:03.712987555 +0800
@@ -650,6 +650,7 @@
pp->state = next_state;
pp->dash_state = next_dash_state;
(*ioffptr) += pp->blen + 4; /* skip boundary as well */
+ buf[newline] = '\0';
break;
}
}
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-05-20 10:54 | ponponli2000 | New Issue | |
| 2011-05-20 10:54 | ponponli2000 | File Added: pp-multipart.patch | |
| 2011-05-20 19:36 | Christian Grothoff | Note Added: 0004329 | |
| 2011-05-20 19:36 | Christian Grothoff | Status | new => resolved |
| 2011-05-20 19:36 | Christian Grothoff | Resolution | open => fixed |
| 2011-05-20 19:36 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2011-05-20 22:19 | Christian Grothoff | Status | resolved => closed |