[Web-SIG] serving (potentially large) files through wsgi?

Brian Smith brian at briansmith.org
Wed Dec 19 02:21:04 CET 2007


Phillip J. Eby wrote:
> Range support would be a good example of something 
> where an option isn't necessary, since properly-written Range 
> support in the server should be able to tell when the 
> application has already handled the necessary range-ing of 
> the output.  Thus, having an option to turn it on or off is 
> clearly a bad idea, as compared to making sure that the Range 
> support is correct in the first place.

Exactly. If the application already returned 206 Partial Content then
you have to assume that they returned, um, partial content. If they
returned 200 OK then you have to assume that they returned a full
response. At that point, you can examine the cache validators and Vary
headers in the response to determine whether or not it is safe to
convert the response into a 206. That is all explained in RFC 2616.
There is not much room for configuration.

- Brian



More information about the Web-SIG mailing list