aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/server.lua')
-rw-r--r--net/http/server.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 9b63d516..d0bd3294 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -207,7 +207,7 @@ function handle_request(conn, request, finish_cb)
};
conn._http_open_response = response;
- local host = (request.headers.host or ""):match("[^:]+");
+ local host = (request.headers.host or ""):gsub(":%d+$","");
-- Some sanity checking
local err_code, err;