curl: return error if etag options are used with multiple URLs

And document it.

Add tests 484 and 485

Fixes #15729
Reported-by: Tamir Duberstein
Closes #15731
This commit is contained in:
Daniel Stenberg 2024-12-12 17:03:59 +01:00
parent 0439499170
commit a300879b63
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 113 additions and 6 deletions

View file

@ -25,3 +25,5 @@ line with the desired ETag. An empty file is parsed as an empty ETag.
Use the option --etag-save to first save the ETag from a response, and then
use this option to compare against the saved ETag in a subsequent request.
Use this option with a single URL only.

View file

@ -17,6 +17,6 @@ Example:
# `--etag-save`
Save an HTTP ETag to the specified file. An ETag is a caching related header,
usually returned in a response.
usually returned in a response. Use this option with a single URL only.
If no ETag is sent by the server, an empty file is created.