iliaa Sun Dec 31 19:22:01 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/main SAPI.c /php-src NEWS Log: Fixed bug #39984 (redirect response code in header() could be ignored in CGI sapi). http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.5&r2=1.202.2.7.2.6&diff_format=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.202.2.7.2.5 php-src/main/SAPI.c:1.202.2.7.2.6 --- php-src/main/SAPI.c:1.202.2.7.2.5 Thu Dec 21 21:49:22 2006 +++ php-src/main/SAPI.c Sun Dec 31 19:22:01 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.c,v 1.202.2.7.2.5 2006/12/21 21:49:22 tony2001 Exp $ */ +/* $Id: SAPI.c,v 1.202.2.7.2.6 2006/12/31 19:22:01 iliaa Exp $ */ #include <ctype.h> #include <sys/stat.h> @@ -631,7 +631,9 @@ SG(sapi_headers).http_response_code > 307) && SG(sapi_headers).http_response_code != 201) { /* Return a Found Redirect if one is not already specified */ - if(SG(request_info).proto_num > 1000 && + if (http_response_code) { /* user specified redirect code */ + sapi_update_response_code(http_response_code TSRMLS_CC); + } else if (SG(request_info).proto_num > 1000 && SG(request_info).request_method && strcmp(SG(request_info).request_method, "HEAD") && strcmp(SG(request_info).request_method, "GET")) { http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.467&r2=1.2027.2.547.2.468&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.467 php-src/NEWS:1.2027.2.547.2.468 --- php-src/NEWS:1.2027.2.547.2.467 Sun Dec 31 15:27:13 2006 +++ php-src/NEWS Sun Dec 31 19:22:01 2006 @@ -17,6 +17,8 @@ __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes) - Fixed the validate email filter so that the letter "v" can also be used in the user part of the email address. (Derick) +- Fixed bug #39984 (redirect response code in header() could be ignored in + CGI sapi). (Ilia) - Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used for timestamp fields). (Ilia) - Fixed bug #39952 (zip ignoring --with-libdir on zlib checks) (judas dot
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php