From 6ffd147a1e765d5757ce6b5e1e262ab1e0116054 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=91=A3=E5=AE=87?= <fishgege@users.noreply.github.com>
Date: Wed, 6 Sep 2017 11:13:10 +0800
Subject: [PATCH] Update ngx_http_core_module.c

---
 src/http/ngx_http_core_module.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index f357ee4..8a16a46 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2491,7 +2491,10 @@ ngx_http_subrequest(ngx_http_request_t *r,
     sr->pool = r->pool;
 
     sr->headers_in = r->headers_in;
-
+    if (sr->headers_in.headers.part.next == NULL) {
+        sr->headers_in.headers.last = &sr->headers_in.headers.part;
+    }
+    
     ngx_http_clear_content_length(sr);
     ngx_http_clear_accept_ranges(sr);
     ngx_http_clear_last_modified(sr);
-- 
2.9.3 (Apple Git-75)

