'Problems with curl under macOS Monterey

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

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

Also note that the username/password combo does work, as it does properly download the list of the directory.

Any advice, workaround etc. is highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source