Edit report at https://bugs.php.net/bug.php?id=60826&edit=1
ID: 60826
Comment by: florian dot fernandez at navaho dot fr
Reported by: clarkwise at gmail dot com
Summary: raw POST data missing with chunked encoding, FastCGI
Status: Assigned
Type: Bug
Package: CGI/CLI related
Operating System: Windows XP
PHP Version: 5.3.9
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
@ab at php dot net
Unfortunately, I won't be able to test with nginx because the system administrators won't
let me install it (Only Apache is allowed). Sorry for the inconvenience. I'll try to open a new
bug on Apache bug list or mod_fcigd bug list if I find it : maybe they'll look into it.
Previous Comments:
------------------------------------------------------------------------
[2012-03-27 20:26:14] clarkwise at gmail dot com
I finally got my hands on Windows Server 2008 running IIS 7.0.
Same problem; when POST request is chunked, the response times out.
Perhaps I'm missing a setting that would enable the receipt of
chunked incoming requests, but I have only read about settings
that chunk the outgoing response.
------------------------------------------------------------------------
[2012-03-27 13:34:28] ab@php.net
@florian dot fernandez at navaho dot fr
Looks like that. Could you try nginx+chunkin to confirm please?
------------------------------------------------------------------------
[2012-03-27 08:52:31] florian dot fernandez at navaho dot fr
So, it is not a PHP problem ?
------------------------------------------------------------------------
[2012-03-23 15:27:44] clarkwise at gmail dot com
Making the chunked request to a stock nginx 1.0.13 installation
on Ubuntu yields a "411 Length Required" message, but enabling
the ngx_chunkin module does indeed correctly serve the request
and populate php://input and $HTTP_RAW_POST_DATA.
This was done with both Ubuntu's distribution of
PHP 5.3.6 and the php5.4-201203221530 snapshot.
------------------------------------------------------------------------
[2012-03-13 05:58:19] florian dot fernandez at navaho dot fr
First of all, the problem is still here with PHP 5.4 and Apache 2.4.1, I previously made the mistake
to precise the content-length in my headers.
So here is what I found. If you send chunked http request but do not send the content-length (as we
should do using HTTP 1.1 protocol) the body part of the request is empty (php://input returns
nothing). This result remains valid for the following configuration where PHP runs via FastCGI :
PHP 5.3.10 - APACHE 2.4.1
PHP 5.3-201203101230 - APACHE 2.4.1
PHP 5.4 - APACHE 2.4.1
PHP 5.4-201203101230 - APACHE 2.4.1
The same configuration with PHP running as mod_php is fine, the body request is available through
php://input.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60826
--
Edit this bug report at https://bugs.php.net/bug.php?id=60826&edit=1