Exception: Wsv::Request::TooLarge

Inherits:
StandardError
  • Object
show all
Defined in:
lib/wsv/request/too_large.rb

Overview

Raised by Request::Parser when the incoming request line, an individual header line, the total header bytes, or the header count exceeds the configured limit. The status_code chooses between 414 (URI Too Long) and 431 (Request Header Fields Too Large) at the call site.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code) ⇒ TooLarge

Returns a new instance of TooLarge.



12
13
14
15
# File 'lib/wsv/request/too_large.rb', line 12

def initialize(status_code)
  super("request exceeded size limit (#{status_code})")
  @status_code = status_code
end

Instance Attribute Details

#status_codeObject (readonly)

Returns the value of attribute status_code.



10
11
12
# File 'lib/wsv/request/too_large.rb', line 10

def status_code
  @status_code
end