/*
- * 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.
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;
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();
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();