# HG changeset patch # User Matthew Wild # Date 1354156680 -18000 # Node ID c5edb08fc7cb8708b4547e9693448433813d2e85 # Parent 0b4f680ea11644476b4552f03b3f0a3aec20fb3d net.http.parser: Collapse multiple consecutive slashes in a path to a single slash diff -r 0b4f680ea116 -r c5edb08fc7cb net/http/parser.lua --- a/net/http/parser.lua Thu Nov 29 07:15:04 2012 +0500 +++ b/net/http/parser.lua Thu Nov 29 07:38:00 2012 +0500 @@ -5,7 +5,7 @@ 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