[Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Jim Fulton
I'm a bit unclear about the timing of the start_response call. I think this is because the PEP is unclear, but perhaps I missed something. It doesn't appear that the PEP says when the start_response callable must be called. It gives several examples. In most, the callback is called when the appli

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Ian Bicking
Jim Fulton wrote: > I'm a bit unclear about the timing of the start_response call. > I think this is because the PEP is unclear, but perhaps I missed > something. > > It doesn't appear that the PEP says when the start_response callable > must be called. It gives several examples. In most, the cal

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread James Y Knight
On Dec 15, 2005, at 3:01 PM, Jim Fulton wrote: > Normally an application will call the start_response callable when the > application is called or when the result iterator is constructed, as > shown in the first 2 examples. An application, or more commonly, a > middleware component that provides it

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Jim Fulton
James Y Knight wrote: > On Dec 15, 2005, at 3:01 PM, Jim Fulton wrote: > >> Normally an application will call the start_response callable when the >> application is called or when the result iterator is constructed, as >> shown in the first 2 examples. An application, or more commonly, a >> middle

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Phillip J. Eby
At 03:01 PM 12/15/2005 -0500, Jim Fulton wrote: >I'm a bit unclear about the timing of the start_response call. >I think this is because the PEP is unclear, but perhaps I missed >something. > >It doesn't appear that the PEP says when the start_response callable >must be called. It gives several ex

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Phillip J. Eby
At 03:29 PM 12/15/2005 -0500, James Y Knight wrote: >I was led to believe this was a valid thing to do from the following >wording: > > (Note: the application must invoke the start_response() callable > > before the iterable yields its first body string, so that the > > server can send the headers

Re: [Web-SIG] When must applications call the WSGI start_response callable.

2005-12-15 Thread Jim Fulton
Ian Bicking wrote: > Jim Fulton wrote: ... >> Why do I want this? It appears that this would be needed to enable >> middleware components that manage application threads. I can imagine >> though that there aren't any existing servers that handle what I've >> suggested correctly. >> >> I do think