From 6de9ea824f1ae5085654c9e7e8affadde6ceb9b7 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Sat, 30 Jun 2012 01:56:14 +0200 Subject: [PATCH] Permit any character in URIs, not just non-whitespace ones Signed-off-by: Tobias Ulmer --- generic/url.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/url.lua b/generic/url.lua index 9354d7c..90651f5 100644 --- a/generic/url.lua +++ b/generic/url.lua @@ -50,12 +50,12 @@ function parse(url) u.url = url -- parse: transport://server/path u.transport, u.server, u.path = - u.url:match("(%S+)://([^/]*)(%S*)") + u.url:match("(%S+)://([^/]*)(.*)") if not u.transport then return nil, string.format("can't parse url: %s", url) end -- remove leading slashes from the path - u.path = u.path:match("^[/]*(%S*)") + u.path = u.path:match("^[/]*(.*)") -- parse the server part if u.server:match("(%S+):(%S+)@(%S+)") then -- user:pass@host -- 2.39.5