aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-23 17:59:24 +0200
committerKim Alvefur <zash@zash.se>2020-06-23 17:59:24 +0200
commitf7614d491a12872231226995f4707fa9ff8dec9a (patch)
treea4348b028c0c1d6cb65145226e65f497a7292442
parentdd0274b8c7499ceac91696cfcfb8e0b799bf0f52 (diff)
parent540be50a3c3165d08e7e98d406dd911122d51941 (diff)
downloadprosody-f7614d491a12872231226995f4707fa9ff8dec9a.tar.gz
prosody-f7614d491a12872231226995f4707fa9ff8dec9a.zip
Merge 0.11->trunk
-rw-r--r--net/http/server.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index c59479cd..f563d330 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -254,7 +254,8 @@ function handle_request(conn, request, finish_cb)
};
conn._http_open_response = response;
- local host = (request.headers.host or ""):match("[^:]+");
+ local host = request.headers.host;
+ if host then host = host:gsub(":%d+$",""); end
-- Some sanity checking
local err_code, err;