hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1553385 - /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java
Date Wed, 25 Dec 2013 14:08:46 GMT
Author: olegk
Date: Wed Dec 25 14:08:45 2013
New Revision: 1553385

URL: http://svn.apache.org/r1553385
Log:
HTTPASYNC-62: code improvement
Contributed by Dmitry Potapov <potapov.d at gmail.com>

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java?rev=1553385&r1=1553384&r2=1553385&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/methods/ZeroCopyConsumer.java
Wed Dec 25 14:08:45 2013
@@ -119,9 +119,7 @@ public abstract class ZeroCopyConsumer<T
 
     @Override
     protected T buildResult(final HttpContext context) throws Exception {
-        final FileEntity entity = new FileEntity(this.file);
-        entity.setContentType(this.response.getFirstHeader(HTTP.CONTENT_TYPE));
-        this.response.setEntity(entity);
+        this.response.setEntity(new FileEntity(this.file, this.contentType));
         return process(this.response, this.file, this.contentType);
     }
 



Mime
View raw message