At 04:10 PM 10/4/2007 +0200, Manlio Perillo wrote:
>Graham Dumpleton ha scritto:
> > [...]
> >> The idea was to allow an application to change its mind about the
> >> headers until it had committed to writing data.  That is, to allow
> >> the application to do error handling for as long as possible before
> >> the server has to do it.
> >
> > But once you have called start_response() you cant call it a second
> > time to change the values so how could the application change its
> > mind?
>
>In my implementation of WSGI for nginx, start_response setups the
>headers on the request object, but calls ngx_http_send_header only when
>the first not empty string is yielded.
>
>This means that if an error occurs, the "old" headers are kept in the
>response (and sent to the client); nginx will simply change the status
>code to '500 INTERNAL ERROR'.

It's not clear to me from this statement whether you're supporting 
the exc_info argument as described here:

http://www.python.org/dev/peps/pep-0333/#the-start-response-callable

and here:

http://www.python.org/dev/peps/pep-0333/#error-handling


_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to