From: Amos Jeffries Date: Sat, 6 Jun 2009 10:03:04 +0000 (+1200) Subject: Author: Henrik Nordstrom X-Git-Tag: SQUID_3_0_STABLE16~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6350577bfaf4dcc843b2c3ed93f93b7ec7d8d5a;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 315fa08275..ca49860d7d 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -860,7 +860,7 @@ errorBuildReply(ErrorState * err) 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 (err->request) { char *quoted_url = rfc1738_escape_part(urlCanonical(err->request)); @@ -870,7 +870,7 @@ errorBuildReply(ErrorState * err) httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%d %s", err->httpStatus, "Access Denied"); } else { MemBuf *content = errorBuildContent(err); - rep->setHeaders(version, err->httpStatus, NULL, "text/html", content->contentSize(), 0, squid_curtime); + rep->setHeaders(version, err->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