cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clecl...@apache.org
Subject svn commit: r919255 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Fri, 05 Mar 2010 01:10:40 GMT
Author: cleclerc
Date: Fri Mar  5 01:10:39 2010
New Revision: 919255

URL: http://svn.apache.org/viewvc?rev=919255&view=rev
Log:
[CXF-2537] Enhance exception message for ssl related problems

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=919255&r1=919254&r2=919255&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Fri Mar  5 01:10:39 2010
@@ -1881,24 +1881,31 @@
          * Perform any actions required on stream closure (handle response etc.)
          */
         public void close() throws IOException {
-            if (buffer != null && buffer.size() > 0) {
-                thresholdNotReached();
-                LoadingByteArrayOutputStream tmp = buffer;
-                buffer = null;
-                super.write(tmp.getRawBytes(), 0, tmp.size());
-            }
-            if (!written) {
-                handleHeadersTrustCaching();
-            }
-            if (!cachingForRetransmission) {
-                super.close();
-            } else if (cachedStream != null) {
-                super.flush();
-                cachedStream.getOut().close();
-                cachedStream.closeFlowthroughStream();
-            }
             try {
-                handleResponse();
+                if (buffer != null && buffer.size() > 0) {
+                    thresholdNotReached();
+                    LoadingByteArrayOutputStream tmp = buffer;
+                    buffer = null;
+                    super.write(tmp.getRawBytes(), 0, tmp.size());
+                }
+                if (!written) {
+                    handleHeadersTrustCaching();
+                }
+                if (!cachingForRetransmission) {
+                    super.close();
+                } else if (cachedStream != null) {
+                    super.flush();
+                    cachedStream.getOut().close();
+                    cachedStream.closeFlowthroughStream();
+                }
+
+                try {
+                    handleResponse();
+                } finally {
+                    if (cachingForRetransmission && cachedStream != null) {
+                        cachedStream.close();
+                    }
+                }
             } catch (HttpRetryException e) {
                 String msg = "HTTP response '" + e.responseCode() + ": "
                              + connection.getResponseMessage() + "' invoking " + connection.getURL();
@@ -1957,10 +1964,6 @@
                                    + " invoking " + connection.getURL() + ": "
                                    + e.getMessage(), e,
                                    RuntimeException.class);
-            } finally {
-                if (cachingForRetransmission && cachedStream != null) {
-                    cachedStream.close();
-                }
             }
         }
         private <T extends Exception> T mapException(String msg, 



Mime
View raw message