diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache')
-rw-r--r-- | sca-java-2.x/trunk/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java | 12 |
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 |