From b4f741c18b934b0d2fde5663e21a30bebf96eeeb Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 9 Mar 2018 19:07:47 +0000 Subject: [PATCH] httspider.URL's tostring method returns normalized URL. See #1107 --- nselib/httpspider.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index 05f7a1363..94f81fce8 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -489,7 +489,14 @@ URL = { -- Converts the URL to a string -- @return url string containing the string representation of the url - __tostring = function(self) return self.raw end, + __tostring = function(self) + return string.format("%s://%s:%s%s", + self.proto, + self.host, + self.port, + self.file + ) + end, } -- An UrlQueue