[Varnish] #786: ESI includes don't follow 301 and 302 redirects

Varnish varnish-bugs at varnish-cache.org
Thu Sep 30 00:08:39 CEST 2010


#786: ESI includes don't follow 301 and 302 redirects
----------------------------+-----------------------------------------------
 Reporter:  jorgen@…        |       Owner:  phk                              
     Type:  defect          |      Status:  new                              
 Priority:  normal          |   Milestone:                                   
Component:  varnishd        |     Version:  2.1.3                            
 Severity:  normal          |    Keywords:  varnishd, esi, redirect, 301, 302
----------------------------+-----------------------------------------------
 When using <esi:include src="http://localhost/test"> and
 http://localhost/test responds with an HTTP 301 or 302 redirect, the
 content of the 301 or 302 response is included, not the content of the
 resource given in the Location header. This can give results like this:

 <body>
 <p>ESI test</p>
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 <html><head>
 <title>301 Moved Permanently</title>
 </head><body>
 <h1>Moved Permanently</h1>
 <p>The document has moved <a href="http://localhost/test/">here</a>.</p>
 </body></html>
 </body>

 The source in this case was

 <body>
 <p>ESI test</p>
 <esi:include src="http://localhost/test">
 </body>

 In my opinion, the redirects should be followed. If that causes
 performance loss, it should be possible to configure varnish to turn on or
 off redirect following in ESI includes.

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




More information about the varnish-bugs mailing list