diff options
| author | Sascha Schumann <sas@php.net> | 2002-10-25 01:10:50 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2002-10-25 01:10:50 +0000 |
| commit | 0a80a78670726bb0ce2b87da659502d7afebe265 (patch) | |
| tree | 732f2874bdb58c2649723e5c63fe59e908c5d5aa /sapi/thttpd | |
| parent | b109f8e3bdcb3b552236b9b89fb190a34d4f0ad1 (diff) | |
| download | php-git-0a80a78670726bb0ce2b87da659502d7afebe265.tar.gz | |
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.
Diffstat (limited to 'sapi/thttpd')
| -rw-r--r-- | sapi/thttpd/thttpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 0b66836e19..bb8b8c656d 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -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); } |
