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
/// Hexadecimal uppercase digit table used by percent-encoding and multipart boundaries.
pub const HEX_UPPER: & = b"0123456789ABCDEF";
/// Default `application/x-www-form-urlencoded` media type for form request bodies.
pub const FORM_URLENCODED_CONTENT_TYPE: &str = "application/x-www-form-urlencoded";
/// Default `multipart/form-data` boundary prefix.
pub const MULTIPART_BOUNDARY_PREFIX: &str = "hyperlane-boundary-";
/// `Authorization` header prefix for Bearer tokens.
pub const BEARER_PREFIX: &str = "Bearer ";
/// `Authorization` header prefix for HTTP Basic credentials.
pub const BASIC_PREFIX: &str = "Basic ";
/// HTTP/1.0 version prefix used to distinguish default keep-alive semantics.
pub const HTTP_1_0_PREFIX: & = b"HTTP/1.0 ";
/// Error message returned when an HTTP/2 TLS handshake fails to negotiate `h2` ALPN.
pub const H2_ALPN_MISMATCH: &str = "Server did not negotiate HTTP/2 via ALPN";
/// Maximum stack buffer length for zero-allocation lowercase header lookups.
pub const RESPONSE_HEADER_STACK_LIMIT: usize = 64;
/// Maximum exponential backoff delay between automatic retries (milliseconds).
pub const MAX_RETRY_BACKOFF_MS: u64 = 1000;
/// Base exponential backoff delay for the first retry attempt (milliseconds).
pub const BASE_RETRY_BACKOFF_MS: u64 = 50;
/// Multipart boundary double-dash prefix bytes.
pub const MULTIPART_DASH_BYTES: & = b"--";
/// Multipart `Content-Disposition` form-data name header prefix bytes.
pub const MULTIPART_DISPOSITION_PREFIX: & = b"Content-Disposition: form-data; name=\"";
/// Multipart filename parameter prefix bytes.
pub const MULTIPART_FILENAME_PREFIX: & = b"; filename=\"";
/// Multipart `Content-Type` header prefix bytes.
pub const MULTIPART_CONTENT_TYPE_PREFIX: & = b"Content-Type: ";
/// Double-quote byte used in multipart parameters and URL validation.
pub const QUOTE_U8: u8 = b'"';
/// Underscore replacement byte for unsafe multipart parameter characters.
pub const UNDERSCORE_U8: u8 = b'_';
/// Hyphen byte allowed inside DNS host labels.
pub const HYPHEN_U8: u8 = b'-';
/// Forbidden ASCII bytes inside the fast-path URL path component.
pub const FAST_URL_PATH_FORBIDDEN: & = b"\\\"<>`{}^";
/// Forbidden ASCII bytes inside the fast-path URL query component.
pub const FAST_URL_QUERY_FORBIDDEN: & = b"\"<>`";
/// IDNA punycode label prefix requiring full WHATWG URL host validation.
pub const PUNYCODE_PREFIX: &str = "xn--";
/// Percent byte introducing percent-encoded sequences in URL paths.
pub const PERCENT_U8: u8 = b'%';