git-annex/debian
Joey Hess b8f0b7309f Work around curl bug when asked to download an empty url to a file.
In this situation, curl -o exits successfully without creating the output
file.

There was already a workaround for curl file:/// but I did not realize this
also affected regular url downloads.

To fix it, pre-create the destination file before starting curl.
Since we cannot always know the size of an url before trying to download
it, let's always do this.

Note that since curl is told -C -, we have to consider if this
makes curl try to do a ranged download, which might fail on some servers
where a regular download would have succeeded. My testing indicates
this isn't a problem; since the file is empty, curl seems to not try to
do a ranged download.

Original report: https://github.com/datalad/datalad/issues/79
Curl bug report: https://github.com/bagder/curl/issues/183
2015-03-27 10:22:36 -04:00
..
tests Debian: Run the builtin test suite as an autopkgtest. 2013-08-15 15:49:19 +02:00
cabal-wrapper Add temporary workaround for bug #763078 which broke building on armel and armhf. 2014-09-27 14:22:04 -04:00
changelog Work around curl bug when asked to download an empty url to a file. 2015-03-27 10:22:36 -04:00
compat debhelper v9 2012-01-15 14:53:38 -04:00
control add new build deps 2015-02-22 14:53:06 -04:00
copyright update my email address and homepage url 2015-01-21 12:50:09 -04:00
doc-base Add doc-base file. Closes: #621408 2011-04-06 21:57:22 -04:00
menu fixups 2013-05-15 22:48:27 -04:00
NEWS prep release 2013-10-02 16:13:45 -04:00
rules remove annoouncedir target 2015-03-14 15:55:48 -04:00