[3.0] 201bc8d Remove old Date: header before adding our new one.

Tollef Fog Heen tfheen at varnish-cache.org
Thu May 24 14:47:43 CEST 2012


commit 201bc8d88a1f85f6caa97da94a8a6bf951afdbe2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Mar 9 09:58:41 2012 +0000

    Remove old Date: header before adding our new one.
    
    Submitted by:	scoof
    Fixes		#1104

diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c
index 37459d7..5a0ee9e 100644
--- a/bin/varnishd/cache_response.c
+++ b/bin/varnishd/cache_response.c
@@ -133,6 +133,7 @@ RES_BuildHttp(const struct sess *sp)
 		http_SetHeader(sp->wrk, sp->fd, sp->wrk->resp,
 		    "Transfer-Encoding: chunked");
 
+	http_Unset(sp->wrk->resp, H_Date);
 	TIM_format(TIM_real(), time_str);
 	http_PrintfHeader(sp->wrk, sp->fd, sp->wrk->resp, "Date: %s", time_str);
 



More information about the varnish-commit mailing list