Skip to main content

in reply to daniel:// stenberg://

No, "default" is not a good way to go.
Maybe only use the basename from the URL when possible or otherwise fail?
in reply to Andreas Neustifter

that's what it currently does. Which people then find terribly annoying when they give curl a thousand URLs to download and three of them end with a slash...
This entry was edited (5 months ago)
in reply to daniel:// stenberg://

Then 2 of the 3 files would be overwritten. "default.XXXX" with some random XXXX would solve that...
in reply to daniel:// stenberg://

I don't like the idea of overwriting by default in the first place, even less when the filename isn't explicit.

I too would vote for the parent name (as if there was no slash, and in some cases both are the same). Other than that, adding number increments (.XXX) or default to no clobber for default file would be preferable IMHO.

This entry was edited (5 months ago)
in reply to daniel:// stenberg://

why not removing the last slash from the URL when processing? The idea of -O is to get a proper filename, isn'it?
in reply to daniel:// stenberg://

I like “curl_response” if it cannot figure out a base name

And if either curl_response or base name exists, I would expect the files to be named with sequential indexes

curl_response
curl_response-1
curl_response-2
curl_response-3