Author: ningjiang Date: Fri Sep 9 11:15:38 2011 New Revision: 1167097 URL: http://svn.apache.org/viewvc?rev=1167097&view=rev Log: Merged revisions 1167059 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................ r1167059 | ningjiang | 2011-09-09 17:40:06 +0800 (Fri, 09 Sep 2011) | 9 lines 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.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Sep 9 11:15:38 2011 @@ -1,2 +1,2 @@ -/cxf/branches/2.4.x-fixes:1164609,1166212 -/cxf/trunk:1164536,1166211 +/cxf/branches/2.4.x-fixes:1164609,1166212,1167059 +/cxf/trunk:1164536,1166211,1167046 Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java?rev=1167097&r1=1167096&r2=1167097&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java (original) +++ cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/message/Message.java Fri Sep 9 11:15:38 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.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1167097&r1=1167096&r2=1167097&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original) +++ cxf/branches/2.3.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Fri Sep 9 11:15:38 2011 @@ -2266,6 +2266,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); } @@ -2304,7 +2311,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 = getPartialResponse(connection, responseCode); if (in == null) { // oneway operation or decoupled MEP without
