You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2010/04/17 18:31:47 UTC
svn commit: r935200 -
/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
Author: olegk
Date: Sat Apr 17 16:31:47 2010
New Revision: 935200
URL: http://svn.apache.org/viewvc?rev=935200&view=rev
Log:
Removed deprecated method call
Modified:
httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java?rev=935200&r1=935199&r2=935200&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpServiceHandler.java Sat Apr 17 16:31:47 2010
@@ -69,6 +69,7 @@ import org.apache.http.protocol.HttpProc
import org.apache.http.protocol.HttpRequestHandler;
import org.apache.http.protocol.HttpRequestHandlerResolver;
import org.apache.http.util.EncodingUtils;
+import org.apache.http.util.EntityUtils;
/**
* Service protocol handler implementation that provide compatibility with
@@ -550,9 +551,7 @@ public class ThrottlingHttpServiceHandle
if (request instanceof HttpEntityEnclosingRequest) {
HttpEntityEnclosingRequest eeRequest = (HttpEntityEnclosingRequest) request;
HttpEntity entity = eeRequest.getEntity();
- if (entity != null) {
- entity.consumeContent();
- }
+ EntityUtils.consume(entity);
}
// It should be safe to reset the input state at this point