New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No support for utf-8 encoded filenames in Content-Disposition #1888
Labels
Comments
Line 98 in 87501e5
|
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 16, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Closes curl#1888 Reported-by: devbazilio
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 16, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Closes curl#1888 Reported-by: devbazilio
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 17, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Closes curl#1888 Reported-by: devbazilio
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 18, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition as utf-8 with a blank language tag, e.g. filename*=utf-8''foo%C2%AE, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Replacing memcmp with curl_strnequal also adds case insensitivity to filename and filename* parameters as is specified in RFC6266 section 4.3. Closes curl#1888 Reported-by: devbazilio
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 21, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition as utf-8 with a blank language tag, e.g. filename*=utf-8''foo%C2%AE, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Replacing memcmp with curl_strnequal also adds case insensitivity to filename and filename* parameters as is specified in RFC6266 section 4.3. Closes curl#1888 Reported-by: devbazilio
reidwagner
added a commit
to reidwagner/curl
that referenced
this issue
Oct 21, 2017
If -J, --remote-header-name is specified, and filename* is given in Content-Disposition as utf-8 with a blank language tag, e.g. filename*=utf-8''foo%C2%AE, it is decoded by libcurl's curl_easy_unescape according to RFC 3986 and used as the filename for -O, --remote-name. A UTF-8 filename* takes precedence over an ASCII filename (no asterisk) if both are specified. Replacing memcmp with curl_strnequal also adds case insensitivity to filename and filename* parameters as is specified in RFC6266 section 4.3. Closes curl#1888 Reported-by: devbazilio
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Content-Disposition: attachment; filename*=UTF-8''1.mp4
curl -JLO "SomeURL" ignores sent filename in headers.
This option is documented in RFC https://tools.ietf.org/html/rfc6266#page-7
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
OS: ubuntu 18.0 x64
The text was updated successfully, but these errors were encountered: