durusmail: quixote-users: File upload from Konqueror
File upload from Konqueror
2004-06-08
2004-06-09
2004-06-09
File upload from Konqueror
Jim Dukarm
2004-06-08
I am using the Quixote file upload in my application, and it has been in use
with various recent versions of IE, Netscape, and Opera with no problems.

Today I tried it with Konqueror 3.2.1, and the file upload fails, with the
following error (generated by quixote.upload.parse_body()):

"""Unable to parse HTTP request.
Invalid request: expected Content-Disposition header in body sub-part"""

I have been able to do the same kind of uploads from this same browser to
non-Quixote web sites, so perhaps quixote.upload.py is doing something
"special".

I hacked quixote.upload.HTTPUploadRequest.parse_body() to dump out its file
object, which turns out to look like this:

"""
------------JOc85bJpTWzPuoegl4WRJ3RtQcAmBGeUeEdinuXGOVeIJIz4KTTeWsX
Content-Disposition: form-data; name="new_file"; filename="ocb_examples.csv"
Content-Type: text/x-csv

[several rows of data - contents of my data file - here]

------------JOc85bJpTWzPuoegl4WRJ3RtQcAmBGeUeEdinuXGOVeIJIz4KTTeWsX
Content-Disposition: form-data; name="submit"

Send File
------------JOc85bJpTWzPuoegl4WRJ3RtQcAmBGeUeEdinuXGOVeIJIz4KTTeWsX--

"""

It seems to me that both parts of this have legal Content-Disposition headers,
so I don't understand what is going wrong here.

Anybody have any ideas?

Thanks

Jim Dukarm
DELTA-X RESEARCH
Victoria BC Canada


reply