Changeset

9625:a7e0ed30f242

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 13 Nov 2018 15:03:53 +0000
parents 9623:4d758f575591 (current diff) 9624:cc9dff0212f4 (diff)
children 9627:a1c956bf6872
files
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/server.lua	Mon Nov 12 22:51:30 2018 +0100
+++ b/net/http/server.lua	Tue Nov 13 15:03:53 2018 +0000
@@ -236,7 +236,6 @@
 				err_code, err = 400, "Missing or invalid 'Host' header";
 			end
 		end
-		local host_event = request.method.." "..host..request.path:match("[^?]*");
 
 		if err then
 			response.status_code = err_code;
@@ -244,6 +243,7 @@
 			return;
 		end
 
+		local host_event = request.method.." "..host..request.path:match("[^?]*");
 		log("debug", "Firing event: %s", host_event);
 		result = events.fire_event(host_event, payload);
 	end