Mailing Lists
|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[curl:bugs] #1294 curl has a problem with pct-encoded remote filenames
From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Tue, 05 Nov 2013 09:15:58 +0000
Right, this is what src/tool_cb_hdr.c:parse_filename() does.
It really makes no effort to decode that into something else. It could possibly be seen as a missing feature rather than a bug.
I'm interested in getting patches that fixes this.
--- ** [bugs:#1294] curl has a problem with pct-encoded remote filenames** **Status:** open-confirmed **Labels:** header encoding **Created:** Thu Oct 31, 2013 09:03 PM UTC by Dennis **Last Updated:** Thu Oct 31, 2013 09:03 PM UTC **Owner:** Daniel Stenberg Curl has problems with -J -O options if the remote name is pct-encoded. The pct-encoded filenames remain in their raw form. Version is: curl 7.23.1 (x86_64-pc-win32) libcurl/7.23.1 OpenSSL/0.9.8r zlib/1.2.5. Here's an example of verbose output. < HTTP/1.1 302 Found < Date: Thu, 31 Oct 2013 18:42:04 GMT < Server: Apache < Cache-Control: max-age=0, no-cache, no-store < Pragma: no-cache < P3P: CP="NON DSP COR TAIa IVAa IVDa OUR BUS UNI" < Referer: http://www.coasttocoastam.com < Content-disposition: attachment; filename=Coast%20to%20Coast%20-%20Feb%2027%202013%20-%20Hour%201.mp3 The file was saved as "Coast%20to%20Coast%20-%20Feb%2027%202013%20-%20Hour%201.mp3" rather than "Coast to Coast - Feb 27 2013 - Hour 1.mp3". Per RFC5987, spaces should be pct-encoded in header values. Sorry I cannot offer a patch (not a c programmer), but it does look to my limited reading knowledge of c that the patch is needed in curl/src/tool_cb_hdr.c in the routine: static char *parse_filename(const char *ptr, size_t len) --- Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.Received on 2013-11-05 These mail archives are generated by hypermail. |
Page updated May 06, 2013.
web site info