diff options
author | Kim Alvefur <zash@zash.se> | 2012-05-15 14:00:57 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-05-15 14:00:57 +0200 |
commit | 9eab3dfed9d4bcbb5f9ee1527fd5ddfa13f77d5a (patch) | |
tree | ba4cbf8b6c01a901ae0e84bcd437753e40d7e9de /net/http | |
parent | 0774f793f1a2aaa5f2c230b4bb21442f03bc58dd (diff) | |
download | prosody-9eab3dfed9d4bcbb5f9ee1527fd5ddfa13f77d5a.tar.gz prosody-9eab3dfed9d4bcbb5f9ee1527fd5ddfa13f77d5a.zip |
net.http.parser: Keep the Host header no host is present in the URI
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/parser.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 = { |