Conversion problem in parse_multipart
Michele Belloli
mkbelloli at libero.it
Tue Sep 30 10:42:21 EDT 2003
Hi folks...
I have a problem uploading a file to a web server.
I created an html page with a multipart/form-data form and used
cgi.parse_multipart function to obtain form data (and obviuosly
uploaded file).
I noticed that if I upload an excutable file, I obtain a file where
0x0a 0x0a, are converted in 0x0a and 0x2e.
Obviously this file is corrupted.
When I save the file, I use 'wb' flags to create a binary file...
Analyzing the file before cgi.parse_multipart, it's possible to
verify that it's correct but when this function tries to extract its
value, 0x0a 0x0a are converted in 0x0a and 02e.
Any suggestion?
Thanks a lot...
More information about the Python-list
mailing list