/usr/lib/ruby/vendor_ruby/mechanize/redirect_not_get_or_head_error.rb is in ruby-mechanize 2.7.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##
# Raised when a POST, PUT, or DELETE request results in a redirect
# see RFC 2616 10.3.2, 10.3.3 http://www.ietf.org/rfc/rfc2616.txt
class Mechanize::RedirectNotGetOrHeadError < Mechanize::Error
attr_reader :page, :response_code, :verb, :uri
def initialize(page, verb)
@page = page
@verb = verb
@uri = page.uri
@response_code = page.code
end
def to_s
method = @verb.to_s.upcase
"#{@response_code} redirect received after a #{method} request"
end
alias :inspect :to_s
end
|