aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-05-15 14:00:57 +0200
committerKim Alvefur <zash@zash.se>2012-05-15 14:00:57 +0200
commit2a56213eeb9f7a565eb5cd572e7bc3804a9d49b5 (patch)
treeba4cbf8b6c01a901ae0e84bcd437753e40d7e9de
parent0e5cf44aad70a894851af63d56d10ce2cc4e29b6 (diff)
downloadprosody-2a56213eeb9f7a565eb5cd572e7bc3804a9d49b5.tar.gz
prosody-2a56213eeb9f7a565eb5cd572e7bc3804a9d49b5.zip
net.http.parser: Keep the Host header no host is present in the URI
-rw-r--r--net/http/parser.lua2
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 = {