View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004967 | libmicrohttpd | compliance | public | 2017-03-21 11:08 | 2021-09-02 17:54 |
Reporter | marianobarrios | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.52 | ||||
Target Version | 0.9.53 | Fixed in Version | 0.9.53 | ||
Summary | 0004967: Failure to accept chucks bigger than 16MB | ||||
Description | The HTTP specification does not limit the size of each "chunk" used in chucked transfer encoding. Even though it is clear that there should be some practical limit, libmicrohttpd sets it at 16 MB (6 hexadecimal digits), which happens to be quite small in practice. In particular, it is smaller than what Amazon load balancer can use when the body is big enough. | ||||
Additional Information | In case of sending requests with big bodies through Amazon ELB, there is not possible workaround from the client perspective (transfer encoding is a hop-by-hop aspect of the HTTP protocol, completely in control of the intermediary). Below is a patch for increasing the value one hexadecimal digit (to 256 MB). This happens to be enough for Amazon ELB: --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -1817,7 +1817,7 @@ process_request_body (struct MHD_Connection *connection) ('\n' == buffer_head[i]) ) break; i++; - if (i >= 6) + if (i >= 7) break; } /* take '\n' into account; if '\n' @@ -1829,7 +1829,7 @@ process_request_body (struct MHD_Connection *connection) (2 == available) && ('0' == buffer_head[0]) ) ) break; /* need more data... */ - malformed = (i >= 6); + malformed = (i >= 7); if (! malformed) { size_t num_dig = MHD_strx_to_sizet_n_ (buffer_head, -- | ||||
Tags | No tags attached. | ||||
|
Fixed, but by allowing chunks up to 2^64-1 instead. I think that "limit" will really suffice for everyone for a while... Commit is bf7418b3d9288e9e0175651a9e3cf3297e197942 |
|
Fix committed to master branch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-21 11:08 | marianobarrios | New Issue | |
2017-03-25 20:21 | Christian Grothoff | Assigned To | => Christian Grothoff |
2017-03-25 20:21 | Christian Grothoff | Status | new => assigned |
2017-03-25 21:00 | Christian Grothoff | Status | assigned => resolved |
2017-03-25 21:00 | Christian Grothoff | Resolution | open => fixed |
2017-03-25 21:00 | Christian Grothoff | Fixed in Version | => 0.9.53 |
2017-03-25 21:00 | Christian Grothoff | Note Added: 0011975 | |
2017-03-25 21:01 | Christian Grothoff | Target Version | => 0.9.53 |
2017-04-12 00:00 | Christian Grothoff | Status | resolved => closed |
2021-09-02 17:54 | Christian Grothoff | Changeset attached | => libmicrohttpd master bf7418b3 |
2021-09-02 17:54 | Christian Grothoff | Note Added: 0018183 |