Changeset

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
parents 9336:9e8d7d461c7d
children 9338:9beb767295d4
files net/http/server.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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