Exception: Protocol::HTTP::DuplicateHeaderError
- Includes:
- BadRequest
- Defined in:
- lib/protocol/http/error.rb
Overview
Raised when a singleton (e.g. ‘content-length`) header is duplicated in a request or response.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
- #key The header key that was duplicated.(Theheaderkeythatwasduplicated.) ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(key) ⇒ DuplicateHeaderError
constructor
A new instance of DuplicateHeaderError.
Constructor Details
#initialize(key) ⇒ DuplicateHeaderError
Returns a new instance of DuplicateHeaderError.
22 23 24 |
# File 'lib/protocol/http/error.rb', line 22 def initialize(key) super("Duplicate singleton header key: #{key.inspect}") end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'lib/protocol/http/error.rb', line 27 def key @key end |
#key The header key that was duplicated.(Theheaderkeythatwasduplicated.) ⇒ Object (readonly)
27 |
# File 'lib/protocol/http/error.rb', line 27 attr :key |