cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1389439 - /cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Date Mon, 24 Sep 2012 15:47:32 GMT
Author: dkulp
Date: Mon Sep 24 15:47:31 2012
New Revision: 1389439

URL: http://svn.apache.org/viewvc?rev=1389439&view=rev
Log:
Fix to work with Jetty 7.5.x

Modified:
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=1389439&r1=1389438&r2=1389439&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Mon Sep 24 15:47:31 2012
@@ -377,11 +377,21 @@ public class JettyHTTPDestination extend
     
     protected OutputStream flushHeaders(Message outMessage, boolean getStream) throws IOException
{
         OutputStream out = super.flushHeaders(outMessage, getStream);
-        if (out instanceof Output) {
-            out = new JettyOutputStream((Output)out);
+        return wrapOutput(out);
+    }
+    
+    private OutputStream wrapOutput(OutputStream out) {
+        try {
+            if (out instanceof Output) {
+                out = new JettyOutputStream((Output)out);
+            }
+        } catch (Throwable t) {
+            //ignore
         }
         return out;
     }
+    
+    
     static class JettyOutputStream extends FilterOutputStream implements CopyingOutputStream
{
         final Output out;
         public JettyOutputStream(Output o) {



Mime
View raw message