[Web-SIG] Prototype of wsgi.input.readline().

Tres Seaver tseaver at palladion.com
Thu Jan 31 10:06:42 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Graham Dumpleton wrote:
> On 31/01/2008, Chris McDonough <chrism at plope.com> wrote:

<snip>

>> cgi.FieldStorage doesn't call readline() without an argument.
>> cgi.parse_multipart does, but this function is not used by cgi.FieldStorage.  I
>> don't know if this changes anything.
> 
> Not really, I should have said 'cgi' module as a whole rather than
> specifically cgi.FieldStorage. Given that people might be using
> cgi.parse_multipart in standard CGI, there would probably still be an
> expectation that it worked for WSGI. We can't really say that you can
> use cgi.FieldStorage but not cgi.parse_multipart. People will just
> expect all the normal tools people would use for this to work.

cgi.parse_multipart is now deprecated (at least in Python 2.4.4 and
2.5.1) (per the bugreport), with the following in its docstring:


   XXX This should really be subsumed by FieldStorage altogether -- no
   point in having two implementations of the same parsing algorithm.
   Also, FieldStorage protects itself better against certain DoS attacks
   by limiting the size of the data read in one chunk.  The API here
   does not support that kind of protection.  This also affects parse()
   since it can call parse_multipart().



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHoY+i+gerLs4ltQ4RAh9yAJoDUcMc2aIzmBXWx7TnLV2flhAU/QCeNpDy
r6FyJT6s6L6QAfpxA0Ss5+E=
=jkNC
-----END PGP SIGNATURE-----



More information about the Web-SIG mailing list