[master] 730e185 clarifying comments
Nils Goroll
nils.goroll at uplex.de
Thu May 21 12:49:42 CEST 2015
commit 730e185aa1d808a9c3f9fccece6747158ba84d13
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed May 20 12:18:00 2015 +0200
clarifying comments
diff --git a/bin/varnishd/cache/cache_rfc2616.c b/bin/varnishd/cache/cache_rfc2616.c
index d3ea762..df58054 100644
--- a/bin/varnishd/cache/cache_rfc2616.c
+++ b/bin/varnishd/cache/cache_rfc2616.c
@@ -113,7 +113,13 @@ RFC2616_Ttl(struct busyobj *bo, double now)
break;
case 302: /* Moved Temporarily */
case 307: /* Temporary Redirect */
- expp->ttl = -1.;
+ /*
+ * https://tools.ietf.org/html/rfc7231#section-6.1
+ *
+ * Do not apply the default ttl, only set a ttl if Cache-Control
+ * or Expires are present. Uncacheable otherwise.
+ */
+ expp->ttl = -1.; /* fall through */
case 200: /* OK */
case 203: /* Non-Authoritative Information */
case 204: /* No Content */
More information about the varnish-commit
mailing list