ResponseParser.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef _SQUID_SRC_HTTP_ONE_RESPONSEPARSER_H
10#define _SQUID_SRC_HTTP_ONE_RESPONSEPARSER_H
11
12#include "http/one/Parser.h"
13#include "http/StatusCode.h"
14
15namespace Http {
16namespace One {
17
30{
31public:
32 ResponseParser() = default;
33 ResponseParser(const ResponseParser &) = default;
37 virtual ~ResponseParser() {}
38
39 /* Http::One::Parser API */
40 virtual void clear() {*this=ResponseParser();}
42 virtual bool parse(const SBuf &aBuf);
43
44 /* respone specific fields, read-only */
46 SBuf reasonPhrase() const { return reasonPhrase_;}
47
52
53private:
56
58 static const SBuf IcyMagic;
59
62 bool completedStatus_ = false;
63
66
69};
70
71} // namespace One
72} // namespace Http
73
74#endif /* _SQUID_SRC_HTTP_ONE_RESPONSEPARSER_H */
75
SBuf::size_type size_type
Definition: Parser.h:43
::Parser::Tokenizer Tokenizer
Definition: Parser.h:44
SBuf reasonPhrase_
HTTP/1 status-line reason phrase.
Http::StatusCode messageStatus() const
ResponseParser(const ResponseParser &)=default
Http::StatusCode statusCode_
HTTP/1 status-line status code.
int parseResponseStatusAndReason(Tokenizer &)
static void ParseResponseStatus(Tokenizer &, StatusCode &code)
ResponseParser & operator=(const ResponseParser &)=default
virtual Http1::Parser::size_type firstLineSize() const
size in bytes of the first line including CRLF terminator
ResponseParser(ResponseParser &&)=default
static const SBuf IcyMagic
magic prefix for identifying ICY response messages
virtual bool parse(const SBuf &aBuf)
Definition: SBuf.h:94
unsigned char code
Definition: html_quote.c:20
Definition: forward.h:22
StatusCode
Definition: StatusCode.h:20
@ scNone
Definition: StatusCode.h:21

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors