POST method, CGI and file transfer

Robert Brewer fumanchu at
Sat Sep 4 20:57:49 CEST 2004

Michael Foord wrote:
> Another http question.
> First one is simple - if a POST is made *to* a CGI with file uplaods
> then you can get a FieldStorage with list values - each entry in the
> list being a file. Two questions about this :
> 1) Is this the only situation you'll get list values posted to a CGI ?
> If you have a list value in your FieldStorage instance can you be sure
> that it's files ?

If I understand your question correctly, the answer is no. Regardless of
whether you use GET or POST, you can submit something like
"/script.cgi?value=1&value=2&value=3" and expect a list: value = [1, 2,
3]. This behavior was around long before file uploads. ;)

Robert Brewer
Amor Ministries
fumanchu at 

More information about the Python-list mailing list