summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/common-http/src/main
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-01-01 23:22:49 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-01-01 23:22:49 +0000
commit743b32faab13dbd426a255ec770dff02fa2550f3 (patch)
tree53c51ffd8cfbdc938ca18398c7985a6362ac9f2a /sca-java-2.x/trunk/modules/common-http/src/main
parentc864ae0f334b2d2a81b2f31dae2ea51a54a69ccd (diff)
TUSCANY-3812 - Fixing ETag and Cache headers to avoid refresh issues in IE
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1054319 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/common-http/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
index cbc2564bc4..6ab6216522 100644
--- a/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
+++ b/sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java
@@ -23,6 +23,7 @@ import java.math.BigInteger;
import java.security.MessageDigest;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
/**
*
@@ -32,6 +33,17 @@ import javax.servlet.http.HttpServletRequest;
public class HTTPUtils {
/**
+ * Utility method to set common http headers and other stuff in a
+ * default http response. Applications / Extensions can then override and
+ * tweak as they see fit.
+ *
+ * @param response
+ */
+ public static void prepareHTTPResponse(HttpServletResponse response) {
+ response.setDateHeader("Date", System.currentTimeMillis());
+ }
+
+ /**
* Calculate the relative request path taking in consideration if
* the application is running in a embedded webContatiner or from
* within a web application server host environment