You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2013/11/19 13:56:31 UTC

svn commit: r1543412 - /cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java

Author: ay
Date: Tue Nov 19 12:56:31 2013
New Revision: 1543412

URL: http://svn.apache.org/r1543412
Log:
Merged revisions 1543406 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1543406 | ay | 2013-11-19 13:44:53 +0100 (Tue, 19 Nov 2013) | 10 lines

  Merged revisions 1543396 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1543396 | ay | 2013-11-19 12:47:33 +0100 (Tue, 19 Nov 2013) | 2 lines

    [CXF-5391] Response code is not logged for SOAP responses

  ........

........

Modified:
    cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1543412&r1=1543411&r2=1543412&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Tue Nov 19 12:56:31 2013
@@ -574,11 +574,12 @@ public abstract class AbstractHTTPDestin
     private int getReponseCodeFromMessage(Message message) {
         Integer i = (Integer)message.get(Message.RESPONSE_CODE);
         if (i != null) {
-            return i.intValue();  
-        } else if (hasNoResponseContent(message)) {
-            return HttpURLConnection.HTTP_ACCEPTED;
+            return i.intValue();
         } else {
-            return HttpURLConnection.HTTP_OK;
+            int code = hasNoResponseContent(message) ? HttpURLConnection.HTTP_ACCEPTED : HttpURLConnection.HTTP_OK;
+            // put the code in the message so that others can get it
+            message.put(Message.RESPONSE_CODE, code);
+            return code;
         }
     }