abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r441581 - /incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java
Date Fri, 08 Sep 2006 17:21:28 GMT
Author: jmsnell
Date: Fri Sep  8 10:21:27 2006
New Revision: 441581

URL: http://svn.apache.org/viewvc?view=rev&rev=441581
Log:
Fix SignedResponseFilter so that it doesn't throw exceptions on error responses

Modified:
    incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java

Modified: incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java?view=diff&rev=441581&r1=441580&r2=441581
==============================================================================
--- incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java
(original)
+++ incubator/abdera/java/trunk/security/src/main/java/org/apache/abdera/security/util/servlet/SignedResponseFilter.java
Fri Sep  8 10:21:27 2006
@@ -171,10 +171,14 @@
     Reader rdr = wrapper.getReader();
     InputStream in = wrapper.getInputStream();
     Parser parser = abdera.getParser();
-    if (rdr != null)
-      return parser.parse(rdr);
-    if (in != null)
-      return parser.parse(in);
+    try {
+      if (rdr != null) {
+        return parser.parse(rdr);
+      }
+      if (in != null) {
+        return parser.parse(in);
+      }
+    } catch (Exception e) {}
     return null;
   }
   
@@ -187,7 +191,7 @@
     BufferingResponseWrapper(HttpServletResponse response) {
       super(response);
     }
-
+    
     @Override
     public PrintWriter getWriter() throws IOException {
       if (outStream != null) throw new IllegalStateException();
@@ -232,6 +236,18 @@
     
     public void write(byte[] b, int off, int len) throws IOException {
       out.write(b, off, len);
+    }
+
+    @Override
+    public void close() throws IOException {
+      out.close();
+      super.close();
+    }
+
+    @Override
+    public void flush() throws IOException {
+      out.flush();
+      super.flush();
     }
     
   }



Mime
View raw message