cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1543396 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Date Tue, 19 Nov 2013 11:47:33 GMT
Author: ay
Date: Tue Nov 19 11:47:33 2013
New Revision: 1543396

URL: http://svn.apache.org/r1543396
Log:
[CXF-5391] Response code is not logged for SOAP responses

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

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1543396&r1=1543395&r2=1543396&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Tue Nov 19 11:47:33 2013
@@ -584,11 +584,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;
         }
     }
 



Mime
View raw message