From a05c24980081fa3efc979c5d3add4d959c2bd2d7 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Wed, 10 Aug 2011 22:32:22 +0000 Subject: [PATCH] fix for: https://issues.apache.org/jira/browse/AMQ-2430 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1156392 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/util/RestFilter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java b/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java index 9c19f5b80d..1eed205da6 100644 --- a/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java +++ b/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java @@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory; * read-permission-role and write-permission-role are defined then all requests * are authorized using the defined roles. Also GET methods are authorized. *

- * + * * @author Aleksi Kallio */ public class RestFilter implements Filter { @@ -179,8 +179,9 @@ public class RestFilter implements Filter { IOHelper.copyInputStream(request.getInputStream(), out); } catch (IOException e) { LOG.warn("Exception occured" , e); - out.close(); throw e; + } finally { + out.close(); } response.setStatus(HttpURLConnection.HTTP_NO_CONTENT); // we return no