public class HttpHeaderUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
HttpHeaderUtils.HttpResource
A resource that has been requested by an
HttpServletRequest and eventually needs to be updated. |
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.lang3.time.FastDateFormat |
HTTP_DATE |
static String |
X_APPNG_REQUIRED_ROLE
Use this header in your
HttpServletResponse to allow role based access control for cached resources |
| Constructor and Description |
|---|
HttpHeaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyHeaders(javax.servlet.http.HttpServletResponse httpServletResponse,
org.springframework.http.HttpHeaders headers)
Applies the given
HttpHeaders to the HttpServletResponse. |
static byte[] |
handleModifiedHeaders(org.springframework.http.HttpHeaders requestHeaders,
org.springframework.http.HttpHeaders responseHeaders,
HttpHeaderUtils.HttpResource resource)
Handles the "Last-Modified" and
"If-Modified-Since" headers for the give request/response pair.
|
static byte[] |
handleModifiedHeaders(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
HttpHeaderUtils.HttpResource resource,
boolean output)
Handles the "Last-Modified" and
"If-Modified-Since" headers for the give request/response pair.
|
static org.springframework.http.HttpHeaders |
parse(javax.servlet.http.HttpServletRequest httpServletRequest)
Parses the string-based HTTP headers of the given
HttpServletRequest to an HttpHeaders object. |
public static final String X_APPNG_REQUIRED_ROLE
HttpServletResponse to allow role based access control for cached resourcesprotected static final org.apache.commons.lang3.time.FastDateFormat HTTP_DATE
public static byte[] handleModifiedHeaders(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
HttpHeaderUtils.HttpResource resource,
boolean output)
throws IOException
servletRequest - the current HttpServletRequestservletResponse - the current HttpServletResponseresource - the HttpHeaderUtils.HttpResource to processoutput - whether or not to write the response data to the OutputStream of the
HttpServletResponse, also setting the content-type and content lengthHttpHeaderUtils.HttpResource has'nt been updated since thenIOException - if an error occurred while reading/updating the HttpHeaderUtils.HttpResourcepublic static byte[] handleModifiedHeaders(org.springframework.http.HttpHeaders requestHeaders,
org.springframework.http.HttpHeaders responseHeaders,
HttpHeaderUtils.HttpResource resource)
throws IOException
requestHeaders - the headers the current HttpServletRequestresponseHeaders - the headers of the current HttpServletResponseresource - the HttpHeaderUtils.HttpResource to processHttpHeaderUtils.HttpResource has'nt been updated since thenIOExceptionpublic static org.springframework.http.HttpHeaders parse(javax.servlet.http.HttpServletRequest httpServletRequest)
HttpServletRequest to an HttpHeaders object.httpServletRequest - a HttpServletRequestHttpHeaderspublic static void applyHeaders(javax.servlet.http.HttpServletResponse httpServletResponse,
org.springframework.http.HttpHeaders headers)
HttpHeaders to the HttpServletResponse.httpServletResponse - the response to set the headers forheaders - the headers to applyCopyright © 2011–2023 aiticon GmbH. All rights reserved.