Author pje
Recipients pje, rschoon
Date 2014-07-02.18:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404327426.43.0.268398656559.issue21890@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-02 18:57:06pjesetrecipients: + pje, rschoon
2014-07-02 18:57:06pjesetmessageid: <1404327426.43.0.268398656559.issue21890@psf.upfronthosting.co.za>
2014-07-02 18:57:06pjelinkissue21890 messages
2014-07-02 18:57:05pjecreate