Software /
code /
prosody
Diff
net/http/server.lua @ 4739:f1d32a0dc057
net.http.server: Fix traceback on missing host header (thanks darkrain)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 28 Apr 2012 00:51:36 +0100 |
parent | 4736:3514338c59c3 |
child | 4740:bd9c8bc8036f |
line wrap: on
line diff
--- 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