ContentLengthInterpreter.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_CONTENTLENGTH_INTERPRETER_H
10 #define SQUID_SRC_HTTP_CONTENTLENGTH_INTERPRETER_H
11 
12 class String;
13 
14 namespace Http
15 {
16 
20 {
21 public:
22  explicit ContentLengthInterpreter(const int aDebugLevel);
23 
26  bool checkField(const String &field);
27 
30  int64_t value;
31 
32  /* for debugging (declared here to minimize padding) */
33  const char *headerWideProblem;
34  const int debugLevel;
35 
37  bool sawBad;
38 
43 
46  bool sawGood;
47 
48 protected:
49  bool goodSuffix(const char *suffix, const char * const end) const;
50  bool checkValue(const char *start, const int size);
51  bool checkList(const String &list);
52 };
53 
54 } // namespace Http
55 
56 #endif /* SQUID_SRC_HTTP_CONTENTLENGTH_INTERPRETER_H */
57 
ContentLengthInterpreter(const int aDebugLevel)
bool goodSuffix(const char *suffix, const char *const end) const
checks whether all characters after the Content-Length are allowed
const char * headerWideProblem
worst header-wide problem found (or nil)
bool checkList(const String &list)
handles Content-Length: a, b, c
const int debugLevel
debugging level for certain warnings
bool checkValue(const char *start, const int size)
bool sawBad
whether a malformed Content-Length value was present
int size
Definition: ModDevPoll.cc:77

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors