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 <[EMAIL PROTECTED]>                      |
    +----------------------------------------------------------------------+
  */
-/* $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 
+        */
 }
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to