Exception: Protocol::HTTP::DuplicateHeaderError

Inherits:
Error
  • Object
show all
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

Instance Method Summary collapse

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

#keyObject (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