mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
thttpd initializes contentlength to -1, so we need to transfer that to 0
for SAPI/PHP. Otherwise, SAPI will try to read (unsigned long) -1 bytes from the connection.
This commit is contained in:
parent
b109f8e3bd
commit
0a80a78670
1 changed files with 2 additions and 1 deletions
|
@ -449,7 +449,8 @@ static void thttpd_request_ctor(TSRMLS_D)
|
|||
SG(request_info).request_method = httpd_method_str(TG(hc)->method);
|
||||
SG(sapi_headers).http_response_code = 200;
|
||||
SG(request_info).content_type = TG(hc)->contenttype;
|
||||
SG(request_info).content_length = TG(hc)->contentlength;
|
||||
SG(request_info).content_length = TG(hc)->contentlength == -1 ? 0
|
||||
: TG(hc)->contentlength;
|
||||
|
||||
php_handle_auth_data(TG(hc)->authorization TSRMLS_CC);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue