]>
Commit | Line | Data |
---|---|---|
b6149797 | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
b6149797 | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
b6149797 FC |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 25 MiME Header Parsing */ |
10 | ||
b6149797 FC |
11 | #ifndef SQUID_MIME_HEADER_H_ |
12 | #define SQUID_MIME_HEADER_H_ | |
13 | ||
8b082ed9 FC |
14 | #include "sbuf/forward.h" |
15 | ||
16 | #include <cstddef> | |
17 | ||
00237269 AJ |
18 | /** |
19 | * Scan for the end of mime header block. | |
20 | * | |
21 | * Which is one of the following octet patterns: | |
22 | * - CRLF CRLF, or | |
23 | * - CRLF LF, or | |
24 | * - LF CRLF, or | |
69c698a3 EB |
25 | * - LF LF or, |
26 | * if mime header block is empty: | |
27 | * - LF or | |
28 | * - CRLF | |
00237269 AJ |
29 | * |
30 | * Also detects whether a obf-fold pattern exists within the mime block | |
31 | * - CR*LF (SP / HTAB) | |
32 | * | |
33 | * \param containsObsFold will be set to true if obs-fold pattern is found. | |
34 | */ | |
35 | size_t headersEnd(const char *, size_t, bool &containsObsFold); | |
36 | ||
8b082ed9 | 37 | size_t headersEnd(const SBuf &buf, bool &containsObsFold); |
00237269 AJ |
38 | |
39 | /// \deprecated caller needs to be fixed to handle obs-fold | |
40 | inline size_t | |
41 | headersEnd(const char *buf, size_t sz) | |
42 | { | |
43 | bool ignored; | |
44 | return headersEnd(buf, sz, ignored); | |
45 | } | |
b6149797 FC |
46 | |
47 | #endif /* SQUID_MIME_HEADER_H_ */ | |
f53969cc | 48 |