Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
FR: curl CLI: -O/--remote-name: Decode output filename
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Samuel Henrique via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 11 Aug 2024 04:39:52 +0300
Hello everyone,
This feature request comes from a discussion we've had in wcurl:
https://salsa.debian.org/debian/wcurl/-/merge_requests/4
It's about performing the decoding of the output filename when -O is used, so
for example, if I call:
$ curl -O example.com/filename%20with%20spaces.txt
I would like to be able to get as the output file:
"filename with spaces.txt" instead of "filename%20with%20spaces.txt".
trurl already does that:
$ trurl -g '{path}' example.com/filename%20with%20spaces.txt
/filename with spaces.txt
trurl also (correctly) refuses to decode bad characters such as %0A. This was
pointed out by Ryan in the wcurl MR.
During the curl Debian maintainers BoF
(https://debconf24.debconf.org/talks/173-curl-maintainers-bof/), we realized
that it was a good idea to check if it makes sense to have the feature in the
curl CLI instead of doing it on wcurl only.
It does seems like this type of behavior change could be applied to
-O/--remote-name without having to introduce a new parameter just for this,
what do you think?
Cheers,
Date: Sun, 11 Aug 2024 04:39:52 +0300
Hello everyone,
This feature request comes from a discussion we've had in wcurl:
https://salsa.debian.org/debian/wcurl/-/merge_requests/4
It's about performing the decoding of the output filename when -O is used, so
for example, if I call:
$ curl -O example.com/filename%20with%20spaces.txt
I would like to be able to get as the output file:
"filename with spaces.txt" instead of "filename%20with%20spaces.txt".
trurl already does that:
$ trurl -g '{path}' example.com/filename%20with%20spaces.txt
/filename with spaces.txt
trurl also (correctly) refuses to decode bad characters such as %0A. This was
pointed out by Ryan in the wcurl MR.
During the curl Debian maintainers BoF
(https://debconf24.debconf.org/talks/173-curl-maintainers-bof/), we realized
that it was a good idea to check if it makes sense to have the feature in the
curl CLI instead of doing it on wcurl only.
It does seems like this type of behavior change could be applied to
-O/--remote-name without having to introduce a new parameter just for this,
what do you think?
Cheers,
-- Samuel Henrique <samueloph> -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-08-11