From 753581cc0d82e90383873958a36cd236e5623cbe Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 29 Nov 2012 07:38:00 +0500 Subject: net.http.parser: Collapse multiple consecutive slashes in a path to a single slash --- net/http/parser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/http') diff --git a/net/http/parser.lua b/net/http/parser.lua index 964c350d..606d750c 100644 --- a/net/http/parser.lua +++ b/net/http/parser.lua @@ -5,7 +5,7 @@ local url_parse = require "socket.url".parse; local urldecode = require "net.http".urldecode; local function preprocess_path(path) - path = urldecode(path); + path = urldecode((path:gsub("//+". "/"))); if path:sub(1,1) ~= "/" then path = "/"..path; end -- cgit v1.2.3