- From: Antun Jurkovic <antunjurkovic@gmail.com>
- Date: Wed, 5 Aug 2026 16:50:11 +0200
- To: Graham Cox <graham@grahamcox.co.uk>
- Cc: Martin Thomson <mt@lowentropy.net>, ietf-http-wg@w3.org, "Julian F. Reschke" <julian.reschke@gmx.de>
Yes, that is exactly the kind of method-specific advertisement I had
in mind. Separating general support from support limited to PUT or
PATCH makes the resource contract much clearer.
I also agree with the fail-closed behavior for unsafe methods.
Existing HTTP recipients cannot generally be assumed to reject unknown
If-* fields, but a server opting into this conditional-capability
mechanism could be required to do so.
That would also address much of the stability concern. While an
advertisement remains applicable, if support for a listed conditional
disappears, the server must fail before applying the mutation rather
than silently treating the request as unconditional. There is still
a lifetime or rollback question around determining whether an earlier
advertisement remains applicable, but fail-closed behavior would
establish the important safety boundary.
The exact field serialization can be worked out separately, but the
capability and failure semantics seem like the important part.
Antun
On Wed, Aug 5, 2026 at 3:49 PM Graham Cox <graham@grahamcox.co.uk> wrote:
>
> > - request-method scope, because support for PATCH does not necessarily
> > imply support for PUT or DELETE; and
>
> I'm (still) completely making this up, but what about something like this?
>
> Conditional-Supported: "If-Match", "If-DOW";methods=("PUT" "PATCH")
>
> To mean:
> * If-Match - supported generally
> * If-DOW - supported, but only for the PUT and PATCH methods
>
> And of course you can add all sorts of extra details like that as needed.
>
> > - 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.
>
> I kinda wish that unsafe HTTP methods were required to error if any unsupported If-* headers were present, instead of just silently ignoring them.
>
> Cheers
> --
> Graham Cox
>
> On Wed, 5 Aug 2026 at 12:03, Antun Jurkovic <antunjurkovic@gmail.com> wrote:
>>
>> 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 14:50:28 UTC