ResponseParser.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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 ~ResponseParser() override {}
38
39 /* Http::One::Parser API */
40 void clear() override {*this=ResponseParser();}
42 bool parse(const SBuf &aBuf) override;
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)
Http1::Parser::size_type firstLineSize() const override
size in bytes of the first line including CRLF terminator
ResponseParser & operator=(const ResponseParser &)=default
ResponseParser(ResponseParser &&)=default
static const SBuf IcyMagic
magic prefix for identifying ICY response messages
bool parse(const SBuf &aBuf) override
Definition: SBuf.h:94
Definition: forward.h:18
StatusCode
Definition: StatusCode.h:20
@ scNone
Definition: StatusCode.h:21
int code
Definition: smb-errors.c:145

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors