cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1171 [PATCH] support upload file with ',' or '; ' in the filename

From: Ulion <ulion2002_at_users.sf.net>
Date: Sat, 19 Jan 2013 05:13:54 +0000

After a quick look, libcurl does not do any escape for filename or show_filename (the faked one), it just surrounded it with double quotes in the form header.
if I change test39 param to -F "file=@log/test39.txt;type=moo/foobar;filename=faker\"file"
it will result:
Content-Disposition: form-data; name="file"; filename="faker"file"
the server will only see "faker", the double-quote in filename is not correctly supported by libcurl.

If we need to make it support double-quote in filename, it will be another patch and may affect existed code using libcurl.
This patch only change the way curl command line program parse the filename, do nothing with libcurl, I don't want to mix two problems into one.

---
** [bugs:#1171] [PATCH] support upload file with ',' or ';' in the filename**
**Status:** pending
**Labels:** http 
**Created:** Tue Dec 11, 2012 02:12 AM UTC by Anonymous
**Last Updated:** Sat Jan 19, 2013 12:42 AM UTC
**Owner:** Daniel Stenberg
Here 's a patch, support http form uploading file with ',' or ';' in its filename, by support parse quotes around the file and filename part.
Which does not change the behavior of curl of any existed external usage, just support parse file and filename which is quoted, if the caller does quoting the file or the filename part..
---
Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/curl/bugs/1171/>
To unsubscribe from further messages, please visit <https://sourceforge.net/auth/prefs/>
Received on 2013-01-19

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET