[Web-SIG] [extension] x-wsgiorg.flush

Manlio Perillo manlio_perillo at libero.it
Mon Oct 8 18:25:00 CEST 2007

Phillip J. Eby ha scritto:
> [...]
> I don't think there's any point to having a WSGI extension for If-* 
> header support.  

I have just found that the WSGI spec says:
"""...it should be clear that a server may handle cache validation via 
the If-None-Match and If-Modified-Since request headers and the 
Last-Modified and ETag response headers."""

So a WSGI implementation is *allowed* to perform cache validation, but 
it is not clear *how* this should be done.

As an example, without the need of an extension, the start_response 
callable may check if Last-Modified or ETag is in the headers.
In this case, it may perform a cache validation, and if the client 
representation is fresh, it may omit to send the body.

However there are two problems here:
1) It is not clear if WSGI explicitly allows an implementation to skip
    the iteration over the app_iter object, for optimization purpose
2) For a WSGI implementation embedded in an existing webserver, the
    most convenient method to perform cache validation is to let the
    server do it; however this requires to send the headers as soon as
    start_response is called, and this is not allowed.

Regards  Manlio Perillo

More information about the Web-SIG mailing list