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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/// The `Content-Type` value that declares a `multipart/form-data` body.
pub const MULTIPART_FORM_DATA: &str = "multipart/form-data";
/// The `boundary` parameter name carried by a `multipart/form-data` content type.
pub const MULTIPART_BOUNDARY_PARAMETER: &str = "boundary";
/// The `name` parameter name carried by a part `Content-Disposition` header.
pub const MULTIPART_NAME_PARAMETER: &str = "name";
/// The `Content-Disposition` header name carried by every `multipart/form-data` part.
pub const MULTIPART_CONTENT_DISPOSITION: &str = "content-disposition";
/// The dash pair that opens a boundary line and closes the closing boundary.
pub const MULTIPART_DELIMITER_DASH: &str = "--";
/// The quote character wrapping a `Content-Disposition` or `boundary` parameter value.
pub const MULTIPART_PARAMETER_QUOTE: &str = "\"";
/// The maximum number of parts accepted from a single `multipart/form-data` body.
pub const MULTIPART_MAX_PARTS: usize = 1024;
/// The bare line feed used by lenient parsers that accept `\n` line breaks.
pub const MULTIPART_LINE_FEED: & = b"\n";
/// The radix of a hexadecimal digit pair in a percent escape.
pub const HEX_RADIX: u8 = 16;
/// The offset turning a hexadecimal letter digit into its numeric value.
pub const HEX_LOWER_OFFSET: u8 = 10;
/// The blank-line separator between a part header block and its payload.
pub const MULTIPART_HEADER_SEPARATOR: & = b"\n\n";
/// The byte offset consumed by [`MULTIPART_HEADER_SEPARATOR`].
pub const MULTIPART_HEADER_SEPARATOR_LEN: usize = 2;
/// The byte a `+` in a URL-encoded form stands in for.
pub const URL_ENCODED_SPACE: u8 = b' ';
/// The byte that opens a percent escape in a URL-encoded form.
pub const URL_ENCODED_PERCENT: u8 = b'%';
/// The byte that stands in for a space in a URL-encoded form.
pub const URL_ENCODED_PLUS: u8 = b'+';
/// The first byte of the decimal digit range in a percent escape.
pub const HEX_DIGIT_ZERO: u8 = b'0';
/// The last byte of the decimal digit range in a percent escape.
pub const HEX_DIGIT_NINE: u8 = b'9';
/// The first byte of the lowercase hexadecimal range in a percent escape.
pub const HEX_DIGIT_LOWER_A: u8 = b'a';
/// The last byte of the lowercase hexadecimal range in a percent escape.
pub const HEX_DIGIT_LOWER_F: u8 = b'f';
/// The first byte of the uppercase hexadecimal range in a percent escape.
pub const HEX_DIGIT_UPPER_A: u8 = b'A';
/// The last byte of the uppercase hexadecimal range in a percent escape.
pub const HEX_DIGIT_UPPER_F: u8 = b'F';