Mailing List Archive

#1104: Duplicate Date headers
#1104: Duplicate Date headers
-------------------+--------------------------------------------------------
Reporter: Roze | Type: defect
Status: new | Priority: normal
Milestone: | Component: build
Version: trunk | Severity: normal
Keywords: |
-------------------+--------------------------------------------------------
Varnish sends additional Date header with the date when the object was
first fetched (on first request the dates are identical).


{{{
wget -S http://10.0.0.1/251324940.jpg

HTTP/1.1 200 OK
Date: Thu, 08 Mar 2012 17:47:45 GMT
Content-Type: image/jpeg
Last-Modified: Thu, 08 Mar 2012 17:23:43 GMT
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Content-Length: 126142
Date: Thu, 08 Mar 2012 17:47:45 GMT
Age: 0
Connection: keep-alive
}}}

and a second request (after ~10 sec)

{{{
HTTP/1.1 200 OK
Date: Thu, 08 Mar 2012 17:47:45 GMT
Content-Type: image/jpeg
Last-Modified: Thu, 08 Mar 2012 17:23:43 GMT
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Content-Length: 126142
Date: Thu, 08 Mar 2012 17:47:54 GMT
Age: 9
Connection: keep-alive
X-Cache: HIT
}}}

On both requests there are 2 Date headers.
Can be seen also from varnishlog:


{{{
2738 TxResponse c OK
2738 TxHeader c Date: Thu, 08 Mar 2012 17:47:45 GMT
2738 TxHeader c Content-Type: image/jpeg
2738 TxHeader c Last-Modified: Thu, 08 Mar 2012 14:11:23 GMT
2738 TxHeader c Expires: Thu, 31 Dec 2037 23:55:55 GMT
2738 TxHeader c Cache-Control: max-age=315360000
2738 TxHeader c Content-Length: 126142
2738 TxHeader c Date: Thu, 08 Mar 2012 17:47:45 GMT
2738 TxHeader c Age: 0
2738 TxHeader c Connection: keep-alive
}}}

Doesn't happen with 2.1.5.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1104>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1104: Duplicate Date headers [ In reply to ]
#1104: Duplicate Date headers
---------------------+------------------------------------------------------
Reporter: Roze | Type: defect
Status: closed | Priority: normal
Milestone: | Component: build
Version: trunk | Severity: normal
Resolution: fixed | Keywords:
---------------------+------------------------------------------------------
Changes (by Poul-Henning Kamp <phk@…>):

* status: new => closed
* resolution: => fixed


Comment:

(In [e725920a03e5329949635ced22d02f52ab91a5b9]) Remove old Date: header
before adding our new one.

Submitted by: scoof
Fixes #1104

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1104#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs