# HG changeset patch # User Matthew Wild # Date 1335570696 -3600 # Node ID f1d32a0dc057ac5a3fecf119a7772bffbf9da2ae # Parent e95458712782ae93bb74c1f726cb176b5c47c11b net.http.server: Fix traceback on missing host header (thanks darkrain) diff -r e95458712782 -r f1d32a0dc057 net/http/server.lua --- a/net/http/server.lua Sat Apr 28 00:45:33 2012 +0100 +++ b/net/http/server.lua Sat Apr 28 00:51:36 2012 +0100 @@ -178,8 +178,7 @@ 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