]> git.kaiwu.me - nginx.git/commitdiff
Fixed incorrect response line on "return 203".
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 4 Sep 2013 17:17:01 +0000 (21:17 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 4 Sep 2013 17:17:01 +0000 (21:17 +0400)
Reported by Weibin Yao,
http://mailman.nginx.org/pipermail/nginx-devel/2013-April/003607.html.

src/http/ngx_http_header_filter_module.c

index 707a8131353e12320dea41f4f590e951fc9dbf1a..875177b46e9ecf2fff3d43899ff3ea12b296b989 100644 (file)
@@ -270,6 +270,12 @@ ngx_http_header_filter(ngx_http_request_t *r)
             len += NGX_INT_T_LEN;
             status_line = NULL;
         }
+
+        if (status_line && status_line->len == 0) {
+            status = r->headers_out.status;
+            len += NGX_INT_T_LEN;
+            status_line = NULL;
+        }
     }
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);