[Varnish] #204: Handling of HTTP headers

Varnish varnish-bugs at projects.linpro.no
Thu Feb 14 10:45:00 CET 2008

#204: Handling of HTTP headers
 Reporter:  des          |        Owner:  phk  
     Type:  enhancement  |       Status:  new  
 Priority:  normal       |    Milestone:       
Component:  varnishd     |      Version:  trunk
 Severity:  normal       |   Resolution:       
 Keywords:               |  
Comment (by des):

 No, we still need {{{Vary}}}, because that is something the server sends,
 so we don't know in advance that we need to add a particular header to the
 hash string.  Doing so systematically would be very inefficient.

 Re {{{Vary: User-Agent}}} for compression (which is the most common use of
 it), I personally think it's a backend bug.  The last time I checked, the
 market share of Netscape 4 (which is the only browser that actually needs
 this) was less than 0.001%.

 The "remove all headers but these" issue can be solved by allowing VCL to
 loop over a list of headers, instead of adding a special-case construct.
 Loops in VCL should be safe as long as we can make sure that the number of
 iterations will always be finite and small.

 Similarly, it would be ''very'' useful to be able to examine, modify and
 remove individual fields of certain headers (primarily {{{Cookie}}} and
 {{{Set-Cookie}}}) instead of having to do regexp substitutions on the full
 header; and it would be equally useful to be able to iterate over them,
 for instance in order to "remove all cookies except the session cookie".

 (speaking of which, what is the value of {{{obj.http.cookie}}} if multiple
 {{{Cookie}}} headers are specified?)

 I completely agree with you that this is mostly a documentation issue.

Ticket URL: <http://varnish.projects.linpro.no/ticket/204#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list