Package com.day.cq.wcm.commons
Class RequestHelper
java.lang.Object
com.day.cq.wcm.commons.RequestHelper
RequestHelper...-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhandleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, Node node) Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property.static booleanhandleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, ValueMap properties) Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property.
-
Constructor Details
-
RequestHelper
public RequestHelper()
-
-
Method Details
-
handleIfModifiedSince
public static boolean handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, ValueMap properties) Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set.- Parameters:
req- the requestresp- the responseproperties- the properties- Returns:
trueif the response was sent
-
handleIfModifiedSince
public static boolean handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, Node node) Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set. If the give doesn't have the property, the parent node is searched.- Parameters:
req- the requestresp- the responsenode- the current node- Returns:
trueif the response was sent
-