diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-02-11 08:30:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-02-11 08:35:27 +0100 |
commit | 8a964cb217b0cd84783da5ba32b18944fc43feb1 (patch) | |
tree | d6201c16d66c0b3fd1d7496ecc9d046479792f5e /docs | |
parent | c386a0df441538ee4fbcf6e4bdac77abe5cc3e5d (diff) | |
download | curl-8a964cb217b0cd84783da5ba32b18944fc43feb1.tar.gz |
curl: add --fail-with-body
Prevent both --fail and --fail-with-body on the same command line.
Verify with test 349, 360 and 361.
Closes #6449
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cmdline-opts/Makefile.inc | 7 | ||||
-rw-r--r-- | docs/cmdline-opts/fail-with-body.d | 16 | ||||
-rw-r--r-- | docs/cmdline-opts/fail.d | 1 | ||||
-rw-r--r-- | docs/options-in-versions | 1 |
4 files changed, 22 insertions, 3 deletions
diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc index 642a4bb42..abfa38c97 100644 --- a/docs/cmdline-opts/Makefile.inc +++ b/docs/cmdline-opts/Makefile.inc @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -61,10 +61,11 @@ DPAGES = \ dump-header.d \ egd-file.d \ engine.d \ - etag-compare.d \ - etag-save.d \ + etag-compare.d \ + etag-save.d \ expect100-timeout.d \ fail-early.d \ + fail-with-body.d \ fail.d \ false-start.d \ form-string.d \ diff --git a/docs/cmdline-opts/fail-with-body.d b/docs/cmdline-opts/fail-with-body.d new file mode 100644 index 000000000..91db8bde8 --- /dev/null +++ b/docs/cmdline-opts/fail-with-body.d @@ -0,0 +1,16 @@ +Long: fail-with-body +Protocols: HTTP +Help: Fail on HTTP errors but save the body +Category: http output +Added: 7.76.0 +See-also: fail +--- + +Return an error on server errors where the HTTP response code is 400 or +greater). In normal cases when an HTTP server fails to deliver a document, it +returns an HTML document stating so (which often also describes why and +more). This flag will still allow curl to outputting and save that content but +also to return error 22. + +This is an alternative option to --fail which makes curl fail for the same +circumstances but without saving the content. diff --git a/docs/cmdline-opts/fail.d b/docs/cmdline-opts/fail.d index e5028a847..d4d65fba4 100644 --- a/docs/cmdline-opts/fail.d +++ b/docs/cmdline-opts/fail.d @@ -2,6 +2,7 @@ Long: fail Short: f Protocols: HTTP Help: Fail silently (no output at all) on HTTP errors +See-also: fail-with-body Category: important http --- Fail silently (no output at all) on server errors. This is mostly done to diff --git a/docs/options-in-versions b/docs/options-in-versions index bdffeec7e..66a178565 100644 --- a/docs/options-in-versions +++ b/docs/options-in-versions @@ -59,6 +59,7 @@ --expect100-timeout 7.47.0 --fail (-f) 4.0 --fail-early 7.52.0 +--fail-with-body 7.76.0 --false-start 7.42.0 --form (-F) 5.0 --form-string 7.13.2 |