http-type 22.14.1

A comprehensive Rust type library for HTTP operations and concurrent programming. Provides core HTTP types (Request/Response with builder patterns, Method, HttpStatus, HttpVersion, ContentType, FileExtension with MIME mapping, Cookie parsing/building, HttpUrl parsing, WebSocket frame/opcode, protocol upgrade types, stream/task management, panic handling), thread-safe concurrent wrappers (ArcMutex, ArcRwLock, BoxRwLock, RcRwLock), dynamic dispatch types (BoxAny, RcAny, ArcAny with Send/Sync variants), high-performance hash collections (HashMapXxHash3_64, HashSetXxHash3_64), and static lifetime utilities (BoxLeak, Lifetime trait).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Pre-encoded HTTP/1.1 200 OK status line and content-length field prefix.
pub(crate) const FAST_HTTP11_200_CL_PREFIX: &[u8] = b"HTTP/1.1 200 OK\r\ncontent-length:";

/// Pre-encoded HTTP/2 200 OK status line and content-length field prefix.
pub(crate) const FAST_HTTP2_200_CL_PREFIX: &[u8] = b"HTTP/2 200 OK\r\ncontent-length:";

/// Pre-encoded HTTP/3 200 OK status line and content-length field prefix.
pub(crate) const FAST_HTTP3_200_CL_PREFIX: &[u8] = b"HTTP/3 200 OK\r\ncontent-length:";

/// Pre-encoded default keep-alive and text/html headers terminating the fast-path head.
pub(crate) const FAST_DEFAULT_HEADERS_SUFFIX: &[u8] =
    b"\r\nconnection:keep-alive\r\ncontent-type:text/html; charset=utf-8\r\n\r\n";

/// Pre-encoded content-length field prefix after a custom status line.
pub(crate) const FAST_CL_PREFIX: &[u8] = b"\r\ncontent-length:";

/// Static default `Content-Type` header value avoiding runtime `OnceLock` overhead.
pub(crate) const DEFAULT_CONTENT_TYPE_VALUE: &str = "text/html; charset=utf-8";