#354 HTMLForm and file uploads

Net (141)

From http://pocoproject.org/forum/viewtopic.php?f=10&t=2265#p4100:

[...] I was [still] having problems getting the client to upload to my server, which was running the Apache Commons fileUpload library. After trying a few different things, I found that the content-disposition tag was causing the problem. When I ran the client using the code I posted previously, each part of the upload message had a content-disposition of "file". After looking through RFC 1867, from my understanding all top-level parts should have a content-disposition of "form-data", then subparts can have a content-disposition of "file". However, since it seems to be fine that each file can be a part in the message with the "form-data" content-disposition, I made a small change in HTMLForm.cpp. In there I changed line 356 from

std::string disp("file; name=\"");


std::string disp("form-data; name=\"");

Making this change fixed my problem, and the code is uploading to the server fine now.


  • fixed in 1.3.7, rev. 1354