From 45b5d92f3d74a3cd81cc72931ad25b9cd6d3c41f Mon Sep 17 00:00:00 2001 From: david Date: Thu, 7 Feb 2013 02:28:23 +0000 Subject: [PATCH] Don't treat an empty string as an invalid URL. To me, this is a relative URL with a path of "". I.e., it refers to the same document as wherever the URL appeared, like when people do
--- nselib/url.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/nselib/url.lua b/nselib/url.lua index b6ed13af1..f17ca7327 100644 --- a/nselib/url.lua +++ b/nselib/url.lua @@ -152,8 +152,6 @@ function parse(url, default) -- initialize default parameters local parsed = {} for i,v in base.pairs(default or parsed) do parsed[i] = v end - -- empty url is parsed to nil - if not url or url == "" then return nil, "invalid url" end -- remove whitespace -- url = string.gsub(url, "%s", "") -- get fragment