]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/HttpReply.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / HttpReply.h
index ca043eec5f202eece664bfb57ec900eca535381e..36418cf1a74fb5c43d0f02bf2c8cc97b67a188ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -72,14 +72,14 @@ public:
 
     virtual bool inheritProperties(const HttpMsg *aMsg);
 
-    void updateOnNotModified(HttpReply const *other);
+    bool updateOnNotModified(HttpReply const *other);
 
     /** set commonly used info with one call */
     void setHeaders(Http::StatusCode status,
                     const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires);
 
     /** \return a ready to use mem buffer with a packed reply */
-    MemBuf *pack();
+    MemBuf *pack() const;
 
     /** construct a 304 reply and return it */
     HttpReply *make304() const;
@@ -112,6 +112,10 @@ public:
 
     virtual void hdrCacheInit();
 
+    /// whether our Date header value is smaller than theirs
+    /// \returns false if any information is missing
+    bool olderThan(const HttpReply *them) const;
+
 private:
     /** initialize */
     void init();
@@ -120,11 +124,11 @@ private:
 
     void hdrCacheClean();
 
-    void packInto(Packable * p);
+    void packInto(Packable * p) const;
 
     /* ez-routines */
     /** \return construct 304 reply and pack it into a MemBuf */
-    MemBuf *packed304Reply();
+    MemBuf *packed304Reply() const;
 
     /* header manipulation */
     time_t hdrExpirationTime();