On 28/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote:
> Manlio Perillo wrote:
> > Graham Dumpleton ha scritto:
> > > On 27/01/2008, Manlio Perillo <[EMAIL PROTECTED]> wrote:
> > >> This is just a suggestion, but what about "requiring" that a WSGI
> > >> implementation calls the WSGI application only when all
> > >> the request body has been read?
> > >
> > > Can't do that. The input content could be dependent on partial
> > > response content which has already been returned by the WSGI
> > > application. Ie., something which streams in both ways.
> >
> > Can you make an example of this use case?
>
> PEP 333 allows the WSGI gateway to buffer the input if it chooses to do
> so: "The server or gateway may perform reads on-demand as requested by
> the application, or it may pre- read the client's request body and
> buffer it in-memory or on disk, or use any other technique for providing
> such an input stream, according to its preference."

But doing that sort of defeats the purpose of using chunked input and
would disallow use cases where delivery of the request content is
delivered in distinct blocks over an extended time but must be
consumed immediately and not when all is available. This is on top of
use case always mentioned whereby future request content may be
dependent in some way of response content already delivered back to
the client.

I know these are theoretical cases and people using these techniques
may be few and far between, but didn't want to be putting limitations
on things.

Graham
_______________________________________________
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