From 9eab3dfed9d4bcbb5f9ee1527fd5ddfa13f77d5a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 15 May 2012 14:00:57 +0200 Subject: net.http.parser: Keep the Host header no host is present in the URI --- net/http/parser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/http/parser.lua b/net/http/parser.lua index d3f0dc03..2d822598 100644 --- a/net/http/parser.lua +++ b/net/http/parser.lua @@ -93,7 +93,7 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb) else local parsed_url = url_parse(path); path = preprocess_path(parsed_url.path); - headers.host = parsed_url.host; + headers.host = parsed_url.host or headers.host; len = len or 0; packet = { -- cgit v1.2.3