]> granicus.if.org Git - php/commitdiff
Bugfix #25044
authorMarcus Boerger <helly@php.net>
Mon, 11 Aug 2003 19:36:26 +0000 (19:36 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 11 Aug 2003 19:36:26 +0000 (19:36 +0000)
main/SAPI.c

index d6690542c6b0b6d9ceb2c9ba5491474a589f3a6b..c8bdf58397001cea22064efc7d9c54e8a8433625 100644 (file)
@@ -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);
                                }