diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-28 00:51:36 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-28 00:51:36 +0100 |
commit | e8746c77dad085ea37dda934eff87230796439fa (patch) | |
tree | 5a16361101c7c629f880de9b0a92930169794862 /net | |
parent | 568e94ab15866f79ca494e033954829732e75ed2 (diff) | |
download | prosody-e8746c77dad085ea37dda934eff87230796439fa.tar.gz prosody-e8746c77dad085ea37dda934eff87230796439fa.zip |
net.http.server: Fix traceback on missing host header (thanks darkrain)
Diffstat (limited to 'net')
-rw-r--r-- | net/http/server.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index 325eb42f..eb30da78 100644 --- a/net/http/server.lua +++ b/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 |