1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
curl/docs/cmdline-opts/etag-compare.d
Max Zettlmeißl eaab3f084a
docs: make the documentation for --etag-save match the program behaviour
When using curl with the option `--etag-save` I expected it to save the
ETag without its surrounding quotes, as stated by the documentation in
the repository and by the generated man pages.

My first endeavour was to fix the program, but while investigating the
history of the relevant parts, I discovered that curl once saved the
ETag without the quotes.  This was undone by Daniel Stenberg in commit
`98c94596f5928840177b6bd3c7b0f0dd03a431af`, therefore I decided that in
this case the documentation should be adjusted to match the behaviour of
curl.

The changed save behaviour also made parts of the `--etag-compare`
documentation wrong or superfluous, so I adjusted those accordingly.

Closes #7429
2021-07-18 18:24:05 +02:00

19 lines
587 B
Makefile

Long: etag-compare
Arg: <file>
Help: Pass an ETag from a file as a custom header
Protocols: HTTP
Added: 7.68.0
Category: http
---
This option makes a conditional HTTP request for the specific ETag read
from the given file by sending a custom If-None-Match header using the
stored ETag.
For correct results, make sure that the specified file contains only a
single 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.