r230 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Sat Jun 24 23:42:27 CEST 2006


Author: phk
Date: 2006-06-24 23:42:27 +0200 (Sat, 24 Jun 2006)
New Revision: 230

Modified:
   trunk/varnish-cache/bin/varnishd/rfc2616.c
Log:
Truncate TTLs in the past to now.


Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/rfc2616.c	2006-06-24 21:09:07 UTC (rev 229)
+++ trunk/varnish-cache/bin/varnishd/rfc2616.c	2006-06-24 21:42:27 UTC (rev 230)
@@ -80,7 +80,9 @@
 		ttl = h_expires;
 	if (ttl == 0)
 		ttl = t_resp + heritage.default_ttl;
-	printf("TTL: %d (+%d)\n", ttl, ttl - t_resp);
+	printf("TTL: %d (%+d)\n", ttl, ttl - t_resp);
+	if (ttl < t_resp)
+		return (t_resp);
 
 	return (ttl);
 }




More information about the varnish-commit mailing list