]> git.ipfire.org Git - thirdparty/curl.git/commit
tool: change some fopen failures from warnings to errors
authorJay Satiro <raysatiro@yahoo.com>
Sun, 20 Aug 2023 07:08:15 +0000 (03:08 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 30 Aug 2023 07:11:17 +0000 (03:11 -0400)
commitaacbeae7bb5bc9404ea6b96f0d4755f481d5f6bf
tree00bede628b68b1d51a39ffa614c1488852bfaa7f
parent2fe26a7c6a3bfd29ce00d60ce1e1fcd65bf4c569
tool: change some fopen failures from warnings to errors

- Error on missing input file for --data, --data-binary,
  --data-urlencode, --header, --variable, --write-out.

Prior to this change if a user of the curl tool specified an input file
for one of the above options and that file could not be opened then it
would be treated as zero length data instead of an error. For example, a
POST using `--data @filenametypo` would cause a zero length POST which
is probably not what the user intended.

Closes https://github.com/curl/curl/pull/11677
src/tool_getparam.c
src/var.c
tests/data/Makefile.inc
tests/data/test268 [deleted file]