Skip to main content

Module server

Module server 

Available on crate feature net only.
Expand description

Http server utility types and services.

  • HttpPeekRouter allows you to detect http/1x and h2 traffic. H3 traffic is not covered by this router as this is done via sidechannel information instead (e.g. ALPN in TLS).

Modules§

peek
types and logic for HttpPeekRouter

Structs§

HttpEgressPredicate
PeekEgressPredicate for the first bytes of an HTTP server.
HttpPeekConfig
Configuration used while detecting HTTP on a byte stream.
HttpPeekOptions
Options of peek_http_input_with_options.
HttpPeekRouter
A Service router that can be used to support http/1x and h2 traffic as well as non-tls traffic.
NoHttpRejectError
non-http connection is rejected

Enums§

HttpPeekVersion

Constants§

DEFAULT_HTTP1_REQUEST_LINE_MAX_SIZE
Default maximum number of bytes inspected for an HTTP/1 request-line.
DEFAULT_HTTP_PEEK_READ_BUFFER_SIZE
Default maximum number of bytes requested from the transport per peek read.
KNOWN_NON_HTTP_PROTOCOL_METHODS
Known non-HTTP protocol prefixes which resemble HTTP/1 methods.

Functions§

peek_http_input
Detect HTTP using HttpPeekOptions::default and return an input that replays every byte consumed during detection, on both sides.
peek_http_input_with_options
Detect HTTP using explicit options and return an input that replays every byte consumed during detection, on both sides.

Type Aliases§

HttpPrefixedIo
PrefixedIo alias used by HttpPeekRouter.