TeChunkedParser.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_TeChunkedParser_H
10 #define SQUID_SRC_HTTP_ONE_TeChunkedParser_H
11 
12 #include "http/one/Parser.h"
13 
14 class MemBuf;
15 
16 namespace Http
17 {
18 namespace One
19 {
20 
32 {
33 public:
35  virtual ~TeChunkedParser() {theOut=NULL;/* we dont own this object */}
36 
38  void setPayloadBuffer(MemBuf *parsedContent) {theOut = parsedContent;}
39 
40  bool needsMoreSpace() const;
41 
42  /* Http1::Parser API */
43  virtual void clear();
44  virtual bool parse(const SBuf &);
45  virtual Parser::size_type firstLineSize() const {return 0;} // has no meaning with multiple chunks
46 
47 private:
49  bool parseChunkExtension(Http1::Tokenizer &tok, bool skipKnown);
52 
54  uint64_t theChunkSize;
55  uint64_t theLeftBodySize;
56 
57 public:
58  int64_t useOriginBody;
59 };
60 
61 } // namespace One
62 } // namespace Http
63 
64 #endif /* SQUID_SRC_HTTP_ONE_TeChunkedParser_H */
65 
bool parseChunkEnd(Http1::Tokenizer &tok)
Definition: SBuf.h:87
SBuf::size_type size_type
Definition: Parser.h:42
virtual Parser::size_type firstLineSize() const
size in bytes of the first line including CRLF terminator
bool parseChunkBody(Http1::Tokenizer &tok)
Definition: parse.c:160
bool parseChunkSize(Http1::Tokenizer &tok)
RFC 7230 section 4.1 chunk-size.
virtual bool parse(const SBuf &)
void setPayloadBuffer(MemBuf *parsedContent)
set the buffer to be used to store decoded chunk data
Definition: MemBuf.h:23
bool parseChunkExtension(Http1::Tokenizer &tok, bool skipKnown)
#define NULL
Definition: types.h:166

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors