cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1398214 - in /cxf/branches/2.6.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/http/ rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/ rt/transports/http/src/main/resources/schemas/wsdl/ rt/transpor...
Date Mon, 15 Oct 2012 08:34:25 GMT
Author: ffang
Date: Mon Oct 15 08:34:24 2012
New Revision: 1398214

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

........
  r1398200 | ffang | 2012-10-15 14:57:20 +0800 (δΈ€, 15 10 2012) | 1 line
  
  [CXF-4555]enable http:conduit to configure the chunk size
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
    cxf/branches/2.6.x-fixes/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
    cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/HttpConduitConfigurationTest.java
    cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-bean.xml
    cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-tlsrefs-bean.xml

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1398200

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

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Mon Oct 15 08:34:24 2012
@@ -539,7 +539,6 @@ public class HTTPConduit 
                 connection.setChunkedStreamingMode(-1);                    
             }
         }
-
         cookies.writeToMessageHeaders(message);
 
         // The trust decision is relegated to after the "flushing" of the
@@ -1337,7 +1336,8 @@ public class HTTPConduit 
         @Override
         public void thresholdReached() {
             if (chunking) {
-                connection.setChunkedStreamingMode(-1);
+                connection.setChunkedStreamingMode(
+                    HTTPConduit.this.getClient().getChunkLength());
             }
         }
 

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/osgi/HTTPTransportActivator.java
Mon Oct 15 08:34:24 2012
@@ -525,6 +525,8 @@ public class HTTPTransportActivator 
                     p.setAllowChunking(Boolean.parseBoolean(v.trim()));
                 } else if ("ChunkingThreshold".equals(k)) {
                     p.setChunkingThreshold(Integer.parseInt(v.trim()));
+                } else if ("ChunkLength".equals(k)) {
+                    p.setChunkLength(Integer.parseInt(v.trim()));
                 } else if ("Connection".equals(k)) {
                     p.setConnection(ConnectionType.valueOf(v));
                 } else if ("DecoupledEndpoint".equals(k)) {

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
Mon Oct 15 08:34:24 2012
@@ -239,7 +239,11 @@
                         </xs:documentation>
                     </xs:annotation>      
                 </xs:attribute>
-
+                <xs:attribute name="ChunkLength" type="ptp:ParameterizedInt" use="optional"
default="-1">
+                    <xs:annotation>
+                        <xs:documentation>Specifies the chunk length for a HttpURLConnection.
This value is used in java.net.HttpURLConnection.setChunkedStreamingMode(int chunklen). chunklen
indicates the number of bytes to write in each chunk. If chunklen is less than or equal to
zero, a default value will be used.</xs:documentation>
+                    </xs:annotation>
+                </xs:attribute>
                 <xs:attribute name="Accept" type="xs:string" use="optional">
                     <xs:annotation>
                         <xs:documentation>

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/HttpConduitConfigurationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/HttpConduitConfigurationTest.java?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/HttpConduitConfigurationTest.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/HttpConduitConfigurationTest.java
Mon Oct 15 08:34:24 2012
@@ -38,6 +38,7 @@ import org.apache.cxf.configuration.secu
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.http.HTTPConduit;
 import org.apache.cxf.transport.http.HTTPTransportFactory;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -106,6 +107,8 @@ public class HttpConduitConfigurationTes
         assertNotNull(csfs);
         assertEquals(5, csfs.getInclude().size());
         assertEquals(1, csfs.getExclude().size());
+        HTTPClientPolicy clientPolicy = conduit.getClient();
+        assertEquals(10240, clientPolicy.getChunkLength());
     }
 
     

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-bean.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-bean.xml?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-bean.xml
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-bean.xml
Mon Oct 15 08:34:24 2012
@@ -55,7 +55,7 @@ http://www.springframework.org/schema/be
 	     <sec:UserName>Betty</sec:UserName>
 	     <sec:Password>password</sec:Password>
 	  </http:authorization>
-      <http:client AutoRedirect="true" Connection="Keep-Alive"/>
+      <http:client AutoRedirect="true" Connection="Keep-Alive" ChunkLength="10240"/>
 
    </http:conduit>    
 </beans>

Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-tlsrefs-bean.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-tlsrefs-bean.xml?rev=1398214&r1=1398213&r2=1398214&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-tlsrefs-bean.xml
(original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/test/java/org/apache/cxf/transport/http/spring/conduit-tlsrefs-bean.xml
Mon Oct 15 08:34:24 2012
@@ -51,7 +51,7 @@ http://www.springframework.org/schema/be
 	     <sec:UserName>Betty</sec:UserName>
 	     <sec:Password>password</sec:Password>
 	  </http:authorization>
-      <http:client AutoRedirect="true" Connection="Keep-Alive"/>
+      <http:client AutoRedirect="true" ChunkLength="10240" Connection="Keep-Alive"/>
 
    </http:conduit>    
 </beans>



Mime
View raw message