* Graham Dumpleton wrote: > > On 20 Jan 2016, at 10:25 PM, André Malo <n...@perlig.de> wrote:
> > Regarding chunked requests - in my own WSGI implementation I went the > > most pragmatic way and simply provided a CONTENT_LENGTH of -1 for unknown > > request sizes (it maps very well to file.read(size)). Something like this > > would be my suggestion for a future WSGI spec. > > I am assuming here you mean that -1 means return whatever you have > available, or block until you have something. > > Problem with that is that some implementations will use -1 as a default > value to mean no argument supplied and so read all input. That was actually the idea. It has the same semantics (as in file.read(int(environ['CONTENT_LENGTH'])). Since -1 is not covered by RFC 3875, it should not break much as well (*cough*). > > So that could well conflict with some implementations. > > Also, if it is going to block, how is it really different to reading with a > block size. It's not. It's a signal, that the gateway has no idea about the size of the request body and you (as the application) should not make any assumptions. You wouldn't read(-1) a file of unknown size either. Cheers, nd -- Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook! Ook! Ook? Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: https://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com