rasmus Thu May 19 12:14:48 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/apache mod_php4.c Log: Fix for bug #33057 - Don't send extraneous entity-headers on a 304 as per RFC 2616 section 10.3.5 http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php4.c?r1=1.146.2.14&r2=1.146.2.15&ty=u Index: php-src/sapi/apache/mod_php4.c diff -u php-src/sapi/apache/mod_php4.c:1.146.2.14 php-src/sapi/apache/mod_php4.c:1.146.2.15 --- php-src/sapi/apache/mod_php4.c:1.146.2.14 Wed Jul 21 12:25:28 2004 +++ php-src/sapi/apache/mod_php4.c Thu May 19 12:14:46 2005 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.146.2.14 2004/07/21 16:25:28 sesser Exp $ */ +/* $Id: mod_php4.c,v 1.146.2.15 2005/05/19 16:14:46 rasmus Exp $ */ #include "php_apache_http.h" #include "http_conf_globals.h" @@ -209,12 +209,18 @@ */ static int sapi_apache_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { - if(SG(server_context) == NULL) { /* server_context is not here anymore */ + request_rec *r = SG(server_context); + + if(r == NULL) { /* server_context is not here anymore */ return SAPI_HEADER_SEND_FAILED; } - ((request_rec *) SG(server_context))->status = SG(sapi_headers).http_response_code; - send_http_header((request_rec *) SG(server_context)); + r->status = SG(sapi_headers).http_response_code; + if(r->status==304) { + send_error_response(r,0); + } else { + send_http_header(r); + } return SAPI_HEADER_SENT_SUCCESSFULLY; } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php