class

HTTP2::Connection::GoAwayTerminationError

Inherits HTTP2::Connection::ClosedError < HTTP2::Connection::Error < Exception < Reference < Object

The connection ended (EOF) after the peer sent a GOAWAY signaling a failure (a non-NO_ERROR code). Raised in place of a bare IO::EOFError so streams at or below the GOAWAY's last_stream_id — ones the peer promised to still finish — fail with the peer's own diagnosis instead of an opaque "the socket closed."

Constants

MaxDebugDataBytes = 128

RFC 9113 places no length limit on GOAWAY debug data beyond the frame size itself (up to several KB by default, more if the peer advertised a larger SETTINGS_MAX_FRAME_SIZE) — bound how much of it ends up in a message an application might log verbatim.

Constructors

new(goaway : Frame::GoAway)
Source

Class methods

sanitize_debug_data(bytes : Bytes) : String

String.new never raises on invalid UTF-8 (it wraps the bytes as given); truncation above can itself split a multibyte sequence at the boundary regardless of whether the peer's original bytes were valid. #scrub replaces any resulting invalid byte sequences with the Unicode replacement character — but it only touches invalid UTF-8. C0 controls (0x00-0x1F), DEL (0x7F), and C1 controls (0x80-0x9F) are all valid UTF-8 code points, so #scrub alone passes them through unchanged — including ESC and BEL, which let a peer-controlled debug string carry a live ANSI/terminal escape sequence into a message an application might log verbatim (a narrow log/terminal-injection vector, not just a display nit). Replaced with the same replacement character #scrub already uses, for the same reason and for one consistent visual marker.

Source

Instance methods

error_code
Source
goaway
Source