1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Sans-IO HTTP/1.x protocol primitives.
//!
//! Built on [`httparse`] for SIMD-accelerated header parsing.
//! Uses [`ReadBuf`](nexus_net::buf::ReadBuf) for incremental byte buffering.
//!
//! - [`ResponseReader`] — parse inbound HTTP responses (used by REST client)
//! - [`ChunkedDecoder`] — chunked transfer encoding decoder
//! - [`write_request`] / [`write_response`] — construct outbound HTTP messages
//!
//! The HTTP client API is in [`rest`](crate::rest).
//! `RequestReader` is internal (used for WebSocket upgrade handshake).
/// Default capacity for HTTP read/decode/scratch buffers.
///
/// Sized to comfortably fit a typical HTTP/1.1 head section (request
/// line + headers up to ~3-4 KiB) in a single allocation, which is the
/// dominant use site. Also used by `nexus-async-web` as the per-recv
/// read cap during WebSocket upgrade and REST request/response cycles,
/// and as the initial capacity of intermediate body / wire / decode
/// scratch buffers.
///
/// Currently a hardcoded internal default. Callers with unusually large
/// HTTP heads (very long cookies, many or large header values) would
/// today need to work around by sending fewer headers; a builder knob
/// is a separate concern.
pub const HTTP_HANDSHAKE_BUFFER: usize = 4096;
pub use ChunkedDecoder;
pub use HttpError;
// RequestReader parses inbound HTTP requests (used for WS upgrade handshake).
// The public HTTP client API is in `rest::`.
pub use RequestReader;
pub use ;