[4.0] e99b5cf Only attempt IMS on status=200 objects.

Poul-Henning Kamp phk at FreeBSD.org
Tue Jun 24 11:31:38 CEST 2014


commit e99b5cfd886ec38a7f883e23ba516063cf4c16f8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Apr 25 11:42:37 2014 +0000

    Only attempt IMS on status=200 objects.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 5a0a9ff..e61a007 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -199,7 +199,7 @@ vbf_stp_mkbereq(const struct worker *wrk, struct busyobj *bo)
 		http_CopyHome(bo->bereq0);
 	}
 
-	if (bo->ims_obj != NULL) {
+	if (bo->ims_obj != NULL && bo->ims_obj->http->status == 200) {
 		if (http_GetHdr(bo->ims_obj->http, H_Last_Modified, &p)) {
 			http_PrintfHeader(bo->bereq0,
 			    "If-Modified-Since: %s", p);



More information about the varnish-commit mailing list