Class HeaderUtils
java.lang.Object
org.htmlunit.util.HeaderUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontainsCacheControlValue(WebResponse response, String value) static booleancontainsETag(WebResponse response) static booleancontainsLastModified(WebResponse response) static booleancontainsMaxAge(WebResponse response) static booleancontainsMaxAgeOrSMaxage(WebResponse response) static booleancontainsNoCache(WebResponse response) static booleancontainsNoStore(WebResponse response) static booleancontainsPrivate(WebResponse response) static booleancontainsPublic(WebResponse response) static booleancontainsSMaxage(WebResponse response) private static longdirectiveValue(WebResponse response, Pattern pattern) static longmaxAge(WebResponse response) static longsMaxage(WebResponse response)
-
Field Details
-
CACHE_CONTROL_PRIVATE
- See Also:
-
CACHE_CONTROL_PUBLIC
- See Also:
-
CACHE_CONTROL_NO_STORE
- See Also:
-
CACHE_CONTROL_NO_CACHE
- See Also:
-
CACHE_CONTROL_MAX_AGE
- See Also:
-
CACHE_CONTROL_S_MAXAGE
- See Also:
-
MAX_AGE_HEADER_PATTERN
-
S_MAXAGE_HEADER_PATTERN
-
-
Constructor Details
-
HeaderUtils
private HeaderUtils()
-
-
Method Details
-
containsPrivate
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'private' value
-
containsPublic
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'public' value
-
containsNoStore
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'no-store' value
-
containsNoCache
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'no-cache' value@return
-
containsETag
- Parameters:
response-WebResponse- Returns:
- if 'Etag' header is present
-
containsLastModified
- Parameters:
response-WebResponse- Returns:
- if 'Last-Modified' header is present
-
containsSMaxage
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 's-maxage' value
-
containsMaxAge
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'max-age' value
-
containsMaxAgeOrSMaxage
- Parameters:
response-WebResponse- Returns:
- if 'Cache-Control' header is present and contains 'max-age' value
-
sMaxage
- Parameters:
response-WebResponse- Returns:
- value of 's-maxage' directive and 0 if it is absent
-
maxAge
- Parameters:
response-WebResponse- Returns:
- value of 'max-age' directive and 0 if it is absent
-
directiveValue
-
containsCacheControlValue
-