ResponseParser.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
15 namespace Http {
16 namespace One {
17 
30 {
31 public:
32  ResponseParser() = default;
33  ResponseParser(const ResponseParser &) = default;
34  ResponseParser &operator =(const ResponseParser &) = default;
35  ResponseParser(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 
48 private:
51 
53  static const SBuf IcyMagic;
54 
57  bool completedStatus_ = false;
58 
61 
64 };
65 
66 } // namespace One
67 } // namespace Http
68 
69 #endif /* _SQUID_SRC_HTTP_ONE_RESPONSEPARSER_H */
70 
Definition: SBuf.h:87
SBuf::size_type size_type
Definition: Parser.h:42
virtual bool parse(const SBuf &aBuf)
SBuf reasonPhrase_
HTTP/1 status-line reason phrase.
Http::StatusCode messageStatus() const
static const SBuf IcyMagic
magic prefix for identifying ICY response messages
StatusCode
Definition: StatusCode.h:20
Http::StatusCode statusCode_
HTTP/1 status-line status code.
optimized set of C chars, with quick membership test and merge support
Definition: CharacterSet.h:17
int parseResponseStatusAndReason(Http1::Tokenizer &, const CharacterSet &)
virtual Http1::Parser::size_type firstLineSize() const
size in bytes of the first line including CRLF terminator
ResponseParser & operator=(const ResponseParser &)=default

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors