[Varnish] #866: Multiple headers with the same name on different lines are ignored

Varnish varnish-bugs at varnish-cache.org
Mon Mar 7 23:35:55 CET 2011


#866: Multiple headers with the same name on different lines are ignored
-----------------------------------------------------------------+----------
 Reporter:  soheil                                               |        Type:  defect  
   Status:  new                                                  |    Priority:  high    
Milestone:                                                       |   Component:  varnishd
  Version:  trunk                                                |    Severity:  major   
 Keywords:  multiple headers, same headers, VRT_GetHdr, headers  |  
-----------------------------------------------------------------+----------
 If incoming request contains duplicate headers with different content only
 the first one is accessible to varnish req.http.X-Forwarded-For and
 similarly in C: char *xForwarded = VRT_GetHdr(sp, HDR_REQ, "\020X-
 Forwarded-For:");

 returns only the first occurrence of the specified header.

 A concatenated list of values would seem to be most logical.

 For example if geo-targeting needed to be done in varnish based on
 client's IP address. This would be useful when a load balancer sends
 multiple X-Forwarded-For headers for a request to varnish and only one of
 those values is the IP address of the client.

 An over-generalization in RFC2616, is that headers which contain comma-
 separated lists, can be spread over multiple header lines.

 This is related to but not the same as: http://varnish-
 cache.org/trac/ticket/686

-- 
Ticket URL: <http://varnish-cache.org/trac/ticket/866>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list