Changeset

10952:05d218aae3d1

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Tue, 23 Jun 2020 17:59:24 +0200
parents 10949:8b5b35baf370 (current diff) 10951:f4215f8baa5d (diff)
children 10953:c3b3ac63f4c3
files net/http/server.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/server.lua	Tue Jun 23 16:50:26 2020 +0100
+++ b/net/http/server.lua	Tue Jun 23 17:59:24 2020 +0200
@@ -254,7 +254,8 @@
 	};
 	conn._http_open_response = response;
 
-	local host = (request.headers.host or ""):match("[^:]+");
+	local host = request.headers.host;
+	if host then host = host:gsub(":%d+$",""); end
 
 	-- Some sanity checking
 	local err_code, err;