http-type 22.8.2

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
use super::*;

/// Maximum number of bytes in a chunk size or trailer line, including CRLF.
pub(crate) const MAX_CHUNK_LINE_BYTES: usize = 8 * 1024;

/// Maximum total number of extension bytes across all chunk size lines.
pub(crate) const MAX_CHUNK_EXTENSION_BYTES: usize = 64 * 1024;

/// Maximum number of bytes in the trailer section, including its final CRLF.
pub(crate) const MAX_CHUNK_TRAILER_BYTES: usize = 64 * 1024;

/// Error returned when chunk framing is malformed or incomplete.
pub(crate) const INVALID_CHUNK: RequestError = RequestError::HttpRead(HttpStatus::BadRequest);

/// Error returned when the chunk metadata exceeds its bounds.
pub(crate) const CHUNK_METADATA_TOO_LARGE: RequestError =
    RequestError::HeaderLineTooLong(HttpStatus::RequestHeaderFieldsTooLarge);