From 156e89c597609b340dfabaa3efbcc72c96864e75 Mon Sep 17 00:00:00 2001 From: patrik Date: Sat, 17 Dec 2011 19:45:48 +0000 Subject: [PATCH] Fixed a bug that would incorrectly parse the url scheme [Patrik] --- nselib/httpspider.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nselib/httpspider.lua b/nselib/httpspider.lua index 192f5e0c5..5f76c2547 100644 --- a/nselib/httpspider.lua +++ b/nselib/httpspider.lua @@ -363,10 +363,10 @@ URL = { self.file = self.raw:match("^http[s]?://[^:/]*[:]?%d*(/[^\#]*)") or '/' self.port = tonumber(self.port) if ( not(self.port) ) then - if ( self.proto:match("http") ) then - self.port = 80 - elseif ( self.proto:match("https")) then - self.port = 443 + if ( self.proto:match("https") ) then + self.port = 443 + elseif ( self.proto:match("http")) then + self.port = 80 end end