aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-11-29 07:38:00 +0500
committerMatthew Wild <mwild1@gmail.com>2012-11-29 07:38:00 +0500
commit89d1d6cccf95d274da212eab69e3a8557f6040de (patch)
tree712857a3bd16fac6f602f64d2bb6a419bd18b9f6 /net/http/parser.lua
parentd7b707744de72882f42d0b688f9ecfd7f9fe3f12 (diff)
downloadprosody-89d1d6cccf95d274da212eab69e3a8557f6040de.tar.gz
prosody-89d1d6cccf95d274da212eab69e3a8557f6040de.zip
net.http.parser: Collapse multiple consecutive slashes in a path to a single slash
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r--net/http/parser.lua2
1 files changed, 1 insertions, 1 deletions
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