Software /
code /
prosody
Changeset
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 |
parents | 4738:e95458712782 |
children | 4740:bd9c8bc8036f |
files | net/http/server.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
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