fail.d 705 B

123456789101112131415161718
  1. Long: fail
  2. Short: f
  3. Protocols: HTTP
  4. Help: Fail silently (no output at all) on HTTP errors
  5. See-also: fail-with-body
  6. Category: important http
  7. Example: --fail $URL
  8. Added: 4.0
  9. ---
  10. Fail silently (no output at all) on server errors. This is mostly done to
  11. enable scripts etc to better deal with failed attempts. In normal cases
  12. when an HTTP server fails to deliver a document, it returns an HTML document
  13. stating so (which often also describes why and more). This flag will prevent
  14. curl from outputting that and return error 22.
  15. This method is not fail-safe and there are occasions where non-successful
  16. response codes will slip through, especially when authentication is involved
  17. (response codes 401 and 407).