Message222117
Please see this paragraph of the spec (my emphasis added):
(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 before any body content. However, this invocation may be performed by the iterable's first iteration, so servers must not assume that start_response() has been called before they begin iterating over the iterable.)
The paragraph you quoted says that start_response() has to buffer headers until a non-empty string is yielded. It does *not* say that strings can be yielded prior to calling start_response(). Indeed, the paragraph I quote above states the opposite: you can't call start_response() before yielding your first body string (whether empty or not).
This is a known issue with the spec, but it's an issue with the *spec*, not the implementation. WSGI 1.0 is known to be unusable as a truly async API, for this and other reasons. |
|
Date |
User |
Action |
Args |
2014-07-02 18:57:06 | pje | set | recipients:
+ pje, rschoon |
2014-07-02 18:57:06 | pje | set | messageid: <1404327426.43.0.268398656559.issue21890@psf.upfronthosting.co.za> |
2014-07-02 18:57:06 | pje | link | issue21890 messages |
2014-07-02 18:57:05 | pje | create | |
|