tony2001                Wed Oct 19 19:08:16 2005 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/main       SAPI.c 
    /php-src/sapi/cli   php_cli.c 
  Log:
  MFH: 
  fixed bug #29983 (PHP does not explicitly set mime type & charset)
  + call sapi_deactivate() when called with -m switch
  
  
http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187.2.3&r2=1.187.2.4&ty=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.187.2.3 php-src/main/SAPI.c:1.187.2.4
--- php-src/main/SAPI.c:1.187.2.3       Tue Feb 22 09:46:15 2005
+++ php-src/main/SAPI.c Wed Oct 19 19:08:07 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: SAPI.c,v 1.187.2.3 2005/02/22 14:46:15 sniper Exp $ */
+/* $Id: SAPI.c,v 1.187.2.4 2005/10/19 23:08:07 tony2001 Exp $ */
 
 #include <ctype.h>
 #include <sys/stat.h>
@@ -749,6 +749,12 @@
        /* Success-oriented.  We set headers_sent to 1 here to avoid an 
infinite loop
         * in case of an error situation.
         */
+       if (SG(sapi_headers).send_default_content_type && 
sapi_module.send_headers) {
+               sapi_header_struct default_header;
+               sapi_get_default_content_type_header(&default_header TSRMLS_CC);
+               sapi_add_header_ex(default_header.header, 
default_header.header_len, 0, 0 TSRMLS_CC);
+       }
+
        SG(headers_sent) = 1;
 
        if (sapi_module.send_headers) {
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.113.2.3&r2=1.113.2.4&ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.113.2.3 
php-src/sapi/cli/php_cli.c:1.113.2.4
--- php-src/sapi/cli/php_cli.c:1.113.2.3        Thu Oct  6 16:36:45 2005
+++ php-src/sapi/cli/php_cli.c  Wed Oct 19 19:08:14 2005
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.113.2.3 2005/10/06 20:36:45 johannes Exp $ */
+/* $Id: php_cli.c,v 1.113.2.4 2005/10/19 23:08:14 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -689,6 +689,7 @@
                                php_printf("\n");
                                php_end_ob_buffers(1 TSRMLS_CC);
                                exit_status=0;
+                               sapi_deactivate(TSRMLS_C);
                                zend_ini_deactivate(TSRMLS_C);
                                goto out_err;
 

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

Reply via email to