Package jetbrains.buildServer.web.util
Class ConditionalRequestsUtil
- java.lang.Object
-
- jetbrains.buildServer.web.util.ConditionalRequestsUtil
-
public class ConditionalRequestsUtil extends Object
Utilities related to http://tools.ietf.org/html/rfc7232
-
-
Constructor Summary
Constructors Constructor Description ConditionalRequestsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
getIfNoneMatchValues(javax.servlet.http.HttpServletRequest request)
static boolean
isETagsEquals(String t1, String t2, boolean weak)
Checks ETag equalty according to standard.static boolean
isRequestHasMatchingETag(javax.servlet.http.HttpServletRequest request, String etag, boolean weak)
Checks if one of provided values of If-None-Match header of the given request matches given etag accounting for strong/weak comparison types.static List<String>
splitCommaSeparatedHeaderValue(String header)
-
-
-
Method Detail
-
isRequestHasMatchingETag
public static boolean isRequestHasMatchingETag(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String etag, boolean weak)
Checks if one of provided values of If-None-Match header of the given request matches given etag accounting for strong/weak comparison types.- Parameters:
request
- header holderetag
- value to check matches withweak
- indicates etag type- Returns:
- true if etag equals to one of given list of etag values, false otherwise.
- See Also:
isETagsEquals(java.lang.String, java.lang.String, boolean)
-
isETagsEquals
public static boolean isETagsEquals(@NotNull String t1, @NotNull String t2, boolean weak)
Checks ETag equalty according to standard.- See Also:
- RFC 7232
-
getIfNoneMatchValues
@NotNull public static List<String> getIfNoneMatchValues(@NotNull javax.servlet.http.HttpServletRequest request)
-
-