# HG changeset patch # User Igor Sysoev # Date 1166136172 0 # Node ID ee42dc53078bd49852ecb126d44a29aa5b7d7fc8 # Parent a5b9cdfe3e193648fbf137df6094648e7246a304 fix segfault when $host is used and request is "GET http://host HTTP/1.0" diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c --- 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;