common part of ParseBws() and ParseStrctBws()
Classes | |
class | ChunkExtensionValueParser |
class | Parser |
class | RequestParser |
class | ResponseParser |
class | Server |
Manages a connection from an HTTP/1 or HTTP/0.9 client. More... | |
class | TeChunkedParser |
Typedefs | |
typedef RefCount< Http::One::Parser > | ParserPointer |
typedef RefCount< Http::One::RequestParser > | RequestParserPointer |
typedef RefCount< Http::One::ResponseParser > | ResponseParserPointer |
Enumerations | |
enum | ParseState { HTTP_PARSE_NONE, HTTP_PARSE_FIRST, HTTP_PARSE_CHUNK_SZ, HTTP_PARSE_CHUNK_EXT, HTTP_PARSE_CHUNK, HTTP_PARSE_MIME, HTTP_PARSE_DONE } |
Functions | |
const SBuf & | CrLf () |
CRLF textual representation. More... | |
static void | ParseBws_ (Parser::Tokenizer &tok, const CharacterSet &bwsChars) |
void | ParseBws (Parser::Tokenizer &) |
void | ParseStrictBws (Parser::Tokenizer &) |
int | ErrorLevel () |
the right debugs() level for logging HTTP violation messages More... | |
SBuf | tokenOrQuotedString (Parser::Tokenizer &tok, const bool http1p0=false) |
Typedef Documentation
◆ ParserPointer
◆ RequestParserPointer
◆ ResponseParserPointer
Enumeration Type Documentation
◆ ParseState
Function Documentation
◆ CrLf()
const SBuf & Http::One::CrLf | ( | ) |
Definition at line 20 of file Parser.cc.
References crlf.
Referenced by Http::One::Parser::cleanMimePrefix(), Http::One::Parser::getHostHeaderField(), Http::One::TeChunkedParser::parseChunkEnd(), Http::One::TeChunkedParser::parseChunkMetadataSuffix(), and Http::One::Parser::skipLineTerminator().
◆ ErrorLevel()
int Http::One::ErrorLevel | ( | ) |
Definition at line 269 of file Parser.cc.
References Config, DBG_IMPORTANT, SquidConfig::onoff, and SquidConfig::relaxed_header_parser.
Referenced by ParseBws_(), Http::One::RequestParser::parseHttpVersionField(), Http::One::RequestParser::parseMethodField(), Http::One::RequestParser::parseRequestFirstLine(), Http::One::RequestParser::parseUriField(), Http::One::RequestParser::skipDelimiter(), and Http::One::RequestParser::skipTrailingCrs().
◆ ParseBws()
void Http::One::ParseBws | ( | Parser::Tokenizer & | tok | ) |
skips and, if needed, warns about RFC 7230 BWS ("bad" whitespace)
- Exceptions
-
InsufficientInput when the end of BWS cannot be confirmed
- See also
- WhitespaceCharacters() for the definition of BWS characters
- ParseStrictBws() that avoids WhitespaceCharacters() uncertainties
Definition at line 297 of file Parser.cc.
References ParseBws_(), and Http::One::Parser::WhitespaceCharacters().
Referenced by Http::One::TeChunkedParser::parseChunkExtensions(), and Http::One::TeChunkedParser::parseOneChunkExtension().
◆ ParseBws_()
|
static |
Definition at line 277 of file Parser.cc.
References debugs, and ErrorLevel().
Referenced by ParseBws(), and ParseStrictBws().
◆ ParseStrictBws()
void Http::One::ParseStrictBws | ( | Parser::Tokenizer & | tok | ) |
Like ParseBws() but only skips CharacterSet::WSP characters. This variation must be used if the next element may start with CR or any other character from RelaxedDelimiterCharacters().
Definition at line 303 of file Parser.cc.
References ParseBws_(), and CharacterSet::WSP.
Referenced by Http::One::TeChunkedParser::parseChunkMetadataSuffix().
◆ tokenOrQuotedString()
SBuf Http::One::tokenOrQuotedString | ( | Parser::Tokenizer & | tok, |
const bool | http1p0 = false |
||
) |
Extracts either an HTTP/1 token or quoted-string while dealing with possibly incomplete input typical for incremental text parsers. Unescapes escaped characters in HTTP/1.1 quoted strings.
- Parameters
-
http1p0 whether to prohibit -escaped characters in quoted strings
- Exceptions
-
InsufficientInput as appropriate, including on unterminated tokens
- Returns
- extracted token or quoted string (without quotes)
Governed by:
RFC 1945 section 2.1 " A string of text is parsed as a single word if it is quoted using double-quote marks.
quoted-string = ( <"> *(qdtext) <"> ) qdtext = <any CHAR except <"> and CTLs, but including LWS>
Single-character quoting using the backslash ("\") character is not permitted in HTTP/1.0. "
RFC 7230 section 3.2.6 " A string of text is parsed as a single value if it is quoted using double-quote marks.
quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE qdtext = HTAB / SP /x21 / x23-5B / x5D-7E / obs-text obs-text = x80-FF "
Definition at line 89 of file Tokenizer.cc.
References parseQuotedStringSuffix(), CharacterSet::TCHAR, and TexcHere.
Referenced by Http::One::ChunkExtensionValueParser::Ignore().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products