mirror of
https://github.com/curl/curl.git
synced 2026-04-15 18:51:41 +03:00
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
`98c94596f5`, 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
18 lines
587 B
Makefile
18 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.
|