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 <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $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
+ */
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php