Package io.undertow.util
Class ETagUtils
- java.lang.Object
-
- io.undertow.util.ETagUtils
-
public class ETagUtils extends Object
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description ETagUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ETag
getETag(HttpServerExchange exchange)
static boolean
handleIfMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)
Handles the if-match header.static boolean
handleIfMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)
Handles the if-match header.static boolean
handleIfMatch(String ifMatch, ETag etag, boolean allowWeak)
Handles the if-match header.static boolean
handleIfMatch(String ifMatch, List<ETag> etags, boolean allowWeak)
Handles the if-match header.static boolean
handleIfNoneMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)
Handles the if-none-match header.static boolean
handleIfNoneMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)
Handles the if-none-match header.static boolean
handleIfNoneMatch(String ifNoneMatch, ETag etag, boolean allowWeak)
Handles the if-none-match header.static boolean
handleIfNoneMatch(String ifNoneMatch, List<ETag> etags, boolean allowWeak)
Handles the if-none-match header.static List<ETag>
parseETagList(String header)
-
-
-
Method Detail
-
handleIfMatch
public static boolean handleIfMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)
Handles the if-match header. returns true if the request should proceed, false otherwise- Parameters:
exchange
- the exchangeetag
- The etags- Returns:
-
handleIfMatch
public static boolean handleIfMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)
Handles the if-match header. returns true if the request should proceed, false otherwise- Parameters:
exchange
- the exchangeetags
- The etags- Returns:
-
handleIfMatch
public static boolean handleIfMatch(String ifMatch, ETag etag, boolean allowWeak)
Handles the if-match header. returns true if the request should proceed, false otherwise- Parameters:
ifMatch
- The if match headeretag
- The etags- Returns:
-
handleIfMatch
public static boolean handleIfMatch(String ifMatch, List<ETag> etags, boolean allowWeak)
Handles the if-match header. returns true if the request should proceed, false otherwise- Parameters:
ifMatch
- The ifMatch headeretags
- The etags- Returns:
-
handleIfNoneMatch
public static boolean handleIfNoneMatch(HttpServerExchange exchange, ETag etag, boolean allowWeak)
Handles the if-none-match header. returns true if the request should proceed, false otherwise- Parameters:
exchange
- the exchangeetag
- The etags- Returns:
-
handleIfNoneMatch
public static boolean handleIfNoneMatch(HttpServerExchange exchange, List<ETag> etags, boolean allowWeak)
Handles the if-none-match header. returns true if the request should proceed, false otherwise- Parameters:
exchange
- the exchangeetags
- The etags- Returns:
-
handleIfNoneMatch
public static boolean handleIfNoneMatch(String ifNoneMatch, ETag etag, boolean allowWeak)
Handles the if-none-match header. returns true if the request should proceed, false otherwise- Parameters:
ifNoneMatch
- the headeretag
- The etags- Returns:
-
handleIfNoneMatch
public static boolean handleIfNoneMatch(String ifNoneMatch, List<ETag> etags, boolean allowWeak)
Handles the if-none-match header. returns true if the request should proceed, false otherwise- Parameters:
ifNoneMatch
- the headeretags
- The etags- Returns:
-
getETag
public static ETag getETag(HttpServerExchange exchange)
- Parameters:
exchange
- The exchange- Returns:
- The ETag for the exchange, or null if the etag is not set
-
-