diff src/http/modules/ngx_http_fastcgi_module.c @ 2351:a60b3fcf25ec stable-0.6

r2141 merge: if upstream sent a location header without status use 302
author Igor Sysoev <igor@sysoev.ru>
date Thu, 27 Nov 2008 14:31:44 +0000
parents 63c60504c0bf
children
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1189,6 +1189,13 @@ ngx_http_fastcgi_process_header(ngx_http
                     u->headers_in.status_n = status;
                     u->headers_in.status_line = *status_line;
 
+                } else if (u->headers_in.location) {
+                    u->headers_in.status_n = 302;
+                    u->headers_in.status_line.len =
+                                           sizeof("302 Moved Temporarily") - 1;
+                    u->headers_in.status_line.data =
+                                           (u_char *) "302 Moved Temporarily";
+
                 } else {
                     u->headers_in.status_n = 200;
                     u->headers_in.status_line.len = sizeof("200 OK") - 1;