Commit 7c0fc9fa authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Look for s-maxage before max-age. This may need to be revisited.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1386 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 601d90e1
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment