Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-28 Thread Brian Smith
Andrew Clover wrote: > Manlio Perillo wrote: > > what about "requiring" that a WSGI implementation calls the WSGI > > application only when all the request body has been read? > > Regardless of the discussed technical issues, 'no thanks' - > this would make it impossible to write - to choose an

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-28 Thread Andrew Clover
Manlio Perillo wrote: > what about "requiring" that a WSGI implementation calls the WSGI application > only when all the request body has been read? Regardless of the discussed technical issues, 'no thanks' - this would make it impossible to write - to choose an example from production code - a

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Graham Dumpleton
On 28/01/2008, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On 28/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > > Graham Dumpleton wrote: > > > On 26/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > > > As to your questions about read() with no argument, or with > > > traditional Python file

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Graham Dumpleton
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 onl

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Brian Smith
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

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Manlio Perillo
Graham Dumpleton ha scritto: > On 27/01/2008, Manlio Perillo <[EMAIL PROTECTED]> wrote: >> Graham Dumpleton ha scritto: >>> [...] >> > >>> I have brought up the issue of chunked encoding and mutating input >>> filters previously, whether they be implemented in Apache or as WSGI >>> middleware. For

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Graham Dumpleton
On 27/01/2008, Manlio Perillo <[EMAIL PROTECTED]> wrote: > Graham Dumpleton ha scritto: > > [...] > > > > > > I have brought up the issue of chunked encoding and mutating input > > filters previously, whether they be implemented in Apache or as WSGI > > middleware. For the outcome of that discussi

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Graham Dumpleton
On 28/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > On 26/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > > As to your questions about read() with no argument, or with > > traditional Python file like object default of -1, the only > > WSGI server/adapter I know of

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Brian Smith
Graham Dumpleton wrote: > On 26/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > As to your questions about read() with no argument, or with > traditional Python file like object default of -1, the only > WSGI server/adapter I know of where this will NOT work as one > would expect, ie., read re

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-27 Thread Manlio Perillo
Graham Dumpleton ha scritto: > [...] > > > I have brought up the issue of chunked encoding and mutating input > filters previously, whether they be implemented in Apache or as WSGI > middleware. For the outcome of that discussion see: > > > http://groups.google.com/group/python-web-sig/browse

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-26 Thread Graham Dumpleton
On 26/01/2008, Brian Smith <[EMAIL PROTECTED]> wrote: > 1. PEP 333 doesn't indicate that the size parameter for the read() method is > optional. Is it optional or required? If it is optional, is the default value > -1? > > 2. What are the semantics of environ["wsgi.input"].read(-1) when > Conten

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-25 Thread Brian Smith
James Y Knight wrote: > On Jan 25, 2008, at 10:04 AM, Brian Smith wrote: > > 1. PEP 333 doesn't indicate that the size parameter for the read() > > method is optional. Is it optional or required? If it is > > optional, is the default value -1? > > The spec says it's required (by virtue of not sa

Re: [Web-SIG] environ["wsgi.input"].read()

2008-01-25 Thread James Y Knight
On Jan 25, 2008, at 10:04 AM, Brian Smith wrote: > 1. PEP 333 doesn't indicate that the size parameter for the read() > method is optional. Is it optional or required? If it is optional, > is the default value -1? The spec says it's required (by virtue of not saying it's optional) > 2. What a

[Web-SIG] environ["wsgi.input"].read()

2008-01-25 Thread Brian Smith
1. PEP 333 doesn't indicate that the size parameter for the read() method is optional. Is it optional or required? If it is optional, is the default value -1? 2. What are the semantics of environ["wsgi.input"].read(-1) when Content-Length is provided? Is it guaranteed to return the entire reque