Package org.mockserver.netty.unification
package org.mockserver.netty.unification
-
ClassesClassDescriptionOutbound handler that adds an
Alt-Svcheader to responses served over the TCP (HTTP/1.1 and HTTP/2) paths when HTTP/3 is enabled.Sizes the buffer each read of an accepted connection is given: as the channel's own allocator does (adaptive, following recent reads down to 64 bytes) until the connection is found to be binary, thenBinaryAwareRecvByteBufAllocator.BINARY_READ_SIZEfor every read, so that a binary message is not cut by a buffer that has followed small messages down.Logs a client's failed TLS handshake, on TCP and on HTTP/3: atWARNfor the first failure from a client address on a transport, with a hint about its likely cause, and atDEBUGfor each later one, so a client that retries, or a scan, does not fill the log.Copies the connection-scoped channel attributes from a parent channel onto a child channel.Inspects the incoming Netty HttpRequest (headers only) and, when a matching expectation is configured withrespondBeforeBody=true, dispatches the response and closes the connection before HttpObjectAggregator buffers the request body.Leaves Netty'sx-http2-extension headers (HttpConversionUtil.ExtensionHeaderNames) out of every header block anHttpToHttp2ConnectionHandlersends.What MockServer logs when an HTTP/1.1 connection closes, by its client's close or reset or otherwise, while a request's body is still arriving: oneINFOentry with the request's method, path, query string and headers where the aggregator still holds them, and no stack trace, as an HTTP/2 stream that ends with its connection is logged byHttp2StreamFaults.The last handler of a direct HTTP/2 connection's pipeline.Emits an HTTP/2GOAWAYframe on the connection carryingctxso the client is told to stop opening new streams and drain — the graceful "this connection is going away" signal a server sends before a shutdown / preemption.Per-stream child initializer used withHttp2MultiplexHandlerto build the pipeline for every HTTP/2 stream.Limits the header list of an HTTP/2 request tomaxHeaderSize, as HTTP/1.1 limits its header section, and logs each request refused for it.What MockServer logs when an HTTP/2 stream ends before it should, on a connection made straight to MockServer and on the client leg of a CONNECT or SOCKS tunnel alike, each once and with no stack trace:INFOfor a request its client cancelled, or whose connection closed, before it was complete;WARNfor an error of the stream's own, which Netty then resets the stream for with the error's code;WARNfor a connection Netty closes because it had to be sent too many of those resets. See "HTTP/2 streams cut short" in docs/code/netty-pipeline.md for what bounds the entries of one connection.KeepsHttpServerCodecpairing each response with the request it answers when an exchange ends without its response passing the codec's encoder.TheHttpServerCodecof an HTTP/1.1 connection a client opens, directly or through a CONNECT/SOCKS tunnel.AHttp2StreamFrameToHttpObjectCodecthat is lenient on the INBOUND (request) side but strict on the OUTBOUND (response) side.Sends a large encoded HTTP/1.1 message to the socket in slices, writing the next slice only while the connection is writable.Translates aStreamAddressedHttpContentinto the child-channel equivalent when a streaming response is written on anHttp2MultiplexHandlerchild channel.NettyChannelDuplexHandlerthat injects raw TCP-layer faults before HTTP decoding, based on theTcpChaosProfileregistered inTcpChaosRegistryfor the connection's remote host.Netty handler that extracts W3Ctraceparent/tracestateheaders from inboundHttpRequestobjects and stores the parsedW3CTraceContextas a channel attribute, replacing (or clearing) any context from an earlier request on the same connection.