curl not working properly under Monterey (12.3.1)

We have a problem with curl. Under Big Sur, the command

curl 'ftp://ftp.myserver/myPath/my File' -u 'myusername':'mypassword' 

properly downloads the file.

Under Monterey, the same command throws an error:

curl: (3) URL using bad/illegal format or missing URL

Any advice, workaround etc. is highly appreciated.

The behaviour is the same, whether the command is issued in Terminal, or as a shell script in a Applescript application created in XCode.

Note that the error is thrown even if there is no space in the file name.

I am trying out to replace the affected curl commands with wget.

URLs technically can't have spaces in them - replace the space with %20 and it should work

If this worked in an older version of curl it might've been doing that replacement automatically

Try curl --disable-epsv -vvv -s --connect-timeout 2 -o /PATH ftp://SERVEUR/file.sh --user IUSER:PASSWORD --disable-epsv help for me

curl not working properly under Monterey (12.3.1)
 
 
Q