You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method ControllerUtils::getEtagFromHeader is supposed to extract the Etag, but it only checks the If-Match
header, which makes it interesting for updating resources only.
According to this article, another header may be relevant in other cases, although spring usually handles this for us.
Using an If-* header turns a standard GET request into a conditional GET. The two If-* headers that are using with ETags are “If-None-Match” and “If-Match” – each with its own semantics as discussed later in this article.
The linked RFC in the article is an outdated draft, the current version is here. Both mention the "*" wildcard, and supporting a list of etags. Not sure but I think we do not support this (in this manual check, at least. Spring probably does.)
To Reproduce
Nothing to reproduce. I found it while checking available utilities.
Expected behavior
The documentation should make clear that this function is only appropriate for update cases / the if-match header.
There could be a function handling multiple values and wildcard ("*"). This function may be used for different check functions, like the ones already provided.
Screenshots
None. Check out the links to the source code and the article above.
Desktop (please complete the following information):
Independent. Just talking about the source code here.
Additional context
none
The text was updated successfully, but these errors were encountered:
Well, so far ETags were indeed only used for update and delete operations. I agree, that for caching also the mentioned option could be relevant, but at the moment we do not have scenarios where we have to rely on caching.
Describe the bug
The method
ControllerUtils::getEtagFromHeader
is supposed to extract the Etag, but it only checks theIf-Match
header, which makes it interesting for updating resources only.
service-base/src/main/java/edu/kit/datamanager/util/ControllerUtils.java
Line 145 in 6f56555
According to this article, another header may be relevant in other cases, although spring usually handles this for us.
The linked RFC in the article is an outdated draft, the current version is here. Both mention the "*" wildcard, and supporting a list of etags. Not sure but I think we do not support this (in this manual check, at least. Spring probably does.)
To Reproduce
Nothing to reproduce. I found it while checking available utilities.
Expected behavior
Screenshots
None. Check out the links to the source code and the article above.
Desktop (please complete the following information):
Independent. Just talking about the source code here.
Additional context
none
The text was updated successfully, but these errors were encountered: