aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/server.lua
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
commit240f8628053e0fd728c720e9bde78760b963f551 (patch)
treea4348b028c0c1d6cb65145226e65f497a7292442 /net/http/server.lua
parent07bb3974e2ae0558fb45712494ebddc9cae9675d (diff)
parent0774429554248ae9dc35256080764569a3afed7b (diff)
downloadprosody-240f8628053e0fd728c720e9bde78760b963f551.tar.gz
prosody-240f8628053e0fd728c720e9bde78760b963f551.zip
Merge 0.11->trunk
Diffstat (limited to 'net/http/server.lua')
-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;