rasmus Thu May 19 12:06:39 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/sapi/apache mod_php5.c
Log:
MFH 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_php5.c?r1=1.10&r2=1.10.2.1&ty=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.10
php-src/sapi/apache/mod_php5.c:1.10.2.1
--- php-src/sapi/apache/mod_php5.c:1.10 Wed Jul 14 05:43:26 2004
+++ php-src/sapi/apache/mod_php5.c Thu May 19 12:06:38 2005
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.10 2004/07/14 09:43:26 sesser Exp $ */
+/* $Id: mod_php5.c,v 1.10.2.1 2005/05/19 16:06:38 rasmus Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
@@ -209,14 +209,20 @@
*/
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;
-}
+}
/* }}} */
/* {{{ sapi_apache_register_server_variables
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php