New submission from Vincent Caloone:

For "large" POST request (> 25 ko), cgi.FieldStorage() doesn't contains all 
field in the html form. When we trace the root of the issue, it is located in 
file server.py : 

if self.command.lower() == "post" and nbytes > 0:
    data = self.rfile.read(nbytes)

the size of 'rfile' is less than the number of byte we attemp to read 'nbyte' 
with is corresponding to the Content-Length of the POST request header.

Issue seems to be linked with buffering since changing rbufsize from 0 to -1 : 

    # Make rfile unbuffered -- we need to read one line and then pass
    # the rest to a subprocess, so we can't use buffered input.
    #rbufsize = 0
    rbufsize = -1 

stop the issue. Any idea of the real root of this issue ?

Many thanks.

----------
messages: 250479
nosy: Vincent Caloone
priority: normal
severity: normal
status: open
title: CGI large POST data string truncated
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25072>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to