[Varnish] #1089: Error in wiki page VCLExampleNormalizeUserAgent

Varnish varnish-bugs at varnish-cache.org
Fri Feb 3 15:34:48 CET 2012


#1089: Error in wiki page VCLExampleNormalizeUserAgent
----------------------+-----------------------------------------------------
 Reporter:  semiosis  |        Type:  defect 
   Status:  new       |    Priority:  normal 
Milestone:            |   Component:  website
  Version:            |    Severity:  normal 
 Keywords:            |  
----------------------+-----------------------------------------------------
 This code in the wiki page [wiki:VCLExampleNormalizeUserAgent
 VCLExampleNormalizeUserAgent] has a bug...

 {{{
 sub vcl_fetch {
     ...

     # If you want to see it in the delivered object headers too
     set obj.http.X-UA = req.http.X-UA;   # set beresp.http.X-UA for 2.1+

     # Vary by X-UA, so varnish will keep distinct object copies by X-UA
 value
     set obj.http.Vary = "X-UA";          # set beresp.http.X-UA for 2.1+

     ...
 }
 }}}

 The commented code for 2.1+ is the same on both lines!  The second line's
 comment should set beresp.http.Vary, as in...

 {{{

     set obj.http.Vary = "X-UA";          # set beresp.http.Vary for 2.1+
 }}}

 Thank you for Varnish & keep up the great work :)

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




More information about the varnish-bugs mailing list