]> git.kaiwu.me - nginx.git/commitdiff
return NGX_HTTP_UPSTREAM_INVALID_HEADER for invalid status
authorIgor Sysoev <igor@sysoev.ru>
Sun, 9 Dec 2007 08:08:56 +0000 (08:08 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 9 Dec 2007 08:08:56 +0000 (08:08 +0000)
src/http/modules/ngx_http_fastcgi_module.c

index 5a15fc1e2d2fa84a52cbeeffb26a51ea05b26e6b..7b799c516120fd00c2eded8361705c1506889ae8 100644 (file)
@@ -1174,7 +1174,10 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
                     status = ngx_atoi(status_line->data, 3);
 
                     if (status == NGX_ERROR) {
-                        return NGX_HTTP_INTERNAL_SERVER_ERROR;
+                        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+                                      "upstream sent invalid status \"%V\"",
+                                      status_line);
+                        return NGX_HTTP_UPSTREAM_INVALID_HEADER;
                     }
 
                     u->headers_in.status_n = status;