hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r464630 - in /jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl: AsyncHttpClientConnection.java AsyncHttpServerConnection.java
Date Mon, 16 Oct 2006 19:15:29 GMT
Author: olegk
Date: Mon Oct 16 12:15:29 2006
New Revision: 464630

URL: http://svn.apache.org/viewvc?view=rev&rev=464630
Log:
Factored out the content length strategy code from the DefaultEntityDeserializer and DefaultEntitySerializer
classes. ContentLengthStrategy implementations can be used with the non-blocking HTTP transport
in HttpCore NIO 

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpClientConnection.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpServerConnection.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpClientConnection.java?view=diff&rev=464630&r1=464629&r2=464630
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpClientConnection.java
Mon Oct 16 12:15:29 2006
@@ -34,6 +34,8 @@
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.impl.entity.DefaultEntityDeserializer;
 import org.apache.http.impl.entity.DefaultEntitySerializer;
+import org.apache.http.impl.entity.LaxContentLengthStrategy;
+import org.apache.http.impl.entity.StrictContentLengthStrategy;
 import org.apache.http.nio.IOConsumer;
 import org.apache.http.nio.IOProducer;
 import org.apache.http.nio.IOSession;
@@ -77,8 +79,10 @@
         setHttpDataReceiver(datareceiver);
         setHttpDataTransmitter(datatransmitter);
         setResponseFactory(new DefaultHttpResponseFactory());
-        setEntitySerializer(new DefaultEntitySerializer());
-        setEntityDeserializer(new DefaultEntityDeserializer());
+        setEntitySerializer(new DefaultEntitySerializer(
+                new StrictContentLengthStrategy()));
+        setEntityDeserializer(new DefaultEntityDeserializer(
+                new LaxContentLengthStrategy()));
     }
 
     public IOConsumer getIOConsumer() {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpServerConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpServerConnection.java?view=diff&rev=464630&r1=464629&r2=464630
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/impl/AsyncHttpServerConnection.java
Mon Oct 16 12:15:29 2006
@@ -34,6 +34,8 @@
 import org.apache.http.impl.DefaultHttpRequestFactory;
 import org.apache.http.impl.entity.DefaultEntityDeserializer;
 import org.apache.http.impl.entity.DefaultEntitySerializer;
+import org.apache.http.impl.entity.LaxContentLengthStrategy;
+import org.apache.http.impl.entity.StrictContentLengthStrategy;
 import org.apache.http.nio.IOConsumer;
 import org.apache.http.nio.IOProducer;
 import org.apache.http.nio.IOSession;
@@ -75,8 +77,10 @@
         setHttpDataReceiver(datareceiver);
         setHttpDataTransmitter(datatransmitter);
         setRequestFactory(new DefaultHttpRequestFactory());
-        setEntitySerializer(new DefaultEntitySerializer());
-        setEntityDeserializer(new DefaultEntityDeserializer());
+        setEntitySerializer(new DefaultEntitySerializer(
+                new StrictContentLengthStrategy()));
+        setEntityDeserializer(new DefaultEntityDeserializer(
+                new LaxContentLengthStrategy()));
     }
 
     public IOConsumer getIOConsumer() {



Mime
View raw message