From: Artur Signell Date: Mon, 10 Jun 2013 12:10:29 +0000 (+0300) Subject: Print warning if in production mode and theme compilation is required (#12031) X-Git-Tag: 7.1.0~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e853280;p=vaadin-framework.git Print warning if in production mode and theme compilation is required (#12031) Change-Id: I59030e7c0133d790f145d31f1614b7e8aaf7c04d --- 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);