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 | a5affc4e5d4639700b8a4ea34b2bf8d350e5ab74 (patch) | |
tree | 5a16361101c7c629f880de9b0a92930169794862 /net/http/server.lua | |
parent | ff4cc9de8ae7bea45b956f39d9d88ed4bfbbea1d (diff) | |
download | prosody-a5affc4e5d4639700b8a4ea34b2bf8d350e5ab74.tar.gz prosody-a5affc4e5d4639700b8a4ea34b2bf8d350e5ab74.zip |
net.http.server: Fix traceback on missing host header (thanks darkrain)
Diffstat (limited to 'net/http/server.lua')
-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 |