Re: Does adding new conditionals really work?

Hi all,

This is the main failure mode I encountered while defining
If-Semantic-Match. I do not think a new conditional for a
state-changing request can be used safely as an opportunistic field on
an arbitrary resource.

The Semantic Validators draft requires a client to have positive
knowledge, specific to the target resource and request method, that
If-Semantic-Match is enforced. The presence of Semantic-ETag alone
deliberately does not advertise such enforcement:

https://datatracker.ietf.org/doc/draft-jurkovikj-http-semantic-validator/

The draft also evaluates standard HTTP preconditions first and the
semantic condition afterward, requires all applicable conditions to
succeed, and requires atomic comparison and commit.

Graham’s proposed response field looks like a possible generic
discovery mechanism, particularly when returned by the GET response
that supplied the state and validator. For concurrency use cases, that
prior read is usually already required.

I think such an advertisement would also need:

- request-method scope, because support for PATCH does not necessarily
imply support for PUT or DELETE; and
- stability semantics, so a server cannot advertise enforcement and
later silently treat the same conditional as an ignored field while
clients can still rely on the earlier advertisement.

This suggests that new conditionals can work as an explicitly
advertised and stable endpoint contract, but not as opportunistic
protection on an arbitrary resource. Additional guidance for extension
conditionals would be valuable.

Best regards,

Antun

On Wed, Aug 5, 2026 at 10:49 AM Graham Cox <graham@grahamcox.co.uk> wrote:
>
> >  The problem for conditional state-changing requests is that this doesn't allow the client to make the state change at the resource conditional.  You only learn after the event.  Sure, you could use that sort of design with something like OPTIONS to probe first, but then you are doing a preflight on every resource that you might want to try such a request on.
>
> I was thinking that you'd include it on the GET response when the client loaded the resource in the first place.
>
> So the flow would be:
> * Client - GET /someResource
> * Server - Returns /someResource with new Conditional-Supported header
> * Client - PUT/PATCH/DELETE /someResource
>
> In this case, the client now knows which conditionals are supported for this resource.
>
> It also works for subsequent GETs so the client knows if things like If-None-Match and If-Modified-Since will work, though as said earlier that's less of an issue since the only real benefit is less bandwidth used in the response.
>
> Of course, it doesn't work if there wasn't an initial GET call, or if the supported conditionals change between the GET and PUT/PATCH/DELETE - e.g. if there was a long enough gap between the two. But assuming that any updating request needed to have a copy of the original to know what to update then it *should* work... (And remembering as well that, since it doesn't currently exist, there would have to be an assumption that not all clients / servers support it so you'd need to handle that case anyway)
>
> Cheers
> --
> Graham Cox
>
> On Wed, 5 Aug 2026 at 09:38, Martin Thomson <mt@lowentropy.net> wrote:
>>
>> On Wed, Aug 5, 2026, at 18:07, Graham Cox wrote:
>> > Maybe this is backwards. Maybe a better solution is, e.g., a response
>> > field *Conditional-Supported* that the server can include in a response
>> > to indicate the supported conditionals for that resource.
>>
>> The problem for conditional state-changing requests is that this doesn't allow the client to make the state change at the resource conditional.  You only learn after the event.  Sure, you could use that sort of design with something like OPTIONS to probe first, but then you are doing a preflight on every resource that you might want to try such a request on.

Received on Wednesday, 5 August 2026 11:04:03 UTC