Exception: CMSScanner::Error::HTTPRedirect

Inherits:
Standard
  • Object
show all
Defined in:
lib/cms_scanner/errors/http.rb

Overview

HTTP Redirect Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ HTTPRedirect

Returns a new instance of HTTPRedirect.

Parameters:

  • url (String)


61
62
63
# File 'lib/cms_scanner/errors/http.rb', line 61

def initialize(url)
  @redirect_uri = Addressable::URI.parse(url).normalize
end

Instance Attribute Details

#redirect_uriObject (readonly)

Returns the value of attribute redirect_uri.



58
59
60
# File 'lib/cms_scanner/errors/http.rb', line 58

def redirect_uri
  @redirect_uri
end

Instance Method Details

#to_sObject



65
66
67
68
69
# File 'lib/cms_scanner/errors/http.rb', line 65

def to_s
  "The URL supplied redirects to #{redirect_uri}. Use the --ignore-main-redirect "\
    'option to ignore the redirection and scan the target, or change the --url option ' \
    'value to the redirected URL.'
end