cvs: php4(PHP_4_3) /sapi/apache mod_php4.c
| From: | George Schlossnagle | Date: | Mon, 24 Feb 2003 01:29:54 +0000 |
| Subject: | cvs: php4(PHP_4_3) /sapi/apache mod_php4.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-19109@lists.php.net to get a copy of this message | ||
gschlossnagle Sun Feb 23 20:29:54 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/sapi/apache mod_php4.c
Log:
MFH fix for 19919
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.146.2.5 php4/sapi/apache/mod_php4.c:1.146.2.6
--- php4/sapi/apache/mod_php4.c:1.146.2.5 Mon Feb 10 21:25:48 2003
+++ php4/sapi/apache/mod_php4.c Sun Feb 23 20:29:54 2003
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.146.2.5 2003/02/11 02:25:48 sas Exp $ */
+/* $Id: mod_php4.c,v 1.146.2.6 2003/02/24 01:29:54 gschlossnagle Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
@@ -170,6 +170,10 @@
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,14 @@
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
+ */
}
/* }}} */