cvs: php4 /sapi/apache mod_php4.c
| From: | George Schlossnagle | Date: | Mon, 24 Feb 2003 01:19:08 +0000 |
| Subject: | cvs: php4 /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19107@lists.php.net to get a copy of this message | ||
gschlossnagle Sun Feb 23 20:19:08 2003 EDT
Modified files:
/php4/sapi/apache mod_php4.c
Log:
hopefully a fix for 19919
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.156 php4/sapi/apache/mod_php4.c:1.157
--- php4/sapi/apache/mod_php4.c:1.156 Mon Feb 10 21:23:29 2003
+++ php4/sapi/apache/mod_php4.c Sun Feb 23 20:19:08 2003
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.156 2003/02/11 02:23:29 sas Exp $ */
+/* $Id: mod_php4.c,v 1.157 2003/02/24 01:19:08 gschlossnagle Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
@@ -169,7 +169,11 @@
{
char *header_name, *header_content, *p;
request_rec *r = (request_rec *) SG(server_context);
-
+ if(!r) {
+ efree(sapi_header->header);
+ return 0;
+ }
+
header_name = sapi_header->header;
header_content = p = strchr(header_name, ':');
@@ -293,11 +297,15 @@
TSRMLS_FETCH();
php_output_set_status(0 TSRMLS_CC);
- SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups()
is called */
if (AP(in_request)) {
AP(in_request) = 0;
php_request_shutdown(dummy);
}
+ SG(server_context) = NULL;
+ /*
+ * The server context (request) is NOT invalid by the time
+ * run_cleanups() is called
+ */
}
/* }}} */