changeset 14170:948bda5ed45f 13.0

net.http.parser: Include final component in path normalization check This matches the pattern that is already used by net.http.files when normalizing the path.
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 May 2026 13:06:51 +0100
parents 58ca617f68d5
children 190d172ab021
files net/http/parser.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/parser.lua	Mon May 25 11:37:47 2026 +0100
+++ b/net/http/parser.lua	Mon May 25 13:06:51 2026 +0100
@@ -10,7 +10,7 @@
 		path = "/"..path;
 	end
 	local level = 0;
-	for component in path:gmatch("([^/]+)/") do
+	for component in path:gmatch("([^/]+)") do
 		if component == ".." then
 			level = level - 1;
 		elseif component ~= "." then