From: Amos Jeffries Date: Sat, 23 May 2009 13:40:07 +0000 (+1200) Subject: Author: Henrik Nordstrom X-Git-Tag: SQUID_3_2_0_1~1000 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46edb3c1351230328021ff065f5d5052438d2076;p=thirdparty%2Fsquid.git Author: Henrik Nordstrom Bug 2481: Don't set expires: now in generated error responses Sending Expires: "now" overrides any negative cache logics which may be present in downstream caches and is a bad idea. Better to send the responses without any explicit expiry information. --- diff --git a/src/errorpage.cc b/src/errorpage.cc index f1cb105b44..d1e5a4aebc 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -870,7 +870,7 @@ ErrorState::BuildHttpReply() if (strchr(name, ':')) { /* Redirection */ - rep->setHeaders(version, HTTP_MOVED_TEMPORARILY, NULL, "text/html", 0, 0, squid_curtime); + rep->setHeaders(version, HTTP_MOVED_TEMPORARILY, NULL, "text/html", 0, 0, -1); if (request) { char *quoted_url = rfc1738_escape_part(urlCanonical(request)); @@ -880,7 +880,7 @@ ErrorState::BuildHttpReply() httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%d %s", httpStatus, "Access Denied"); } else { MemBuf *content = BuildContent(); - rep->setHeaders(version, httpStatus, NULL, "text/html", content->contentSize(), 0, squid_curtime); + rep->setHeaders(version, httpStatus, NULL, "text/html", content->contentSize(), 0, -1); /* * include some information for downstream caches. Implicit * replaceable content. This isn't quite sufficient. xerrno is not