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.
Re: wcurl default filename: index.html vs. curl_response
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Ray Satiro via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 26 Nov 2024 02:05:52 -0500
On 11/25/2024 6:24 PM, Samuel Henrique via curl-library wrote:
> We are working on having wcurl automatically percent-decode output
> filenames[0], and we can also decide which filename we want to use as a
> default (without relying on a recent curl release), the two options are 1)
> index.html and 2) curl_response.
>
> I don't think there's much to discuss, the benefit of using option 1 is to be
> closer to wget, while the benefits of using option 2 are best described on this
> comment by bagder[1]:
>
>> 1. mentions curl (answers who saved it)
>> 2. says it is a response
>> 3. does not use an extension (because people will think the extension means
>> something)
> dfrandrich made a point about overwriting files, but for wcurl that would not
> be an issue as it uses --no-clobber by default.
>
> I was initially tempted to go with curl_response, but having it as index.html
> makes it easier for wcurl to be a drop-in replacement to wget and I'm currently
> divided between the two options.
>
> Do curl developers have any opinion on this?
> Me and sergiodj can certainly make a decision ourselves, but it's important to
> to at least check if you're not against any of those two options.
>
> Non-curl developers, also feel free to reply with your opinions.
>
> [0]https://salsa.debian.org/debian/wcurl/-/merge_requests/4
> [1]https://github.com/curl/curl/pull/13988#issuecomment-2186989819
I think that wcurl should not be constrained by choices we make for
curl. In other words, your wrapper script should be able to do what it
wants and if that's easier for you, or it's more intuitive for wget
users, then I have no problem with it.
I suspect however that it will not be easier. There will be some logic
required to detect the default filename because it's far more likely in
case of a default that the user gave a URL that curl uses to set the
filename to the last directory in the path. For example `-O
http://host/foo/bar` and `-O http://host/foo/bar/` are both saved as bar.
Date: Tue, 26 Nov 2024 02:05:52 -0500
On 11/25/2024 6:24 PM, Samuel Henrique via curl-library wrote:
> We are working on having wcurl automatically percent-decode output
> filenames[0], and we can also decide which filename we want to use as a
> default (without relying on a recent curl release), the two options are 1)
> index.html and 2) curl_response.
>
> I don't think there's much to discuss, the benefit of using option 1 is to be
> closer to wget, while the benefits of using option 2 are best described on this
> comment by bagder[1]:
>
>> 1. mentions curl (answers who saved it)
>> 2. says it is a response
>> 3. does not use an extension (because people will think the extension means
>> something)
> dfrandrich made a point about overwriting files, but for wcurl that would not
> be an issue as it uses --no-clobber by default.
>
> I was initially tempted to go with curl_response, but having it as index.html
> makes it easier for wcurl to be a drop-in replacement to wget and I'm currently
> divided between the two options.
>
> Do curl developers have any opinion on this?
> Me and sergiodj can certainly make a decision ourselves, but it's important to
> to at least check if you're not against any of those two options.
>
> Non-curl developers, also feel free to reply with your opinions.
>
> [0]https://salsa.debian.org/debian/wcurl/-/merge_requests/4
> [1]https://github.com/curl/curl/pull/13988#issuecomment-2186989819
I think that wcurl should not be constrained by choices we make for
curl. In other words, your wrapper script should be able to do what it
wants and if that's easier for you, or it's more intuitive for wget
users, then I have no problem with it.
I suspect however that it will not be easier. There will be some logic
required to detect the default filename because it's far more likely in
case of a default that the user gave a URL that curl uses to set the
filename to the last directory in the path. For example `-O
http://host/foo/bar` and `-O http://host/foo/bar/` are both saved as bar.
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-11-26