cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1167059 - in /cxf/branches/2.4.x-fixes: ./ api/src/main/java/org/apache/cxf/message/Message.java rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Fri, 09 Sep 2011 09:40:07 GMT
Author: ningjiang
Date: Fri Sep  9 09:40:06 2011
New Revision: 1167059

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

........
  r1167046 | ningjiang | 2011-09-09 16:49:07 +0800 (Fri, 09 Sep 2011) | 1 line
  
  CXF-3796 Introduce an header to disable the handling the PartialResponse when the response
code is 202
........

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

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep  9 09:40:06 2011
@@ -1 +1 @@
-/cxf/trunk:1166907
+/cxf/trunk:1166907,1167046

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

Modified: cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java?rev=1167059&r1=1167058&r2=1167059&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java (original)
+++ cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java Fri Sep
 9 09:40:06 2011
@@ -67,7 +67,9 @@ public interface Message extends StringM
      */
     String DECOUPLED_CHANNEL_MESSAGE = "decoupled.channel.message";
     String PARTIAL_RESPONSE_MESSAGE = "org.apache.cxf.partial.response";
+    String HANDLING_PARTIAL_RESPONSE_MESSAGE = "org.apache.cxf.partial.response.handling";
     String ONE_WAY_REQUEST = "OnewayRequest";
+    
 
     
     String HTTP_REQUEST_METHOD = "org.apache.cxf.request.method";

Modified: cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1167059&r1=1167058&r2=1167059&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Fri Sep  9 09:40:06 2011
@@ -1529,6 +1529,13 @@ public class HTTPConduit 
         protected void handleResponseInternal() throws IOException {
             Exchange exchange = outMessage.getExchange();
             int responseCode = connection.getResponseCode();
+            // handling the particalResponse by default
+            boolean handlingParticalResponse = true;
+            // this option will be set to false when we leverage the CXF transport to send
stream message
+            if (Boolean.FALSE.equals(outMessage.get(Message.HANDLING_PARTIAL_RESPONSE_MESSAGE)))
{
+                handlingParticalResponse = false;
+            }
+            
             if (outMessage != null && exchange != null) {
                 exchange.put(Message.RESPONSE_CODE, responseCode);
             }
@@ -1546,7 +1553,8 @@ public class HTTPConduit 
 
             InputStream in = null;
             // oneway or decoupled twoway calls may expect HTTP 202 with no content
-            if (isOneway(exchange) || HttpURLConnection.HTTP_ACCEPTED == responseCode) {
+            if (isOneway(exchange) 
+                || (HttpURLConnection.HTTP_ACCEPTED == responseCode && handlingParticalResponse))
{
                 in = ChunkedUtil.getPartialResponse(connection, responseCode);
                 if (in == null) {
                     // oneway operation or decoupled MEP without 



Mime
View raw message