* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Ticket #354 (closed design: fixed)

Opened 2 years ago

Last modified 2 years ago

ETags and Conditional Requests

Reported by: mnot@pobox.com Owned by: draft-ietf-httpbis-p4-conditional@tools.ietf.org
Priority: normal Milestone: 20
Component: p4-conditional Severity: In WG Last Call
Keywords: Cc:
Origin: http://www.w3.org/mid/B5E63193-2450-41AD-A3AA-047755F2189D@niven-jenkins.co.uk

Description

On page 14 of P4 it states:

If none of the entity-tags match, or if "*" is given and no current representation exists, the server MUST NOT perform the requested method. Instead, the server MUST respond with the 412 (Precondition Failed) status code.

This appears to apply to intermediates, but If-Match has a problem here that If-Unmodified-Since does not. If a proxy has a cached entity which has a newer Last-Modified timestamp it *knows* that the conditional has failed and can generate the required 412 Precondition Failed response itself. Otherwise it can satisfy the request from cache. Or relay if there is no current cached version.

But because multiple responses with different ETags may exist then a cache receiving If-Match with one etag, when it has a different etag cached, can not know for sure that the request etag does not exist. If it were to respond with a 412 status it would effectively be preventing the use of that conditional.

It would appear that the only two options available to an intermediate are to satisfy the request in the case of a known match, and relay upstream in all other cases (which would be in conflict with the spec as quoted above).

Change History

comment:1 Changed 2 years ago by mnot@pobox.com

  • Milestone changed from unassigned to 20

Proposal:

""" If any of the entity-tags listed in the If-Match field value match (as per Section 2.3.2) the entity-tag of the selected representation for the target resource, or if "*" is given and any current representation exists for the target resource, then the server may perform the request method as if the If-Match header field was not present.

Origin servers must not perform the requested method if none of the entity-tags match, or if "*" is given and no current representation exists; instead, they must respond with the 412 (Precondition Failed) status code.

Proxy servers using a cached response as the selected representation must not perform the requested method if none of the entity-tags match, or if "*" is given and no current representation exists; instead, they must forward the request towards the origin server. """

comment:2 Changed 2 years ago by julian.reschke@gmx.de

From [1696]:

Clarify etags, If-Match, and proxies vs origin servers (see #354)

comment:3 Changed 2 years ago by julian.reschke@gmx.de

  • Status changed from new to closed
  • Resolution set to incorporated

comment:4 Changed 2 years ago by mnot@pobox.com

  • Status changed from closed to reopened
  • Resolution incorporated deleted

comment:5 Changed 2 years ago by mnot@pobox.com

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.