diff options
Diffstat (limited to 'net/http')
-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 d0bd3294..18704962 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -207,7 +207,8 @@ function handle_request(conn, request, finish_cb) }; conn._http_open_response = response; - local host = (request.headers.host or ""):gsub(":%d+$",""); + local host = request.headers.host; + if host then host = host:gsub(":%d+$",""); end -- Some sanity checking local err_code, err; |