sas             Thu Oct 24 21:10:51 2002 EDT

  Modified files:              
    /php4/sapi/thttpd   thttpd.c 
  Log:
  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.
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.69 php4/sapi/thttpd/thttpd.c:1.70
--- php4/sapi/thttpd/thttpd.c:1.69      Sun Sep 22 20:49:12 2002
+++ php4/sapi/thttpd/thttpd.c   Thu Oct 24 21:10:50 2002
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: thttpd.c,v 1.69 2002/09/23 00:49:12 sas Exp $ */
+/* $Id: thttpd.c,v 1.70 2002/10/25 01:10:50 sas Exp $ */
 
 #include "php.h"
 #include "SAPI.h"
@@ -449,7 +449,8 @@
        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);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to