Do you think #curl -O on a URL that ends with a trailing slash should pick a default file name to save the content in ?
github.com/curl/curl/pull/1398…
tool_operate: for -O, use "default" as filename when the URL has none by bagder · Pull Request #13988 · curl/curl
Instead of returning error. Add test 690 to verifyGitHub
Janne Moren
in reply to daniel:// stenberg:// • • •Markus Werle
in reply to daniel:// stenberg:// • • •Cassandrich
in reply to daniel:// stenberg:// • • •zopsicle
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to zopsicle • • •Ludwig Behm
in reply to daniel:// stenberg:// • • •Andreas Neustifter
in reply to daniel:// stenberg:// • • •Maybe only use the basename from the URL when possible or otherwise fail?
daniel:// stenberg://
in reply to Andreas Neustifter • • •Andreas Neustifter
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Andreas Neustifter • • •Thomas Guyot-Sionnest
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.
Andreas Neustifter
in reply to daniel:// stenberg:// • • •rreignier
in reply to daniel:// stenberg:// • • •Jaanus Kase
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
Henri
in reply to daniel:// stenberg:// • • •