
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkFor304(javax.servlet.http.HttpServletRequest req,
String pageName,
Date lastModified)
If returns true, then should return a 304 (HTTP_NOT_MODIFIED)
|
static String |
createETag(String pageName,
Date lastModified)
Creates an ETag based on page information.
|
static String |
getRemoteAddress(javax.servlet.http.HttpServletRequest req)
returns the remote address by looking into
x-forwarded-for header or, if unavailable,
into ServletRequest.getRemoteAddr(). |
static String |
guessValidURI(String uri)
Attempts to form a valid URI based on the string given.
|
static String |
retrieveCookieValue(javax.servlet.http.HttpServletRequest request,
String cookieName)
Attempts to retrieve the given cookie value from the request.
|
public static String getRemoteAddress(javax.servlet.http.HttpServletRequest req)
x-forwarded-for header or, if unavailable,
into ServletRequest.getRemoteAddr().req - http requestpublic static String retrieveCookieValue(javax.servlet.http.HttpServletRequest request, String cookieName)
request - The current requestcookieName - The name of the cookie to fetch.public static String createETag(String pageName, Date lastModified)
pageName - The page name for which the ETag should be created.lastModified - The page last modified date for which the ETag should be created.public static boolean checkFor304(javax.servlet.http.HttpServletRequest req, String pageName, Date lastModified)
req - the HTTP requestpageName - the wiki page name to check forlastModified - the last modified date of the wiki page to check forpublic static String guessValidURI(String uri)
uri - URI to take a poke atCopyright © 2001-2018 The Apache Software Foundation. All rights reserved.