Description of problem: I'm not sure if this is a bug or intended change, but on Fedora 28 (curl-7.59.0-9.fc28.x86_64) running the command below would not append the output to the file if it already exists. Version-Release number of selected component (if applicable): curl-7.61.1-1.fc30.x86_64 How reproducible: 100% Steps to Reproduce: 1. curl --retry 5 --insecure --fail --location --show-error --remote-name --remote-header-name "https://copr.fedorainfracloud.org/coprs/mvadkert/beakerlib-libraries/repo/fedora-rawhide/mvadkert-beakerlib-libraries-fedora-rawhide.repo" 2. curl --retry 5 --insecure --fail --location --show-error --remote-name --remote-header-name "https://copr.fedorainfracloud.org/coprs/mvadkert/beakerlib-libraries/repo/fedora-rawhide/mvadkert-beakerlib-libraries-fedora-rawhide.repo" 3. cat mvadkert-beakerlib-libraries.repo [mvadkert-beakerlib-libraries] name=Copr repo for beakerlib-libraries owned by mvadkert baseurl=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/fedora-rawhide-$basearch/ type=rpm-md skip_if_unavailable=True gpgcheck=1 gpgkey=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/pubkey.gpg repo_gpgcheck=0 enabled=1 enabled_metadata=1[mvadkert-beakerlib-libraries] name=Copr repo for beakerlib-libraries owned by mvadkert baseurl=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/fedora-rawhide-$basearch/ type=rpm-md skip_if_unavailable=True gpgcheck=1 gpgkey=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/pubkey.gpg repo_gpgcheck=0 enabled=1 enabled_metadata=1 Actual results: the content of mvadkert-beakerlib-libraries.repo is duplicated as curl appended the file. Expected results: At least on Fedora 28 (curl-7.59.0-9.fc28.x86_64) the 2nd execution of curl would return: curl --retry 5 --insecure --fail --location --show-error --remote-name --remote-header-name "https://copr.fedorainfracloud.org/coprs/mvadkert/beakerlib-libraries/repo/fedora-rawhide/mvadkert-beakerlib-libraries-fedora-rawhide.repo" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Refusing to overwrite mvadkert-beakerlib-libraries.repo: File exists 100 386 100 386 0 0 1398 0 --:--:-- --:--:-- --:--:-- 1398 curl: (23) Failed writing body (0 != 386) Additional info: On Fedora29 curl also appends the file
No I do not think it is intended. This was first broken by the following commit, causing the destination file to be silently overwritten: https://github.com/curl/curl/commit/curl-7_60_0-17-gc1c27625c Then it was supposedly fixed by the following commit: https://github.com/curl/curl/commit/curl-7_61_0-46-ge78f2cfe5 However, as you suggest, it is still not perfect...
Reported upstream: https://github.com/curl/curl/issues/3380
Upstream commit: https://github.com/curl/curl/commit/curl-7_63_0-17-g484926719
curl-7.61.1-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7bfb18eb6a
curl-7.61.1-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-7bfb18eb6a
curl-7.61.1-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.