Software /
code /
prosody
Changeset
5207:c5edb08fc7cb
net.http.parser: Collapse multiple consecutive slashes in a path to a single slash
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 07:38:00 +0500 |
parents | 5204:0b4f680ea116 |
children | 5208:afa9b7e18e43 5209:f5d121846d53 |
files | net/http/parser.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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