[PATCH] response have a HTTP header for request which can not correctly parse the HTTP version

Kirill A. Korinskiy catap+nginx at catap.ru
Wed Mar 17 15:11:40 MSK 2010


From: Kirill A. Korinskiy <catap at catap.ru>

Thanks for bugreport David Lodge
---
 src/http/ngx_http_header_filter_module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index ef17911..c890cd2 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -176,7 +176,7 @@ ngx_http_header_filter(ngx_http_request_t *r)
         return NGX_OK;
     }
 
-    if (r->http_version < NGX_HTTP_VERSION_10) {
+    if (r->http_version && r->http_version < NGX_HTTP_VERSION_10) {
         return NGX_OK;
     }
 
-- 
1.6.6.1




More information about the nginx mailing list