Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Extra zero-length file created after 7.42.0 appears to have broken -z option #237
This code example (Windows platform):
echo TESTTEST> index.html curl -fR -z .\index.html https://example.org/index.html -o .\index.html.newer echo %ERRORLEVEL%
will create a zero-length file and return result code 0 when using curl 7.42.0.
In previous versions it was returning result 0 but the zero-length file was not created, which seems to be the correct behavior, given that -z means to download only if there is a newer than the reference-file found on the server. New behavior also makes it not possible to use
This seems to be related to update #183. Here, the description "curl: create output file on successful download of an empty file" (and Daniel's video) suggests that a zero-length file is only expected if the server actually serves a zero-length file, which is not the case in above scenario; the file on the server has a length of 1270 bytes.
Therefore I believe this to be a bug.