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
// =============================================================================
// Copyright (c) 2025 - 2026 Haixing Hu.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0.
// =============================================================================
//! Fixed fail-closed HTTP markers.
/// Appended when bounded output omits source data.
pub const TRUNCATED: &str = "<truncated>";
/// Replaces a URL that cannot be parsed safely.
pub const INVALID_URL: &str = "<redacted: invalid URL>";
/// Replaces a URL whose nested encoding exceeds the recursion limit.
pub const NESTED_URL_LIMIT: &str = "<redacted: nested URL limit exceeded>";
/// Replaces a malformed URL-encoded query.
pub const INVALID_QUERY: &str = "<redacted: invalid URL-encoded query>";
/// Replaces a malformed URL-encoded form.
pub const INVALID_FORM: &str = "<redacted: invalid URL-encoded form>";
/// Replaces a malformed or incomplete URL-encoded form body.
pub const INVALID_OR_TRUNCATED_FORM: &str =
"<redacted: invalid or truncated URL-encoded form>";
/// Replaces a body whose content type cannot be parsed safely.
pub const INVALID_CONTENT_TYPE: &str = "<redacted: invalid content type body>";
/// Replaces malformed JSON input.
pub const INVALID_JSON: &str = "<redacted: invalid JSON>";
/// Replaces malformed or incomplete JSON input.
pub const INVALID_OR_TRUNCATED_JSON: &str = "<redacted: invalid or truncated JSON>";
/// Replaces malformed newline-delimited JSON input.
pub const INVALID_NDJSON: &str = "<redacted: invalid NDJSON>";
/// Replaces malformed or incomplete newline-delimited JSON input.
pub const INVALID_OR_TRUNCATED_NDJSON: &str = "<redacted: invalid or truncated NDJSON>";
/// Replaces a JSON value that has no field name for classification.
pub const UNKEYED_JSON: &str = "<redacted: unkeyed JSON value>";
/// Replaces an HTTP body format that the redactor does not support.
pub const UNSUPPORTED_BODY: &str = "<redacted: unsupported HTTP body>";
/// Replaces opaque text when pass-through is not enabled.
pub const TEXT_BODY: &str = "<redacted: text body>";
/// Replaces a multipart body that cannot be processed safely.
pub const MULTIPART_BODY: &str = "<redacted: multipart body>";
/// Replaces a malformed or unsupported multipart part.
pub const MULTIPART_PART: &str = "<redacted: multipart part>";
/// Replaces an opaque multipart text part.
pub const MULTIPART_TEXT: &str = "<redacted: multipart text part>";
/// Replaces multipart file contents.
pub const MULTIPART_FILE: &str = "<redacted: file part>";
/// Labels a multipart part whose field name is absent.
pub const MULTIPART_UNNAMED: &str = "<unnamed>";