edink Tue Jun 3 06:06:46 2003 EDT Modified files: /php4 php.ini-dist php.ini-recommended /php4/main SAPI.c /php4/sapi/cgi cgi_main.c Log: Fix for #23902 by Shane. Removed bogus recommendation from php.ini files. # Basic authentication is actually possible # usign IIS + PHP cgi countrary to our current docs Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.192 php4/php.ini-dist:1.193 --- php4/php.ini-dist:1.192 Fri May 30 16:06:05 2003 +++ php4/php.ini-dist Tue Jun 3 06:06:45 2003 @@ -462,7 +462,7 @@ ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that ; is supported by Apache. When this option is set to 1 PHP will send ; RFC2616 compliant header. -; Set to 1 if running under IIS. Default is zero. +; Default is zero. ;cgi.rfc2616_headers = 0 Index: php4/php.ini-recommended diff -u php4/php.ini-recommended:1.137 php4/php.ini-recommended:1.138 --- php4/php.ini-recommended:1.137 Fri May 30 16:06:05 2003 +++ php4/php.ini-recommended Tue Jun 3 06:06:45 2003 @@ -477,7 +477,7 @@ ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that ; is supported by Apache. When this option is set to 1 PHP will send ; RFC2616 compliant header. -; Set to 1 if running under IIS. Default is zero. +; Default is zero. ;cgi.rfc2616_headers = 0 Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.173 php4/main/SAPI.c:1.174 --- php4/main/SAPI.c:1.173 Thu Feb 20 17:21:48 2003 +++ php4/main/SAPI.c Tue Jun 3 06:06:45 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.c,v 1.173 2003/02/20 22:21:48 rasmus Exp $ */ +/* $Id: SAPI.c,v 1.174 2003/06/03 10:06:45 edink Exp $ */ #include <ctype.h> #include <sys/stat.h> @@ -456,6 +456,12 @@ static void sapi_update_response_code(int ncode TSRMLS_DC) { + /* if the status code did not change, we do not want + to change the status line, and no need to change the code */ + if (SG(sapi_headers).http_response_code == ncode) { + return; + } + if (SG(sapi_headers).http_status_line) { efree(SG(sapi_headers).http_status_line); SG(sapi_headers).http_status_line = NULL; Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.231 php4/sapi/cgi/cgi_main.c:1.232 --- php4/sapi/cgi/cgi_main.c:1.231 Fri May 30 18:31:12 2003 +++ php4/sapi/cgi/cgi_main.c Tue Jun 3 06:06:45 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.231 2003/05/30 22:31:12 moriyoshi Exp $ */ +/* $Id: cgi_main.c,v 1.232 2003/06/03 10:06:45 edink Exp $ */ #include "php.h" #include "php_globals.h" @@ -303,7 +303,7 @@ if (SG(sapi_headers).http_response_code != 200) { int len; - if (rfc2616_headers) { + if (rfc2616_headers && SG(sapi_headers).http_status_line) { len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH, "%s\r\n", SG(sapi_headers).http_status_line);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php