Verify whether the given Representation matches the given conditions.
If true, add the corresponding ETag to the body metadata.
If not, destroy the data stream and throw a NotModifiedHttpError with the same ETag.
In case the failing condition is an If-Match or If-Unmodified-Since condition,
a PreconditionFailedHttpError is thrown instead, as required by RFC 9110, ยง13.2.2.
If conditions is not defined, nothing will happen.
This uses the strict conditions check which takes the content type into account;
therefore, this should only be called after content negotiation, when it is certain what the output will be.
Note that browsers only keep track of one ETag, and the Vary header has no impact on this,
meaning the browser could send us the ETag for a Turtle resource even though it is requesting JSON-LD;
this is why we have to check ETags after content negotiation.
Verify whether the given Representation matches the given conditions. If true, add the corresponding ETag to the body metadata. If not, destroy the data stream and throw a NotModifiedHttpError with the same ETag. In case the failing condition is an
If-MatchorIf-Unmodified-Sincecondition, a PreconditionFailedHttpError is thrown instead, as required by RFC 9110, ยง13.2.2. Ifconditionsis not defined, nothing will happen.This uses the strict conditions check which takes the content type into account; therefore, this should only be called after content negotiation, when it is certain what the output will be.
Note that browsers only keep track of one ETag, and the Vary header has no impact on this, meaning the browser could send us the ETag for a Turtle resource even though it is requesting JSON-LD; this is why we have to check ETags after content negotiation.