changeset 923:ee42dc53078b

fix segfault when $host is used and request is "GET http://host HTTP/1.0"
author Igor Sysoev <igor@sysoev.ru>
date Thu, 14 Dec 2006 22:42:52 +0000
parents a5b9cdfe3e19
children 393dbc659df1
files src/http/ngx_http_parse.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -290,6 +290,7 @@ ngx_http_parse_request_line(ngx_http_req
                 state = sw_after_slash_in_uri;
                 break;
             default:
+                r->host_end = p;
                 return NGX_HTTP_PARSE_INVALID_REQUEST;
             }
             break;