hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1369844 - in /httpcomponents/httpclient/trunk/httpclient/src: main/java/org/apache/http/impl/client/DecompressingHttpClient.java test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java
Date Mon, 06 Aug 2012 13:42:50 GMT
Author: ggregory
Date: Mon Aug  6 13:42:50 2012
New Revision: 1369844

URL: http://svn.apache.org/viewvc?rev=1369844&view=rev
Log:
[HTTPCLIENT-1220] Add DecompressingHttpClient#getHttpClient().

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DecompressingHttpClient.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DecompressingHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DecompressingHttpClient.java?rev=1369844&r1=1369843&r2=1369844&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DecompressingHttpClient.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DecompressingHttpClient.java
Mon Aug  6 13:42:50 2012
@@ -116,6 +116,15 @@ public class DecompressingHttpClient imp
         return execute(getHttpHost(request), request, (HttpContext)null);
     }
 
+    /**
+     * Gets the HttpClient to issue request.
+     * 
+     * @return the HttpClient to issue request
+     */
+    public HttpClient getHttpClient() {
+        return this.backend;
+    }
+
     HttpHost getHttpHost(HttpUriRequest request) {
         URI uri = request.getURI();
         return URIUtils.extractHost(uri);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java?rev=1369844&r1=1369843&r2=1369844&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestDecompressingHttpClient.java
Mon Aug  6 13:42:50 2012
@@ -80,6 +80,7 @@ public class TestDecompressingHttpClient
         handled = new Object();
         backend = new DummyHttpClient();
         impl = new DecompressingHttpClient(backend);
+        assertEquals(backend, impl.getHttpClient());
         request = new HttpGet("http://localhost:8080");
         ctx = new BasicHttpContext();
         host = new HttpHost("www.example.com");



Mime
View raw message