summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-01-02 07:43:25 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-02 07:43:25 +0000
commit189db8f5f0bde62b28234e1d500836be393c443e (patch)
tree0b5cbb1577074ce505d6218d00b02548073cbef8 /server
parentff9c8684698a7c57ea5b040be23c7a883713125a (diff)
parent1da869140d826cd168d64c664b0606df20a9e19a (diff)
downloadvaadin-framework-189db8f5f0bde62b28234e1d500836be393c443e.tar.gz
vaadin-framework-189db8f5f0bde62b28234e1d500836be393c443e.zip
Merge "Merge of (#9784) to Vaadin 7."
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index b099767b4f..fbb3750b3b 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -878,6 +878,23 @@ public class VaadinServlet extends HttpServlet implements Constants {
response.setHeader("Cache-Control", cacheControl);
}
+ writeStaticResourceResponse(request, response, resourceUrl);
+ }
+
+ /**
+ * Writes the contents of the given resourceUrl in the response. Can be
+ * overridden to add/modify response headers and similar.
+ *
+ * @param request
+ * The request for the resource
+ * @param response
+ * The response
+ * @param resourceUrl
+ * The url to send
+ * @throws IOException
+ */
+ protected void writeStaticResourceResponse(HttpServletRequest request,
+ HttpServletResponse response, URL resourceUrl) throws IOException {
// Write the resource to the client.
final OutputStream os = response.getOutputStream();
final byte buffer[] = new byte[DEFAULT_BUFFER_SIZE];