summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);