Exception: CMSScanner::HTTPRedirectError

Inherits:
Error
  • 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) ⇒ HTTPRedirectError

Returns a new instance of HTTPRedirectError.

Parameters:

  • url (String)


51
52
53
# File 'lib/cms_scanner/errors/http.rb', line 51

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

Instance Attribute Details

#redirect_uriObject (readonly)

Returns the value of attribute redirect_uri.



48
49
50
# File 'lib/cms_scanner/errors/http.rb', line 48

def redirect_uri
  @redirect_uri
end

Instance Method Details

#to_sObject



55
56
57
58
# File 'lib/cms_scanner/errors/http.rb', line 55

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