]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: make the documentation for --etag-save match the program behaviour
authorMax Zettlmeißl <max@zettlmeissl.de>
Sun, 18 Jul 2021 08:42:54 +0000 (10:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 18 Jul 2021 16:24:05 +0000 (18:24 +0200)
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

docs/cmdline-opts/etag-compare.d
docs/cmdline-opts/etag-save.d

index c6ed39cb787ce49ea12ce2d220deff7cf69c5a82..c984cc9f867b0a07e17b0eac997919b5612bd4b5 100644 (file)
@@ -5,15 +5,14 @@ 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 extracted ETag.
+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 specified file contains only a single
-line with a desired ETag. An empty file is parsed as an empty 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 using the saved ETag in a subsequent request.
-
-**COMPARISON**: There are 2 types of comparison or ETags: Weak and Strong.
-This option expects, and uses a strong comparison.
+then use this option to compare against the saved ETag in a subsequent
+request.
index 95d1615aede45d13150065176c16a62fd69a729c..dc2484c32673a661b5a53d87c321e7c1fbdda12a 100644 (file)
@@ -5,13 +5,7 @@ Protocols: HTTP
 Added: 7.68.0
 Category: http
 ---
-This option saves an HTTP ETag to the specified file. Etag is
-usually part of headers returned by a request. When server sends an
-ETag, it must be enveloped by a double quote. This option extracts the
-ETag without the double quotes and saves it into the <file>.
+This option saves an HTTP ETag to the specified file. An ETag is a
+caching related header, usually returned in a response.
 
-A server can send a weak ETag which is prefixed by "W/". This identifier
-is not considered, and only relevant ETag between quotation marks is parsed.
-
-It an ETag wasn't sent by the server or it cannot be parsed, an empty
-file is created.
+If no ETag is sent by the server, an empty file is created.