Class UnparsedRequest

java.lang.Object
com.soklet.UnparsedRequest

@ThreadSafe public final class UnparsedRequest extends Object
Immutable snapshot of incoming bytes rejected by a server before a valid Request could be constructed.

The built-in HTTP and SSE transports retain at most 64 KiB of wire input attributed to the rejected request through its rejection boundary. For parsing failures this is the parser-proven boundary; for a partial read timeout it is the end of the received input. HTTP validation failures after parsing (such as invalid URI encoding or body decompression failures) report the observed wire count with an empty capture and a truncated flag, without retaining another raw copy of every successfully parsed request. getObservedByteCount() reports the number of attributed bytes through that boundary, while isCaptureTruncated() indicates whether the retained prefix omits any of those bytes. Bytes already read from the socket beyond the boundary are not counted because they might belong to a pipelined request. Captured bytes are untrusted and may contain credentials or other sensitive values; applications should apply their own redaction and retention policies before logging or storing them.

Diagnostic rendering intentionally omits both captured bytes and the remote address.

Author:
Mark Allen