[Web-SIG] Is the size argument to the input-stream read method optional?

Ian Bicking ianb at colorstudy.com
Wed Dec 28 19:14:25 CET 2005


James Y Knight wrote:
>>>> The PEP is unclear on this and should be clarified, IMO.
>>>>
>>>
>>>
>>> My experience in using implementations is many servers do not require
>>> the read size argument (they don't give a TypeError), but they block
>>> without it, or if you read past CONTENT_LENGTH.  So it should  probably
>>> be required in the spec, since it's required in practice.
>>>
>>
>> Does this constitude a decision?  Can somebody update the PEP?
>> I am able and willing to if requested to. :)
> 
> 
> Surely that's a bug in the server, not the spec? Indeterminate length  
> uploads (with transfer-encoding chunked) are allowed by HTTP, after  
> all. The CGI spec explicitly rejects such requests, but WSGI doesn't  
> seem to.

But while it is possible, if an application uses this then it won't be 
portable, right?  I think chunking has been explicitly excluded from 
WSGI too, as something that should be handled/isolated in the server. 
Not that I really know much about chunking, except that it was discussed 
at one point.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the Web-SIG mailing list