diff options
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; |