iliaa           Mon Feb  9 18:28:49 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/sapi/apache2handler        sapi_apache2.c 
    /php-src/sapi/apache2filter sapi_apache2.c 
  Log:
  MFH: Fixed bug #27196 (Missing content_length initialization in apache 2 
  sapis).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.554&r2=1.1247.2.555&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.554 php-src/NEWS:1.1247.2.555
--- php-src/NEWS:1.1247.2.554   Sun Feb  8 23:28:06 2004
+++ php-src/NEWS        Mon Feb  9 18:28:46 2004
@@ -1,6 +1,8 @@
 PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Feb 2004, Version 4.3.5
+- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
+  (Ilia, pdoru at kappa dot ro)
 - Fixed bug #27175 (tzset() is not being called by PHP on startup).
   (Ilia, sagawa at sohgoh dot net)
 - Fixed bug #27172 (Possible floating point exception in gmp_powm()). (Ilia)
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.26&r2=1.1.2.27&ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.26 
php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.27
--- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.26 Thu Jan 29 10:18:37 2004
+++ php-src/sapi/apache2handler/sapi_apache2.c  Mon Feb  9 18:28:47 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sapi_apache2.c,v 1.1.2.26 2004/01/29 15:18:37 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.27 2004/02/09 23:28:47 iliaa Exp $ */
 
 #include <fcntl.h>
 
@@ -414,6 +414,7 @@
 static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
 {
        char *content_type;
+       char *content_length;
        const char *auth;
 
        SG(sapi_headers).http_response_code = !r->status ? HTTP_OK : r->status;
@@ -428,6 +429,9 @@
        ap_set_content_type(r, apr_pstrdup(r->pool, content_type));
        efree(content_type);
 
+       content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length");
+       SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+
        apr_table_unset(r->headers_out, "Content-Length");
        apr_table_unset(r->headers_out, "Last-Modified");
        apr_table_unset(r->headers_out, "Expires");
http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.91.2.22&r2=1.91.2.23&ty=u
Index: php-src/sapi/apache2filter/sapi_apache2.c
diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.22 
php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.23
--- php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.22 Thu Jan 29 10:18:36 2004
+++ php-src/sapi/apache2filter/sapi_apache2.c   Mon Feb  9 18:28:48 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sapi_apache2.c,v 1.91.2.22 2004/01/29 15:18:36 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.91.2.23 2004/02/09 23:28:48 iliaa Exp $ */
 
 #include <fcntl.h>
 
@@ -376,6 +376,7 @@
 static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
 {
        char *content_type;
+       char *content_length;
        const char *auth;
        
        PG(during_request_startup) = 0;
@@ -393,6 +394,10 @@
        SG(request_info).post_data = ctx->post_data;
        SG(request_info).post_data_length = ctx->post_len;
        efree(content_type);
+
+       content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length");
+       SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+       
        apr_table_unset(f->r->headers_out, "Content-Length");
        apr_table_unset(f->r->headers_out, "Last-Modified");
        apr_table_unset(f->r->headers_out, "Expires");

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

Reply via email to