From 743b32faab13dbd426a255ec770dff02fa2550f3 Mon Sep 17 00:00:00 2001 From: lresende Date: Sat, 1 Jan 2011 23:22:49 +0000 Subject: 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 --- .../java/org/apache/tuscany/sca/common/http/HTTPUtils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sca-java-2.x/trunk/modules/common-http/src/main') 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; /** * @@ -31,6 +32,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 -- cgit v1.2.3