cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clecl...@apache.org
Subject svn commit: r919259 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Fri, 05 Mar 2010 01:17:32 GMT
Author: cleclerc
Date: Fri Mar  5 01:17:32 2010
New Revision: 919259

URL: http://svn.apache.org/viewvc?rev=919259&view=rev
Log:
Merged revisions 919255 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r919255 | cleclerc | 2010-03-05 02:10:39 +0100 (Fri, 05 Mar 2010) | 1 line
  
  [CXF-2537] Enhance exception message for ssl related problems
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:919255

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=919259&r1=919258&r2=919259&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Fri Mar  5 01:17:32 2010
@@ -1966,24 +1966,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();
@@ -2042,10 +2049,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