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

Manlio Perillo manlio_perillo at libero.it
Wed Oct 3 19:03:46 CEST 2007

Phillip J. Eby ha scritto:
> Thinking about this made me realize that WSGI 2.0 isn't going to be able 
> to validate *anything* about a response by raising an error in the 
> application, because everything is done after the code returns.

In this case, if the cache validation fails, we just have to generate 
the body content.

For which cases do you want to raise an exception?

> That suggests to me that these sorts of errors should be handled by 
> changing the response sent to the browser, instead.  

In this case Nginx, when the cache is fresh, should change the response 
code from 200 (OK) to 304 (Not Modified).

If I'm right, the current WSGI spec does not forbids or allows this.

> That is, sending an 
> internal error message to the browser and logging details of the problem.

Regards  Manlio Perillo

More information about the Web-SIG mailing list