commit | 7b57e7b914887f41ae78bed18bcb7667e1db1dd8 | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:26:57 2009 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:26:57 2009 +0000 |
tree | 05da589f1aaa197e50a90d2db4251a2e707cbbe6 | |
parent | 71772e9a38b7320d8f9e0e2f55aedddd37ea29e9 [diff] |
Use sendError() instead of setStatus() for 404 and 500 responses. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@742886 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java index c1e7312..2a35a5a 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java
@@ -71,11 +71,11 @@ { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.component == null && reqInfo.componentRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( !reqInfo.componentRequested ) { - response.setStatus(500); + response.sendError(500); return; } String op = request.getParameter( OPERATION ); @@ -99,7 +99,7 @@ IOException { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.component == null && reqInfo.componentRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( reqInfo.extension.equals("json") )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java index f8968f3..2241930 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -103,7 +103,7 @@ { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.bundle == null && reqInfo.bundleRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( reqInfo.extension.equals("json") ) @@ -122,7 +122,7 @@ { final RequestInfo reqInfo = new RequestInfo(req); if ( reqInfo.bundle == null && reqInfo.bundleRequested ) { - resp.setStatus(404); + resp.sendError(404); return; }