aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-28 00:51:36 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-28 00:51:36 +0100
commita5affc4e5d4639700b8a4ea34b2bf8d350e5ab74 (patch)
tree5a16361101c7c629f880de9b0a92930169794862 /net
parentff4cc9de8ae7bea45b956f39d9d88ed4bfbbea1d (diff)
downloadprosody-a5affc4e5d4639700b8a4ea34b2bf8d350e5ab74.tar.gz
prosody-a5affc4e5d4639700b8a4ea34b2bf8d350e5ab74.zip
net.http.server: Fix traceback on missing host header (thanks darkrain)
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua3
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