[solved] curl: Remote file name has no length!

curl --user-agent "$ua" -retry 1000 --retry-delay 5 --proxy "$proxy" -C - -O "https://domain/binaryfile"

results in:

Warning: Invalid character is found in given range. A specified range MUST
Warning: have only digits in ‘start’-‘stop’. The server’s response to this
Warning: request is uncertain.
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application

i have tried two various files and made sure link is correct. Tried to remove some switches (including proxy) from curl, but download not proceed.

removing -O cause:

curl: (52) Empty reply from server

416 Requested Range Not Satisfiable

FIX: It appears that copy/paste failed due to a “retry” switch missing one dash. Solution: turn -retry into --retry
Seems weird that curl does not return some more user friendly/understandable error like “unknown parameter: -retry”

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki