Re: --etag-save overwrites on status 304
Paul Gilmartin via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On 10/2/23 11:33:36, Timothe Litt via curl-users wrote:
>>
> Curl should write the ETag header received with the 304. Is the server sending it?
>
It did not.
> If not, it's a server bug.
>
> Note RFC2616 REQUIRES ETag to be sent "if it would have been sent in a 200 response to the same request".
>
That's a weird contrafactual statement. The server could not have
"sent ... a 200 response to the same request" because the "if none
match would have required the 304. Should the RFC be amended?
I read <https://datatracker.ietf.org/doc/html/rfc2616#section-14.26>:
... the server SHOULD
respond with a 304 (Not Modified) response, including the cache-
related header fields (particularly ETag) of one of the entities that
matched. ...
How does SHOULD differ from MUST?
> If the server is sending it, but curl isn't writing it to the --etag-save, it's a curl bug.
--
Thanks,
gil
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html