From a210d387695d2e103e7cb8d3ad49ce6267e5becd Mon Sep 17 00:00:00 2001 From: david Date: Thu, 7 Feb 2013 22:37:38 +0000 Subject: [PATCH] Allow empty path in url.parse. I got a redirect of "?p=indisponible" and url.parse returned {query="p=indisponible"}. Now it returns {path="", query="p=indisponible"}. --- nselib/url.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/url.lua b/nselib/url.lua index 4ce27742e..a2f2a88f6 100644 --- a/nselib/url.lua +++ b/nselib/url.lua @@ -178,7 +178,7 @@ function parse(url, default) return "" end) -- path is whatever was left - if url ~= "" then parsed.path = url end + parsed.path = url local authority = parsed.authority if not authority then return parsed end authority = string.gsub(authority,"^([^@]*)@",