net.http.server: Fix traceback on missing host header (thanks darkrain)

vault/0.11
Matthew Wild 14 years ago
parent ff4cc9de8a
commit a5affc4e5d
  1. 3
      net/http/server.lua

@ -178,8 +178,7 @@ function handle_request(conn, request, finish_cb)
err_code, err = 400, "Missing or invalid 'Host' header";
elseif not request.path then
err_code, err = 400, "Invalid path";
end
if not hosts[host] then
elseif not hosts[host] then
if hosts[default_host] then
host = default_host;
else

Loading…
Cancel
Save