diff options
-rw-r--r-- | main/SAPI.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index d6690542c6..c8bdf58397 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -585,8 +585,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) efree(mimetype); SG(sapi_headers).send_default_content_type = 0; } else if (!STRCASECMP(header_line, "Location")) { - if (SG(sapi_headers).http_response_code < 300 || - SG(sapi_headers).http_response_code > 307) { + if ((SG(sapi_headers).http_response_code < 300 || + SG(sapi_headers).http_response_code > 307) && + SG(sapi_headers).http_response_code != 201) { /* Return a Found Redirect if one is not already specified */ sapi_update_response_code(302 TSRMLS_CC); } |