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 request entity, up to at most <Content-Length> bytes? 3. What are the semantics of environ["wsgi.input"].read(-1) when the response has no Content-Length? Can environ["wsgi.input"].read(-1) be used (as the only available mechanism) to read a chunked response entity? Putting all this together, are these two programs correct?: def application(environ, start_response): start_response("200 OK", []) yield environ["wsgi.input"].read() def application(environ, start_response): start_response("200 OK", []) yield environ["wsgi.input"].read(-1) This is another issue where there is a lot of variance between gateways, where I think a clarification in the specification is needed. - Brian _______________________________________________ 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