~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to src/HttpHeader.h

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
    HDR_CONTENT_RANGE,
74
74
    HDR_CONTENT_TYPE,
75
75
    HDR_COOKIE,
 
76
    HDR_COOKIE2,
76
77
    HDR_DATE,
77
78
    HDR_ETAG,
78
79
    HDR_EXPIRES,
102
103
    HDR_RETRY_AFTER,
103
104
    HDR_SERVER,
104
105
    HDR_SET_COOKIE,
 
106
    HDR_SET_COOKIE2,
105
107
    HDR_TE,
106
108
    HDR_TITLE,
107
 
    HDR_TRAILERS,
 
109
    HDR_TRAILER,
108
110
    HDR_TRANSFER_ENCODING,
109
111
    HDR_TRANSLATE,             /* IIS custom header we may need to cut off */
110
112
    HDR_UNLESS_MODIFIED_SINCE,             /* IIS custom header we may need to cut off */
239
241
    void putContRange(const HttpHdrContRange * cr);
240
242
    void putRange(const HttpHdrRange * range);
241
243
    void putSc(HttpHdrSc *sc);
 
244
    void putWarning(const int code, const char *const text); ///< add a Warning header
242
245
    void putExt(const char *name, const char *value);
243
246
    int getInt(http_hdr_type id) const;
244
247
    int64_t getInt64(http_hdr_type id) const;
255
258
    int hasListMember(http_hdr_type id, const char *member, const char separator) const;
256
259
    int hasByNameListMember(const char *name, const char *member, const char separator) const;
257
260
    void removeHopByHopEntries();
 
261
    inline bool chunked() const; ///< whether message uses chunked Transfer-Encoding
258
262
 
259
263
    /* protected, do not use these, use interface functions instead */
260
264
    Vector<HttpHeaderEntry *> entries;          /**< parsed fields in raw format */
282
286
 
283
287
SQUIDCEXTERN void httpHeaderCalcMask(HttpHeaderMask * mask, http_hdr_type http_hdr_type_enums[], size_t count);
284
288
 
 
289
inline bool
 
290
HttpHeader::chunked() const
 
291
{
 
292
    return has(HDR_TRANSFER_ENCODING) &&
 
293
           hasListMember(HDR_TRANSFER_ENCODING, "chunked", ',');
 
294
}
 
295
 
285
296
#endif /* SQUID_HTTPHEADER_H */