-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Add generic ETag comparator #24868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Perhaps |
This one looks promising. I need to take a deep look at it tomorrow. |
Simply setting an eTag and/or lastModified on |
Closing but feel free to comment. |
I so tried the
From Swagger UI I have provided Though, I will drop my
This doesn't sound good to me because I still have to perform the operation. The RFC clearly says that I must not perform it is if the condition is not met. The |
@rstoyanchev, I don't consider this issue to be invalid. Compared to JAX-RS' support for conditional requests Spring's is very humble. |
Superseded by #24881 |
This is an improvement request I wonder it has not been created before.
Consider the following code:
(Yes, I know the ETag comparison is wrong)
where
What I am completely missing in Spring Web is to assist the developer to avoid boilerplate code around ETag comparison. I'd expect some comparator:
Basic idea:
ETagComparator
parses the value of the supplied header along with*
, a possible list and weak/strong boolean@RequestHeader
and the header is wellknown (RFC 7232), the comparison function is already set@RequestHeader
will injectnull
when value is not providedETagComparator
can handlenull
input from the client indicating that the target resource does not exist or by some other means fulfulling thisThe semantic behavior of
If-Match
/If-None-Match
is welldefined. In a case of a custom header, like in my caseIf-Parent-Match
which hasIf-Match
semantic behavior I must be able to configure this semantic behavior also.The text was updated successfully, but these errors were encountered: