class

HTTP2::ResponseValidator

Inherits HTTP2::Stream::InboundValidator < Reference < Object

Stateful validation for one response message.

Constants

DEFAULT_MAX_INFORMATIONAL_RESPONSES = 16

RFC 9113 places no bound on informational responses; without one a hostile peer can stream 1xx sections indefinitely. 16 comfortably exceeds legitimate 100/102/103 usage.

Constructors

new(stream_id : UInt32, request_method : String, max_informational_responses : Int32 = DEFAULT_MAX_INFORMATIONAL_RESPONSES)
Source

Instance methods

final_status
Source
received_content_bytes
Source
validate(section : Connection::FieldSection) : HTTPSemantics::ResponseSection | Headers

Returns the parsed result of section — a ResponseSection for a response's leading field section, Headers for its trailer section — so the caller can attach it to the delivered event instead of the client re-parsing the identical fields later.

Source
validate_data(size : Int32, end_stream : Bool) : Nil
Source