summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-06-10 15:10:29 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-10 13:48:57 +0000
commite853280aa95e2422821f65da601f780318f2132f (patch)
treefd95677549918ce35d605476392fd526ab866321
parente7201fd30803dbbd231c9a26745b21d5b807abc0 (diff)
downloadvaadin-framework-e853280aa95e2422821f65da601f780318f2132f.tar.gz
vaadin-framework-e853280aa95e2422821f65da601f780318f2132f.zip
Print warning if in production mode and theme compilation is required (#12031)
Change-Id: I59030e7c0133d790f145d31f1614b7e8aaf7c04d
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index 05e3335c00..a3030c9d8d 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -742,11 +742,6 @@ public class VaadinServlet extends HttpServlet implements Constants {
private boolean serveOnTheFlyCompiledScss(String filename,
HttpServletRequest request, HttpServletResponse response,
ServletContext sc) throws IOException {
- if (getService().getDeploymentConfiguration().isProductionMode()) {
- // This is not meant for production mode.
- return false;
- }
-
if (!filename.endsWith(".css")) {
return false;
}
@@ -766,9 +761,21 @@ public class VaadinServlet extends HttpServlet implements Constants {
"Requested resource [{0}] not accessible in the VAADIN directory or access to it is forbidden.",
filename);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
+
// Handled, return true so no further processing is done
return true;
}
+ if (getService().getDeploymentConfiguration().isProductionMode()) {
+ // This is not meant for production mode.
+ getLogger()
+ .log(Level.INFO,
+ "Request for {0} not handled by sass compiler while in production mode",
+ filename);
+ response.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ // Handled, return true so no further processing is done
+ return true;
+ }
+
synchronized (SCSS_MUTEX) {
String realFilename = sc.getRealPath(scssFilename);
ScssStylesheet scss = ScssStylesheet.get(realFilename);