git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1042005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-12-03 21:14:23 +00:00
parent 7a1a4b9d38
commit 23948c02cd
2 changed files with 13 additions and 2 deletions

View File

@ -45,7 +45,7 @@ import org.apache.http.protocol.HttpContext;
public class RequestAcceptEncoding implements HttpRequestInterceptor {
/**
* {@inheritDoc}
* Adds the header {@code "Accept-Encoding: gzip,deflate"} to the request.
*/
public void process(
final HttpRequest request,

View File

@ -52,7 +52,18 @@ import org.apache.http.protocol.HttpContext;
public class ResponseContentEncoding implements HttpResponseInterceptor {
/**
* {@inheritDoc}
* Handles the following {@code Content-Encoding}s by
* using the appropriate decompressor to wrap the response Entity:
* <ul>
* <li>gzip - see {@link GzipDecompressingEntity}</li>
* <li>deflate - see {@link DeflateDecompressingEntity}</li>
* <li>identity - no action needed</li>
* </ul>
*
* @param response the response which contains the entity
* @param context not currently used
*
* @throws HttpException if the {@code Content-Encoding} is none of the above
*/
public void process(
final HttpResponse response,