]> git.e2factory.org Git - e2factory.git/commitdiff
Permit any character in URIs, not just non-whitespace ones
authorTobias Ulmer <tu@emlix.com>
Fri, 29 Jun 2012 23:56:14 +0000 (01:56 +0200)
committerTobias Ulmer <tu@emlix.com>
Fri, 29 Jun 2012 23:56:14 +0000 (01:56 +0200)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/url.lua

index 9354d7cfcaf1201cbeac89c6d0fc7de65fa4f7d0..90651f57bc1a753063be83cf971c40a2a8f1df0a 100644 (file)
@@ -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