https://bz.apache.org/bugzilla/show_bug.cgi?id=63366
Bug ID: 63366
Summary: POST body is empty when REQUEST is send with
transfer-encoding:chunked
Product: Apache httpd-2
Version: 2.4.39
Hardware: All
OS: Linux
Status: NEW
Severity: blocker
Priority: P2
Component: mod_proxy_fcgi
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
The POST raw data is completly empty when the POST is sent with
"transfer-encoding: chunked". Read POST raw data as a stream should be the
right way to handle this kind of transfer enconding, however it's completly
useless.
<?php
$fp = fopen('php://input', 'rb');
stream_filter_append($fp, 'dechunk', STREAM_FILTER_READ);
$POST = stream_get_contents($fp);
?>
$POST is always empty if the request received has "transfer-econding:chuncked".
Same issue could be seen into all kind of handler:
- PHP CGI
- PHP FCGI
- PHP FCGI with FPM
This bug seems the consequences of this one:
https://bz.apache.org/bugzilla/show_bug.cgi?id=57087
However this is a more specific error and relates to more big issue.
Infact, by definition, with "transfer chuncked" there is no CONTENT-LENGTH at
all and it's right that this it's not present. So, I would say that missing the
CONTENT-LENGTH is right due to the design of the transfer chunked encoding.
Here the issue is not about the CONTENT-LENGTH but instead the issue is that
the stream is not available in the php://input and is not readable causing
dataloss on the POST value.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]