[Web-SIG] serving (potentially large) files through wsgi?
Ian Bicking
ianb at colorstudy.com
Mon Dec 17 18:57:31 CET 2007
Manlio Perillo wrote:
> Chris Withers ha scritto:
>> Manlio Perillo wrote:
>>> 2) handle the range request in the WSGI application.
>>> Its not hard as long as you do not implement multiple ranges support.
>>>
>>> If your object database supports seeks, this should be the most
>>> efficient solution.
>> This is probably what's wanted. So, if a wsgi app does its own range
>> handling, the wsgi server won't interfere?
>>
>
> Yes, it should not interfere (well, with mod_wsgi for nginx it *will*
> interfere if you enable the wsgi_allow_ranges directive).
You should be able to detect whether interference is allowed based on
the response status, shouldn't you? That is, if there is a range
request and the application replies 200 OK, you can change that and
apply the ranges. But if the application replies with 206 Partial
Content then the range has already been applied and the server shouldn't
do anything to it.
--
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org
More information about the Web-SIG
mailing list