From: des Date: Sat, 5 May 2007 14:44:37 +0000 (+0000) Subject: Look for s-maxage before max-age. This may need to be revisited. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86806f1f0b1c4ab0b8ade60ba1ea4c57665c757e;p=varnish Look for s-maxage before max-age. This may need to be revisited. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1386 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/rfc2616.c b/varnish-cache/bin/varnishd/rfc2616.c index be56c743..ac46209c 100644 --- a/varnish-cache/bin/varnishd/rfc2616.c +++ b/varnish-cache/bin/varnishd/rfc2616.c @@ -109,7 +109,8 @@ RFC2616_Ttl(struct sess *sp, struct http *hp, struct object *obj) retirement_age = INT_MAX; u1 = u2 = 0; - if (http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { + if (http_GetHdrField(hp, H_Cache_Control, "s-maxage", &p) || + http_GetHdrField(hp, H_Cache_Control, "max-age", &p)) { u1 = strtoul(p, NULL, 0); u2 = 0; if (http_GetHdr(hp, H_Age, &p)) {