]> err.no Git - varnish/commitdiff
Look for s-maxage before max-age. This may need to be revisited.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 5 May 2007 14:44:37 +0000 (14:44 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 5 May 2007 14:44:37 +0000 (14:44 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1386 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/rfc2616.c

index be56c743b8af1821d1295593f2a38707c4b78124..ac46209c4db1cc94894e8bf01aea6d2171d8abd9 100644 (file)
@@ -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)) {