Software /
code /
prosody
Diff
net/http/server.lua @ 9337:5d6b252bc36f
net.http.server: Fix default host logic
This was used to construct the event name previously
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 21 Sep 2018 21:33:41 +0200 |
parent | 9335:2dc7490899ae |
child | 9338:9beb767295d4 |
line wrap: on
line diff
--- a/net/http/server.lua Fri Sep 21 21:19:44 2018 +0200 +++ b/net/http/server.lua Fri Sep 21 21:33:41 2018 +0200 @@ -219,7 +219,7 @@ err_code, err = 400, "Invalid path"; elseif not hosts[host] then if hosts[default_host] then - host = default_host; + request.host = default_host; elseif host then err_code, err = 404, "Unknown host: "..host; else