incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r889536 - in /sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl: DefaultGetServlet.java helpers/StreamRendererServlet.java
Date Fri, 11 Dec 2009 09:01:03 GMT
Author: fmeschbe
Date: Fri Dec 11 09:01:02 2009
New Revision: 889536

URL: http://svn.apache.org/viewvc?rev=889536&view=rev
Log:
SLING-1231 send 404/NOT FOUND if no renderer is defined for the request extension or if the
stream renderer is called with an unsupported extension

Modified:
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java
    sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java?rev=889536&r1=889535&r2=889536&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/DefaultGetServlet.java
Fri Dec 11 09:01:02 2009
@@ -230,7 +230,7 @@
                     "No renderer for extension {}, cannot render resource {}",
                     ext, request.getResource());
             } else {
-                response.sendError(HttpServletResponse.SC_FORBIDDEN);
+                response.sendError(HttpServletResponse.SC_NOT_FOUND);
             }
             return;
         }

Modified: sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java?rev=889536&r1=889535&r2=889536&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
(original)
+++ sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
Fri Dec 11 09:01:02 2009
@@ -88,7 +88,7 @@
                     "StreamRendererServlet does not support for extension {}",
                     ext);
             } else {
-                response.sendError(HttpServletResponse.SC_FORBIDDEN);
+                response.sendError(HttpServletResponse.SC_NOT_FOUND);
             }
             return;
         }
@@ -266,10 +266,6 @@
         }
 
         if (index) {
-            // RequestDispatcherOptions rdo = new RequestDispatcherOptions();
-            // rdo.setReplaceSelectors("sling.index");
-            // request.getRequestDispatcher(resource, rdo).include(request,
-            // response);
             renderIndex(resource, response);
         } else {
             response.sendError(HttpServletResponse.SC_FORBIDDEN);



Mime
View raw message