diff options
author | Adam Harvey <aharvey@php.net> | 2014-06-12 17:35:05 -0700 |
---|---|---|
committer | Adam Harvey <aharvey@php.net> | 2014-06-12 17:35:05 -0700 |
commit | 1b9cbab9a770d084ed35ff9ae101fff2770c8f51 (patch) | |
tree | c8a36a6dddfcc09d80f60eb953f79027eb595a54 /main/SAPI.c | |
parent | 5f2a30e11197fd1bc2394ee23cf80c7ea2ea9660 (diff) | |
download | php-git-1b9cbab9a770d084ed35ff9ae101fff2770c8f51.tar.gz |
Keep 308-399 HTTP response codes when header('Location:') is called.
Fixes bug #67428 (header('Location: foo') will override a 308-399 response
code).
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index f02bca6d1d..994aff38bf 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -821,7 +821,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); } else if (!STRCASECMP(header_line, "Location")) { if ((SG(sapi_headers).http_response_code < 300 || - SG(sapi_headers).http_response_code > 307) && + SG(sapi_headers).http_response_code > 399) && SG(sapi_headers).http_response_code != 201) { /* Return a Found Redirect if one is not already specified */ if (http_response_code) { /* user specified redirect code */ |