diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-23 17:59:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-23 17:59:24 +0200 |
commit | f7614d491a12872231226995f4707fa9ff8dec9a (patch) | |
tree | a4348b028c0c1d6cb65145226e65f497a7292442 /net/http/server.lua | |
parent | dd0274b8c7499ceac91696cfcfb8e0b799bf0f52 (diff) | |
parent | 540be50a3c3165d08e7e98d406dd911122d51941 (diff) | |
download | prosody-f7614d491a12872231226995f4707fa9ff8dec9a.tar.gz prosody-f7614d491a12872231226995f4707fa9ff8dec9a.zip |
Merge 0.11->trunk
Diffstat (limited to 'net/http/server.lua')
-rw-r--r-- | net/http/server.lua | 3 |
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; |