-
- Downloads
Ignore multipart/form-data parts without a Content-Disposition name
When parsing a multipart/form-data request with a MIME message which has no "Content-Disposition" header (or a header without a name), then the MIME-parser creates an empty part (no disposition, no disp_params - thus no disp_params->name) and the post-request parser Protocols.HTTP.Request->parse_post() converts the empty part into a query variable with name 0 and an empty string as value: query = ([ 0: "" ]). Trying to encode the resulting mapping to a query-string fails, because Protocols.HTTP.http_encode_query(query) calls Protocols.HTTP->uri_encode() on the key and the value and uri_encode() expects a non-zero string. Example request without a Content-Disposition name: Content-Type: multipart/form-data; boundary=WxO --WxO --WxO--
Please register or sign in to comment