[Varnish] #970: partial content code 206 - visible as '206' in varnishncsa and as '200' from VCL code

Varnish varnish-bugs at varnish-cache.org
Wed Aug 10 14:00:57 CEST 2011


#970: partial content code 206 - visible as '206' in varnishncsa and as '200'
from VCL code
-------------------------------------------------+--------------------------
 Reporter:  jhalfmoon                            |        Owner:  phk    
     Type:  defect                               |       Status:  closed 
 Priority:  normal                               |    Milestone:         
Component:  varnishd                             |      Version:  3.0.0  
 Severity:  normal                               |   Resolution:  invalid
 Keywords:  206 partial content varnishncsa vcl  |  
-------------------------------------------------+--------------------------
Changes (by phk):

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


Comment:

 I've thought about this issue a bit, and I think I have reached a
 conclusion.

 There are a number of optimizations we can enable during delivery, most
 importantly (and presently only implemented:) Conditionals (If-Modified-
 Since etc) and Range delivery.  In both cases, a 200 gets turned into
 something else to indicate the optimization.

 If we exposed 206/304 to VCL and the VCL removes the headers they depend
 on, we would have to fall back to 200 again efter VCL returns.

 There is simply no way to ensure that VCL knows the actual return status
 100% consistently, without disabling parts of VCL that may be useful to
 people.

 I understand from your emails, that you ran into this because you try to
 collect your log-data from VCL code, rather than to pick it up from VSL.
 While I can appreciate the reasons you may have taken this shortcut, I do
 not condone it, and I do not see it as a valid reason to make VCL writing
 more tricky for users in general.

 I have therefore decided, that we will not expose 206/304 in VCL.  VCL
 will see only the 200 status, and the delivery code will, headers
 permitting, try to optimize with 206/304 (or, come to think of it: Gzip)
 and actual status will be logged to the VSL.

-- 
Ticket URL: <http://varnish-cache.org/trac/ticket/970#comment:3>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list