mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
MFB: Fixed bug #39984 (redirect response code in header() could be ignored
in CGI sapi).
This commit is contained in:
parent
f9a45d2cdb
commit
e88897ec7b
1 changed files with 3 additions and 1 deletions
|
@ -657,7 +657,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
|
|||
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")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue