hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1370953 [5/5] - in /httpcomponents/httpclient/trunk: ./ fluent-hc/src/main/java/org/apache/http/client/fluent/ httpclient/src/main/java/org/apache/http/client/methods/ httpclient/src/main/java/org/apache/http/client/protocol/ httpclient/sr...
Date Wed, 08 Aug 2012 20:35:16 GMT
Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java (from r1369849, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRedirects.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRedirects.java&r1=1369849&r2=1370953&rev=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRedirects.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java Wed Aug  8 20:35:13 2012
@@ -24,7 +24,7 @@
  *
  */
 
-package org.apache.http.client.protocol;
+package org.apache.http.impl.client.integration;
 
 import java.io.IOException;
 import java.net.InetSocketAddress;
@@ -46,13 +46,12 @@ import org.apache.http.client.RedirectEx
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.params.ClientPNames;
+import org.apache.http.client.protocol.ClientContext;
 import org.apache.http.cookie.SM;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.BasicCookieStore;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.cookie.BasicClientCookie;
-import org.apache.http.localserver.BasicServerTestBase;
-import org.apache.http.localserver.LocalTestServer;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
@@ -67,14 +66,12 @@ import org.junit.Test;
 /**
  * Redirection test cases.
  */
-public class TestRedirects extends BasicServerTestBase {
+public class TestRedirects extends IntegrationTestBase {
 
     @Before
     public void setUp() throws Exception {
-        this.localServer = new LocalTestServer(null, null);
-        this.localServer.registerDefaultHandlers();
-        this.localServer.start();
-        this.httpclient = new DefaultHttpClient();
+        startServer();
+        this.httpclient = new HttpClientBuilder().build();
     }
 
     private static class BasicRedirectService implements HttpRequestHandler {
@@ -604,11 +601,9 @@ public class TestRedirects extends Basic
         int port = address.getPort();
         String host = address.getHostName();
 
-        this.localServer.register("*",
-                new BasicRedirectService(host, port));
+        this.localServer.register("*", new BasicRedirectService(host, port));
 
         CookieStore cookieStore = new BasicCookieStore();
-        this.httpclient.setCookieStore(cookieStore);
 
         BasicClientCookie cookie = new BasicClientCookie("name", "value");
         cookie.setDomain(host);
@@ -617,6 +612,7 @@ public class TestRedirects extends Basic
         cookieStore.addCookie(cookie);
 
         HttpContext context = new BasicHttpContext();
+        context.setAttribute(ClientContext.COOKIE_STORE, cookieStore);
         HttpGet httpget = new HttpGet("/oldlocation/");
 
 
@@ -639,8 +635,7 @@ public class TestRedirects extends Basic
         int port = address.getPort();
         String host = address.getHostName();
 
-        this.localServer.register("*",
-                new BasicRedirectService(host, port));
+        this.localServer.register("*", new BasicRedirectService(host, port));
 
         HttpContext context = new BasicHttpContext();
 

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestRedirects.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java (from r1369849, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestSPNegoScheme.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestSPNegoScheme.java&r1=1369849&r2=1370953&rev=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestSPNegoScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java Wed Aug  8 20:35:13 2012
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.http.impl.auth;
+package org.apache.http.impl.client.integration;
 
 import java.io.IOException;
 import java.security.Principal;
@@ -37,13 +37,15 @@ import org.apache.http.HttpStatus;
 import org.apache.http.auth.AuthScheme;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.Credentials;
+import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.params.AuthPolicy;
 import org.apache.http.client.params.ClientPNames;
 import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.localserver.BasicServerTestBase;
-import org.apache.http.localserver.LocalTestServer;
+import org.apache.http.impl.auth.SPNegoScheme;
+import org.apache.http.impl.auth.SPNegoSchemeFactory;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
@@ -64,15 +66,11 @@ import org.mockito.Mockito;
 /**
  * Tests for {@link NegotiateScheme}.
  */
-public class TestSPNegoScheme extends BasicServerTestBase {
+public class TestSPNegoScheme extends IntegrationTestBase {
 
     @Before
     public void setUp() throws Exception {
-        this.localServer = new LocalTestServer(null, null);
-
-        this.localServer.registerDefaultHandlers();
-        this.localServer.start();
-        this.httpclient = new DefaultHttpClient();
+        startServer();
     }
 
     /**
@@ -162,12 +160,15 @@ public class TestSPNegoScheme extends Ba
         HttpHost target = new HttpHost("localhost", port);
 
         SPNegoSchemeFactory nsf = new NegotiateSchemeFactoryWithMockGssManager();
-
-        this.httpclient.getAuthSchemes().register(AuthPolicy.SPNEGO, nsf);
-
+        CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); 
         Credentials use_jaas_creds = new UseJaasCredentials();
-        this.httpclient.getCredentialsProvider().setCredentials(
-                new AuthScope(null, -1, null), use_jaas_creds);
+        credentialsProvider.setCredentials(new AuthScope(null, -1, null), use_jaas_creds);
+
+        this.httpclient = new HttpClientBuilder()
+            .registerAuthScheme(AuthPolicy.SPNEGO, nsf)
+            .setCredentialsProvider(credentialsProvider)
+            .build();
+        
         this.httpclient.getParams().setParameter(ClientPNames.DEFAULT_HOST, target);
 
         String s = "/path";
@@ -191,13 +192,16 @@ public class TestSPNegoScheme extends Ba
 
         NegotiateSchemeFactoryWithMockGssManager nsf = new NegotiateSchemeFactoryWithMockGssManager();
 
-        this.httpclient.getAuthSchemes().register(AuthPolicy.SPNEGO, nsf);
-
+        CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); 
         Credentials use_jaas_creds = new UseJaasCredentials();
-        this.httpclient.getCredentialsProvider().setCredentials(
-                new AuthScope(null, -1, null), use_jaas_creds);
+        credentialsProvider.setCredentials(new AuthScope(null, -1, null), use_jaas_creds);
+        
+        this.httpclient = new HttpClientBuilder()
+            .registerAuthScheme(AuthPolicy.SPNEGO, nsf)
+            .setCredentialsProvider(credentialsProvider)
+            .build();
         this.httpclient.getParams().setParameter(ClientPNames.DEFAULT_HOST, target);
-
+        
         String s = "/path";
         HttpGet httpget = new HttpGet(s);
         HttpResponse response = this.httpclient.execute(httpget);

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestSPNegoScheme.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java (from r1369849, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java&r1=1369849&r2=1370953&rev=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestStatefulConnManagement.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java Wed Aug  8 20:35:13 2012
@@ -23,7 +23,7 @@
  * <http://www.apache.org/>.
  */
 
-package org.apache.http.impl.client;
+package org.apache.http.impl.client.integration;
 
 import java.io.IOException;
 
@@ -37,8 +37,8 @@ import org.apache.http.client.UserTokenH
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.conn.ManagedClientConnection;
 import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.conn.PoolingClientConnectionManager;
-import org.apache.http.localserver.ServerTestBase;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
@@ -48,12 +48,18 @@ import org.apache.http.protocol.HttpCont
 import org.apache.http.protocol.HttpRequestHandler;
 import org.apache.http.util.EntityUtils;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 /**
- * Unit tests for {@link DefaultRequestDirector}
+ * Test cases for state-ful connections.
  */
-public class TestStatefulConnManagement extends ServerTestBase {
+public class TestStatefulConnManagement extends IntegrationTestBase {
+
+    @Before
+    public void setUp() throws Exception {
+        startServer();
+    }
 
     private static class SimpleService implements HttpRequestHandler {
 
@@ -85,12 +91,23 @@ public class TestStatefulConnManagement 
         HttpParams params = new BasicHttpParams();
         HttpConnectionParams.setConnectionTimeout(params, 10);
 
-        PoolingClientConnectionManager mgr = new PoolingClientConnectionManager(supportedSchemes);
+        PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
         mgr.setMaxTotal(workerCount);
         mgr.setDefaultMaxPerRoute(workerCount);
 
+        UserTokenHandler userTokenHandler = new UserTokenHandler() {
+
+            public Object getUserToken(final HttpContext context) {
+                Integer id = (Integer) context.getAttribute("user");
+                return id;
+            }
 
-        DefaultHttpClient client = new DefaultHttpClient(mgr, params);
+        };
+        
+        this.httpclient = new HttpClientBuilder()
+            .setConnectionManager(mgr)
+            .setUserTokenHandler(userTokenHandler)
+            .build();
 
         HttpContext[] contexts = new HttpContext[workerCount];
         HttpWorker[] workers = new HttpWorker[workerCount];
@@ -98,19 +115,9 @@ public class TestStatefulConnManagement 
             HttpContext context = new BasicHttpContext();
             context.setAttribute("user", Integer.valueOf(i));
             contexts[i] = context;
-            workers[i] = new HttpWorker(context, requestCount, target, client);
+            workers[i] = new HttpWorker(context, requestCount, target, this.httpclient);
         }
 
-        client.setUserTokenHandler(new UserTokenHandler() {
-
-            public Object getUserToken(final HttpContext context) {
-                Integer id = (Integer) context.getAttribute("user");
-                return id;
-            }
-
-        });
-
-
         for (int i = 0; i < workers.length; i++) {
             workers[i].start();
         }
@@ -207,24 +214,27 @@ public class TestStatefulConnManagement 
         this.localServer.register("*", new SimpleService());
 
         // We build a client with 2 max active // connections, and 2 max per route.
-        PoolingClientConnectionManager connMngr = new PoolingClientConnectionManager(supportedSchemes);
+        PoolingClientConnectionManager connMngr = new PoolingClientConnectionManager();
         connMngr.setMaxTotal(maxConn);
         connMngr.setDefaultMaxPerRoute(maxConn);
 
-        DefaultHttpClient client = new DefaultHttpClient(connMngr);
-
-        client.setUserTokenHandler(new UserTokenHandler() {
+        UserTokenHandler userTokenHandler = new UserTokenHandler() {
 
             public Object getUserToken(final HttpContext context) {
                 return context.getAttribute("user");
             }
 
-        });
+        };
 
+        this.httpclient = new HttpClientBuilder()
+            .setConnectionManager(connMngr)
+            .setUserTokenHandler(userTokenHandler)
+            .build();
+        
         // Bottom of the pool : a *keep alive* connection to Route 1.
         HttpContext context1 = new BasicHttpContext();
         context1.setAttribute("user", "stuff");
-        HttpResponse response1 = client.execute(
+        HttpResponse response1 = this.httpclient.execute(
                 new HttpHost("localhost", port), new HttpGet("/"), context1);
         EntityUtils.consume(response1.getEntity());
 
@@ -237,7 +247,7 @@ public class TestStatefulConnManagement 
         // Send a very simple HTTP get (it MUST be simple, no auth, no proxy, no 302, no 401, ...)
         // Send it to another route. Must be a keepalive.
         HttpContext context2 = new BasicHttpContext();
-        HttpResponse response2 = client.execute(
+        HttpResponse response2 = this.httpclient.execute(
                 new HttpHost("127.0.0.1", port), new HttpGet("/"), context2);
         EntityUtils.consume(response2.getEntity());
         // ConnPoolByRoute now has 2 free connexions, out of its 2 max.
@@ -252,7 +262,7 @@ public class TestStatefulConnManagement 
         // The killed conn is the oldest, which means the first HTTPGet ([localhost][stuff]).
         // When this happens, the RouteSpecificPool becomes empty.
         HttpContext context3 = new BasicHttpContext();
-        HttpResponse response3 = client.execute(
+        HttpResponse response3 = this.httpclient.execute(
                 new HttpHost("localhost", port), new HttpGet("/"), context3);
 
         // If the ConnPoolByRoute did not behave coherently with the RouteSpecificPool

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestStatefulConnManagement.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/ExecReqThread.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/ExecReqThread.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/ExecReqThread.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/ExecReqThread.java Wed Aug  8 20:35:13 2012
@@ -27,126 +27,94 @@
 
 package org.apache.http.impl.conn;
 
+import java.util.concurrent.TimeUnit;
+
 import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
+import org.apache.http.client.protocol.ClientContext;
 import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.ClientConnectionRequest;
+import org.apache.http.conn.ManagedClientConnection;
 import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
+import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpProcessor;
 import org.apache.http.protocol.HttpRequestExecutor;
+import org.apache.http.protocol.ImmutableHttpProcessor;
+import org.apache.http.protocol.RequestConnControl;
+import org.apache.http.protocol.RequestContent;
 import org.apache.http.util.EntityUtils;
 
+class ExecReqThread extends Thread {
 
-/**
- * Executes a request from a new thread.
- *
- */
-public class ExecReqThread extends GetConnThread {
-
-    protected final ClientConnectionManager conn_manager;
-    protected final RequestSpec     request_spec;
-    protected volatile HttpResponse response;
-    protected volatile byte[]       response_data;
-
-
-    /**
-     * Executes a request.
-     * This involves the following steps:
-     * <ol>
-     * <li>obtain a connection (see base class)</li>
-     * <li>open the connection</li>
-     * <li>prepare context and request</li>
-     * <li>execute request to obtain the response</li>
-     * <li>consume the response entity (if there is one)</li>
-     * <li>release the connection</li>
-     * </ol>
-     */
-    public ExecReqThread(ClientConnectionManager mgr,
-                         HttpRoute route, long timeout,
-                         RequestSpec reqspec) {
-        super(mgr, route, timeout);
-        this.conn_manager = mgr;
-
-        request_spec = reqspec;
+    private final HttpRequest request;
+    private final HttpRoute route;
+    private final ClientConnectionManager connman;
+    private final long timeout;
+    
+    private volatile Exception exception;
+    private volatile HttpResponse response;
+    private volatile byte[] response_data;
+
+    public ExecReqThread(
+            HttpRequest request,
+            HttpRoute route, 
+            ClientConnectionManager mgr,
+            long timeout) {
+        super();
+        this.request = request;
+        this.route = route;
+        this.connman = mgr;
+        this.timeout = timeout;
     }
 
+    public Exception getException() {
+        return this.exception;
+    }
 
     public HttpResponse getResponse() {
-        return response;
+        return this.response;
     }
 
     public byte[] getResponseData() {
-        return response_data;
+        return this.response_data;
     }
 
-
-    /**
-     * This method is invoked when the thread is started.
-     * It invokes the base class implementation.
-     */
     @Override
     public void run() {
-        super.run();    // obtain connection
-        if (connection == null)
-            return;     // problem obtaining connection
-
         try {
-            request_spec.context.setAttribute
-                (ExecutionContext.HTTP_CONNECTION, connection);
-
-            doOpenConnection();
-
-            HttpRequest request = (HttpRequest) request_spec.context.
-                getAttribute(ExecutionContext.HTTP_REQUEST);
-            request_spec.executor.preProcess
-                (request, request_spec.processor, request_spec.context);
-
-            response = request_spec.executor.execute
-                (request, connection, request_spec.context);
-
-            request_spec.executor.postProcess
-                (response, request_spec.processor, request_spec.context);
-
-            doConsumeResponse();
-
+            
+            HttpProcessor processor = new ImmutableHttpProcessor(
+                    new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
+            HttpRequestExecutor executor = new HttpRequestExecutor();
+            HttpContext context = new BasicHttpContext();
+            HttpParams params = new BasicHttpParams();
+            
+            ClientConnectionRequest connRequest = this.connman.requestConnection(this.route, null);
+            ManagedClientConnection conn = connRequest.getConnection(this.timeout, TimeUnit.MILLISECONDS);
+            try {
+                context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, this.route.getTargetHost());
+                context.setAttribute(ClientContext.ROUTE, this.route);
+                context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+
+                conn.open(this.route, context, params);
+
+                executor.preProcess(this.request, processor, context);
+
+                this.response = executor.execute(this.request, conn, context);
+                if (this.response.getEntity() != null) {
+                    this.response_data = EntityUtils.toByteArray(this.response.getEntity());
+                }
+            } finally {
+                this.connman.releaseConnection(conn, -1, null);
+            }
         } catch (Exception ex) {
-            if (exception != null)
-                exception = ex;
-
-        } finally {
-            conn_manager.releaseConnection(connection, -1, null);
+            this.exception = ex;
         }
     }
 
-
-    /**
-     * Opens the connection after it has been obtained.
-     */
-    protected void doOpenConnection() throws Exception {
-        connection.open
-            (conn_route, request_spec.context, request_spec.params);
-    }
-
-    /**
-     * Reads the response entity, if there is one.
-     */
-    protected void doConsumeResponse() throws Exception {
-        if (response.getEntity() != null)
-            response_data = EntityUtils.toByteArray(response.getEntity());
-    }
-
-
-    /**
-     * Helper class collecting request data.
-     * The request and target are expected in the context.
-     */
-    public static class RequestSpec {
-        public HttpRequestExecutor executor;
-        public HttpProcessor processor;
-        public HttpContext context;
-        public HttpParams params;
-    }
-
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicConnManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicConnManager.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicConnManager.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestBasicConnManager.java Wed Aug  8 20:35:13 2012
@@ -31,44 +31,55 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
 import org.apache.http.conn.ManagedClientConnection;
 import org.apache.http.conn.routing.HttpRoute;
-import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.localserver.ServerTestBase;
+import org.apache.http.localserver.LocalServerTestBase;
 import org.apache.http.message.BasicHttpRequest;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
+import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.HttpProcessor;
+import org.apache.http.protocol.HttpRequestExecutor;
+import org.apache.http.protocol.ImmutableHttpProcessor;
+import org.apache.http.protocol.RequestConnControl;
+import org.apache.http.protocol.RequestContent;
 import org.apache.http.util.EntityUtils;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
-public class TestBasicConnManager extends ServerTestBase {
+public class TestBasicConnManager extends LocalServerTestBase {
 
-    public BasicClientConnectionManager createConnManager(SchemeRegistry schreg) {
-        if (schreg == null)
-            schreg = supportedSchemes;
-        return new BasicClientConnectionManager(schreg);
+    @Before 
+    public void setup() throws Exception {
+        startServer();
     }
-
+    
     /**
      * Tests that SCM can still connect to the same host after
      * a connection was aborted.
      */
     @Test
     public void testOpenAfterAbort() throws Exception {
-        BasicClientConnectionManager mgr = createConnManager(null);
+        BasicClientConnectionManager mgr = new BasicClientConnectionManager();
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         ManagedClientConnection conn = mgr.getConnection(route, null);
         conn.abortConnection();
 
         conn = mgr.getConnection(route, null);
         Assert.assertFalse("connection should have been closed", conn.isOpen());
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
 
         mgr.releaseConnection(conn, -1, null);
         mgr.shutdown();
@@ -79,24 +90,30 @@ public class TestBasicConnManager extend
      */
     @Test
     public void testReleaseConnectionWithTimeLimits() throws Exception {
+        BasicClientConnectionManager mgr = new BasicClientConnectionManager();
 
-        BasicClientConnectionManager mgr = createConnManager(null);
-
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
-        final int      rsplen = 8;
-        final String      uri = "/random/" + rsplen;
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
+        int      rsplen = 8;
+        String      uri = "/random/" + rsplen;
 
-        HttpRequest request =
-            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
+        HttpRequest request = new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
 
         ManagedClientConnection conn = mgr.getConnection(route, null);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
 
-        // a new context is created for each testcase, no need to reset
-        HttpResponse response = Helper.execute(
-                request, conn, target,
-                httpExecutor, httpProcessor, defaultParams, httpContext);
+        // a new context is created for each test case, no need to reset
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
+
+        HttpProcessor httpProcessor = new ImmutableHttpProcessor(
+                new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
+        
+        HttpRequestExecutor exec = new HttpRequestExecutor();
+        exec.preProcess(request, httpProcessor, context);
+        HttpResponse response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in first response",
                      HttpStatus.SC_OK,
@@ -113,10 +130,9 @@ public class TestBasicConnManager extend
         Assert.assertFalse("connection should have been closed", conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        conn.open(route, httpContext, defaultParams);
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        conn.open(route, context, params);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in second response",
                      HttpStatus.SC_OK,
@@ -134,9 +150,8 @@ public class TestBasicConnManager extend
         Assert.assertTrue("connection should have been open", conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in third response",
                      HttpStatus.SC_OK,
@@ -153,10 +168,9 @@ public class TestBasicConnManager extend
         Assert.assertTrue("connection should have been closed", !conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        conn.open(route, httpContext, defaultParams);
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        conn.open(route, context, params);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in third response",
                      HttpStatus.SC_OK,
@@ -171,14 +185,15 @@ public class TestBasicConnManager extend
 
     @Test
     public void testCloseExpiredConnections() throws Exception {
+        BasicClientConnectionManager mgr = new BasicClientConnectionManager();
 
-        BasicClientConnectionManager mgr = createConnManager(null);
-
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         ManagedClientConnection conn =  mgr.getConnection(route, null);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
         conn.markReusable();
         mgr.releaseConnection(conn, 100, TimeUnit.MILLISECONDS);
 
@@ -198,11 +213,10 @@ public class TestBasicConnManager extend
 
     @Test(expected=IllegalStateException.class)
     public void testAlreadyLeased() throws Exception {
+        BasicClientConnectionManager mgr = new BasicClientConnectionManager();
 
-        BasicClientConnectionManager mgr = createConnManager(null);
-
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
 
         ManagedClientConnection conn =  mgr.getConnection(route, null);
         mgr.releaseConnection(conn, 100, TimeUnit.MILLISECONDS);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestIdleConnectionEviction.java Wed Aug  8 20:35:13 2012
@@ -37,22 +37,15 @@ import org.apache.http.client.HttpClient
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.scheme.PlainSocketFactory;
-import org.apache.http.conn.scheme.Scheme;
-import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.localserver.LocalServerTestBase;
 import org.apache.http.localserver.LocalTestServer;
-import org.apache.http.localserver.ServerTestBase;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpConnectionParams;
-import org.apache.http.params.HttpParams;
 import org.apache.http.util.EntityUtils;
 import org.junit.Before;
 import org.junit.Test;
 
-public class TestIdleConnectionEviction extends ServerTestBase {
+public class TestIdleConnectionEviction extends LocalServerTestBase {
 
-    @Override
     @Before
     public void setUp() throws Exception {
         this.localServer = new LocalTestServer(null, null);
@@ -62,17 +55,11 @@ public class TestIdleConnectionEviction 
 
     @Test
     public void testIdleConnectionEviction() throws Exception {
-        HttpParams params = new BasicHttpParams();
-        HttpConnectionParams.setStaleCheckingEnabled(params, false);
-
-        SchemeRegistry schemeRegistry = new SchemeRegistry();
-        schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
-
-        PoolingClientConnectionManager cm = new PoolingClientConnectionManager(schemeRegistry);
+        PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
         cm.setDefaultMaxPerRoute(10);
         cm.setMaxTotal(50);
 
-        DefaultHttpClient httpclient = new DefaultHttpClient(cm, params);
+        HttpClient httpclient = new HttpClientBuilder().setConnectionManager(cm).build();
 
         IdleConnectionMonitor idleConnectionMonitor = new IdleConnectionMonitor(cm);
         idleConnectionMonitor.start();

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManager.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManager.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManager.java Wed Aug  8 20:35:13 2012
@@ -39,6 +39,7 @@ import java.util.concurrent.atomic.Atomi
 
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
@@ -54,22 +55,34 @@ import org.apache.http.conn.scheme.Plain
 import org.apache.http.conn.scheme.Scheme;
 import org.apache.http.conn.scheme.SchemeRegistry;
 import org.apache.http.conn.scheme.SchemeSocketFactory;
-import org.apache.http.localserver.ServerTestBase;
+import org.apache.http.localserver.LocalServerTestBase;
 import org.apache.http.message.BasicHttpRequest;
+import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.HttpProcessor;
+import org.apache.http.protocol.HttpRequestExecutor;
+import org.apache.http.protocol.ImmutableHttpProcessor;
+import org.apache.http.protocol.RequestConnControl;
+import org.apache.http.protocol.RequestContent;
 import org.apache.http.util.EntityUtils;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
 /**
  * Tests for <code>PoolingClientConnectionManager</code> that do require a server
  * to communicate with.
  */
-public class TestPoolingConnManager extends ServerTestBase {
+public class TestPoolingConnManager extends LocalServerTestBase {
 
+    @Before 
+    public void setup() throws Exception {
+        startServer();
+    }
+    
     /**
      * Tests executing several requests in parallel.
      */
@@ -90,22 +103,8 @@ public class TestPoolingConnManager exte
 
         ExecReqThread[] threads = new ExecReqThread [COUNT];
         for (int i=0; i<COUNT; i++) {
-
-            HttpRequest request = new BasicHttpRequest
-                ("GET", uri, HttpVersion.HTTP_1_1);
-
-            ExecReqThread.RequestSpec ertrs = new ExecReqThread.RequestSpec();
-            ertrs.executor = httpExecutor;
-            ertrs.processor = httpProcessor;
-            ertrs.context = new BasicHttpContext(null);
-            ertrs.params = defaultParams;
-
-            ertrs.context.setAttribute
-                (ExecutionContext.HTTP_TARGET_HOST, target);
-            ertrs.context.setAttribute
-                (ExecutionContext.HTTP_REQUEST, request);
-
-            threads[i] = new ExecReqThread(mgr, route, 5000L, ertrs);
+            HttpRequest request = new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
+            threads[i] = new ExecReqThread(request, route, mgr, 5000L);
         }
 
         for (int i=0; i<threads.length; i++) {
@@ -155,21 +154,27 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
-        final int      rsplen = 8;
-        final String      uri = "/random/" + rsplen;
-
-        HttpRequest request =
-            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
-
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        int      rsplen = 8;
+        String      uri = "/random/" + rsplen;
+
+        HttpRequest request = new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
+        
         ManagedClientConnection conn = getConnection(mgr, route);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
+
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
 
-        // a new context is created for each testcase, no need to reset
-        HttpResponse response = Helper.execute(
-                request, conn, target,
-                httpExecutor, httpProcessor, defaultParams, httpContext);
+        HttpProcessor httpProcessor = new ImmutableHttpProcessor(
+                new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
+        
+        HttpRequestExecutor exec = new HttpRequestExecutor();
+        exec.preProcess(request, httpProcessor, context);
+        HttpResponse response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in first response",
                      HttpStatus.SC_OK,
@@ -194,11 +199,11 @@ public class TestPoolingConnManager exte
         conn = getConnection(mgr, route);
         Assert.assertFalse("connection should have been closed", conn.isOpen());
 
+        conn.open(route, context, params);
+
         // repeat the communication, no need to prepare the request again
-        conn.open(route, httpContext, defaultParams);
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in second response",
                      HttpStatus.SC_OK,
@@ -216,9 +221,8 @@ public class TestPoolingConnManager exte
         Assert.assertTrue("connection should have been open", conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in third response",
                      HttpStatus.SC_OK,
@@ -241,21 +245,27 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
-        final int      rsplen = 8;
-        final String      uri = "/random/" + rsplen;
-
-        HttpRequest request =
-            new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        int      rsplen = 8;
+        String      uri = "/random/" + rsplen;
+
+        HttpRequest request = new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         ManagedClientConnection conn = getConnection(mgr, route);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
+
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
 
-        // a new context is created for each testcase, no need to reset
-        HttpResponse response = Helper.execute(
-                request, conn, target,
-                httpExecutor, httpProcessor, defaultParams, httpContext);
+        HttpProcessor httpProcessor = new ImmutableHttpProcessor(
+                new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
+        
+        HttpRequestExecutor exec = new HttpRequestExecutor();
+        exec.preProcess(request, httpProcessor, context);
+        HttpResponse response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in first response",
                      HttpStatus.SC_OK,
@@ -281,10 +291,10 @@ public class TestPoolingConnManager exte
         Assert.assertFalse("connection should have been closed", conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        conn.open(route, httpContext, defaultParams);
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        conn.open(route, context, params);
+        
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in second response",
                      HttpStatus.SC_OK,
@@ -302,9 +312,8 @@ public class TestPoolingConnManager exte
         Assert.assertTrue("connection should have been open", conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in third response",
                      HttpStatus.SC_OK,
@@ -321,10 +330,10 @@ public class TestPoolingConnManager exte
         Assert.assertTrue("connection should have been closed", !conn.isOpen());
 
         // repeat the communication, no need to prepare the request again
-        conn.open(route, httpContext, defaultParams);
-        httpContext.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
-        response = httpExecutor.execute(request, conn, httpContext);
-        httpExecutor.postProcess(response, httpProcessor, httpContext);
+        conn.open(route, context, params);
+        
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in third response",
                      HttpStatus.SC_OK,
@@ -343,11 +352,13 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         ManagedClientConnection conn = getConnection(mgr, route);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
 
         Assert.assertEquals(1, mgr.getTotalStats().getLeased());
         Assert.assertEquals(1, mgr.getStats(route).getLeased());
@@ -382,11 +393,13 @@ public class TestPoolingConnManager exte
                 SchemeRegistryFactory.createDefault(), 100, TimeUnit.MILLISECONDS);
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         ManagedClientConnection conn = getConnection(mgr, route);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
 
         Assert.assertEquals(1, mgr.getTotalStats().getLeased());
         Assert.assertEquals(1, mgr.getStats(route).getLeased());
@@ -425,21 +438,28 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
-        final int      rsplen = 8;
-        final String      uri = "/random/" + rsplen;
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        int      rsplen = 8;
+        String      uri = "/random/" + rsplen;
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         HttpRequest request =
             new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1);
 
         ManagedClientConnection conn = getConnection(mgr, route);
-        conn.open(route, httpContext, defaultParams);
+        conn.open(route, context, params);
 
-        // a new context is created for each testcase, no need to reset
-        HttpResponse response = Helper.execute(
-                request, conn, target,
-                httpExecutor, httpProcessor, defaultParams, httpContext);
+        context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
+        context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
+
+        HttpProcessor httpProcessor = new ImmutableHttpProcessor(
+                new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
+        
+        HttpRequestExecutor exec = new HttpRequestExecutor();
+        exec.preProcess(request, httpProcessor, context);
+        HttpResponse response = exec.execute(request, conn, context);
 
         Assert.assertEquals("wrong status in first response",
                      HttpStatus.SC_OK,
@@ -478,8 +498,10 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager(registry);
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         final ManagedClientConnection conn = getConnection(mgr, route);
 
@@ -498,7 +520,7 @@ public class TestPoolingConnManager exte
         abortingThread.start();
 
         try {
-            conn.open(route, httpContext, defaultParams);
+            conn.open(route, context, params);
             Assert.fail("expected SocketException");
         } catch(SocketException expected) {}
 
@@ -529,8 +551,10 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager(registry);
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         final ManagedClientConnection conn = getConnection(mgr, route);
 
@@ -549,7 +573,7 @@ public class TestPoolingConnManager exte
         abortingThread.start();
 
         try {
-            conn.open(route, httpContext, defaultParams);
+            conn.open(route, context, params);
             Assert.fail("expected exception");
         } catch(IOException expected) {
             Assert.assertEquals("Connection already shutdown", expected.getMessage());
@@ -582,8 +606,10 @@ public class TestPoolingConnManager exte
         PoolingClientConnectionManager mgr = new PoolingClientConnectionManager(registry);
         mgr.setMaxTotal(1);
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         final ManagedClientConnection conn = getConnection(mgr, route);
 
@@ -602,7 +628,7 @@ public class TestPoolingConnManager exte
         abortingThread.start();
 
         try {
-            conn.open(route, httpContext, defaultParams);
+            conn.open(route, context, params);
             Assert.fail("expected SocketException");
         } catch(SocketException expected) {}
 
@@ -644,8 +670,10 @@ public class TestPoolingConnManager exte
         mgr.setMaxTotal(1);
         Assert.assertNotNull(operatorRef.get());
 
-        final HttpHost target = getServerHttp();
-        final HttpRoute route = new HttpRoute(target, null, false);
+        HttpHost target = getServerHttp();
+        HttpRoute route = new HttpRoute(target, null, false);
+        HttpContext context = new BasicHttpContext();
+        HttpParams params = new BasicHttpParams();
 
         final ManagedClientConnection conn = getConnection(mgr, route);
 
@@ -664,7 +692,7 @@ public class TestPoolingConnManager exte
         abortingThread.start();
 
         try {
-            conn.open(route, httpContext, defaultParams);
+            conn.open(route, context, params);
             Assert.fail("expected exception");
         } catch(IOException iox) {
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManagerNoServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManagerNoServer.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManagerNoServer.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestPoolingConnManagerNoServer.java Wed Aug  8 20:35:13 2012
@@ -36,6 +36,7 @@ import org.apache.http.conn.ClientConnec
 import org.apache.http.conn.ConnectionPoolTimeoutException;
 import org.apache.http.conn.ManagedClientConnection;
 import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.impl.conn.tsccm.GetConnThread;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;

Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java (from r1369849, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/GetConnThread.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/GetConnThread.java&r1=1369849&r2=1370953&rev=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/GetConnThread.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java Wed Aug  8 20:35:13 2012
@@ -25,7 +25,7 @@
  *
  */
 
-package org.apache.http.impl.conn;
+package org.apache.http.impl.conn.tsccm;
 
 import java.util.concurrent.TimeUnit;
 

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/GetConnThread.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestConnPoolByRoute.java Wed Aug  8 20:35:13 2012
@@ -40,19 +40,21 @@ import org.apache.http.conn.OperatedClie
 import org.apache.http.conn.params.ConnPerRouteBean;
 import org.apache.http.conn.routing.HttpRoute;
 import org.apache.http.impl.conn.DefaultClientConnectionOperator;
-import org.apache.http.localserver.ServerTestBase;
+import org.apache.http.impl.conn.SchemeRegistryFactory;
+import org.apache.http.localserver.LocalServerTestBase;
 import org.apache.http.params.BasicHttpParams;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 
 @SuppressWarnings("deprecation")
 @RunWith(MockitoJUnitRunner.class)
 @Deprecated
-public class TestConnPoolByRoute extends ServerTestBase {
+public class TestConnPoolByRoute extends LocalServerTestBase {
 
     private ConnPoolByRoute impl;
     private HttpRoute route = new HttpRoute(new HttpHost("localhost"));
@@ -63,19 +65,18 @@ public class TestConnPoolByRoute extends
     @Mock private ClientConnectionOperator mockOperator;
 
     @Before
-    @Override
     public void setUp() throws Exception {
-        super.setUp();
+        startServer();
         impl = new ConnPoolByRoute(
-                new DefaultClientConnectionOperator(supportedSchemes),
+                new DefaultClientConnectionOperator(SchemeRegistryFactory.createDefault()),
                 new ConnPerRouteBean(), 1, -1, TimeUnit.MILLISECONDS);
     }
 
     private void useMockOperator() {
-        reset(mockOperator);
+        Mockito.reset(mockOperator);
         impl = new ConnPoolByRoute(
                 mockOperator, new ConnPerRouteBean(), 1, -1, TimeUnit.MILLISECONDS);
-        when(mockOperator.createConnection()).thenReturn(mockConnection);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection);
     }
 
     @Test
@@ -84,7 +85,7 @@ public class TestConnPoolByRoute extends
         final HttpRoute route = new HttpRoute(target, null, false);
 
         ClientConnectionOperator operator = new DefaultClientConnectionOperator(
-                supportedSchemes);
+                SchemeRegistryFactory.createDefault());
 
         ConnPerRouteBean connPerRoute = new ConnPerRouteBean(3);
         ConnPoolByRoute connPool = new ConnPoolByRoute(operator, connPerRoute, 20);
@@ -129,7 +130,7 @@ public class TestConnPoolByRoute extends
         final HttpRoute route = new HttpRoute(target, null, false);
 
         ClientConnectionOperator operator = new DefaultClientConnectionOperator(
-                supportedSchemes);
+                SchemeRegistryFactory.createDefault());
 
         ConnPerRouteBean connPerRoute = new ConnPerRouteBean(3);
         ConnPoolByRoute connPool = new ConnPoolByRoute(operator, connPerRoute, 20);
@@ -198,13 +199,15 @@ public class TestConnPoolByRoute extends
 
     @Test(expected=IllegalArgumentException.class)
     public void nullConnPerRouteIsNotAllowed() {
-        new ConnPoolByRoute(new DefaultClientConnectionOperator(supportedSchemes),
+        new ConnPoolByRoute(new DefaultClientConnectionOperator(
+                SchemeRegistryFactory.createDefault()),
                 null, 1, -1, TimeUnit.MILLISECONDS);
     }
 
     @Test
     public void deprecatedConstructorIsStillSupported() {
-        new ConnPoolByRoute(new DefaultClientConnectionOperator(supportedSchemes),
+        new ConnPoolByRoute(new DefaultClientConnectionOperator(
+                SchemeRegistryFactory.createDefault()),
                 new BasicHttpParams());
     }
 
@@ -269,7 +272,7 @@ public class TestConnPoolByRoute extends
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.shutdown();
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
-        verify(mockConnection, atLeastOnce()).close();
+        Mockito.verify(mockConnection, Mockito.atLeastOnce()).close();
     }
 
     @Test
@@ -278,7 +281,7 @@ public class TestConnPoolByRoute extends
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
         assertFalse(impl.freeConnections.isEmpty());
-        when(mockConnection.isOpen()).thenReturn(false);
+        Mockito.when(mockConnection.isOpen()).thenReturn(false);
         impl.deleteClosedConnections();
         assertTrue(impl.freeConnections.isEmpty());
         assertEquals(0, impl.numConnections);
@@ -290,7 +293,7 @@ public class TestConnPoolByRoute extends
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
         assertFalse(impl.freeConnections.isEmpty());
-        when(mockConnection.isOpen()).thenReturn(true);
+        Mockito.when(mockConnection.isOpen()).thenReturn(true);
         impl.deleteClosedConnections();
         assertFalse(impl.freeConnections.isEmpty());
         assertEquals(1, impl.numConnections);
@@ -303,7 +306,7 @@ public class TestConnPoolByRoute extends
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
         Thread.sleep(200L);
         impl.closeIdleConnections(1, TimeUnit.MILLISECONDS);
-        verify(mockConnection, atLeastOnce()).close();
+        Mockito.verify(mockConnection, Mockito.atLeastOnce()).close();
     }
 
     @Test
@@ -312,7 +315,7 @@ public class TestConnPoolByRoute extends
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
         impl.closeIdleConnections(3, TimeUnit.SECONDS);
-        verify(mockConnection, never()).close();
+        Mockito.verify(mockConnection, Mockito.never()).close();
     }
 
     @Test
@@ -322,7 +325,7 @@ public class TestConnPoolByRoute extends
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
         Thread.sleep(200L);
         impl.closeExpiredConnections();
-        verify(mockConnection, atLeastOnce()).close();
+        Mockito.verify(mockConnection, Mockito.atLeastOnce()).close();
     }
 
     @Test
@@ -332,7 +335,7 @@ public class TestConnPoolByRoute extends
         impl.freeEntry(entry, true, 10, TimeUnit.SECONDS);
         Thread.sleep(200L);
         impl.closeExpiredConnections();
-        verify(mockConnection, never()).close();
+        Mockito.verify(mockConnection, Mockito.never()).close();
     }
 
     @Test
@@ -340,21 +343,21 @@ public class TestConnPoolByRoute extends
         useMockOperator();
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, false, 0, TimeUnit.MILLISECONDS);
-        verify(mockConnection, atLeastOnce()).close();
+        Mockito.verify(mockConnection, Mockito.atLeastOnce()).close();
     }
 
     @Test
     public void handlesExceptionsWhenClosingConnections() throws Exception {
         useMockOperator();
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
-        doThrow(new IOException()).when(mockConnection).close();
+        Mockito.doThrow(new IOException()).when(mockConnection).close();
         impl.freeEntry(entry, false, 0, TimeUnit.MILLISECONDS);
     }
 
     @Test
     public void wakesUpWaitingThreadsWhenEntryAvailable() throws Exception {
         useMockOperator();
-        when(mockOperator.createConnection()).thenReturn(mockConnection);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection);
         impl.setMaxTotalConnections(1);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         final Flag f = new Flag(false);
@@ -378,7 +381,7 @@ public class TestConnPoolByRoute extends
     @Test
     public void wakesUpWaitingThreadsOnOtherRoutesWhenEntryAvailable() throws Exception {
         useMockOperator();
-        when(mockOperator.createConnection()).thenReturn(mockConnection);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection);
         impl.setMaxTotalConnections(1);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         final Flag f = new Flag(false);
@@ -402,7 +405,7 @@ public class TestConnPoolByRoute extends
     @Test
     public void doesNotRecycleExpiredConnections() throws Exception {
         useMockOperator();
-        when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
         Thread.sleep(200L);
@@ -413,20 +416,20 @@ public class TestConnPoolByRoute extends
     @Test
     public void closesExpiredConnectionsWhenNotReusingThem() throws Exception {
         useMockOperator();
-        when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection, mockConnection2);
         BasicPoolEntry entry = impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         impl.freeEntry(entry, true, 1, TimeUnit.MILLISECONDS);
         Thread.sleep(200L);
         impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
-        verify(mockConnection, atLeastOnce()).close();
+        Mockito.verify(mockConnection, Mockito.atLeastOnce()).close();
     }
 
 
     @Test
     public void wakesUpWaitingThreadsOnShutdown() throws Exception {
         useMockOperator();
-        when(mockOperator.createConnection()).thenReturn(mockConnection);
-        when(mockOperator.createConnection()).thenReturn(mockConnection);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection);
+        Mockito.when(mockOperator.createConnection()).thenReturn(mockConnection);
         impl.setMaxTotalConnections(1);
         impl.requestPoolEntry(route, new Object()).getPoolEntry(-1, TimeUnit.MILLISECONDS);
         final Flag f = new Flag(false);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/tsccm/TestSpuriousWakeup.java Wed Aug  8 20:35:13 2012
@@ -41,7 +41,6 @@ import org.apache.http.conn.scheme.Plain
 import org.apache.http.conn.scheme.Scheme;
 import org.apache.http.conn.scheme.SchemeRegistry;
 import org.apache.http.conn.scheme.SchemeSocketFactory;
-import org.apache.http.impl.conn.GetConnThread;
 import org.junit.Assert;
 import org.junit.Test;
 

Copied: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java (from r1369849, httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/BasicServerTestBase.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java?p2=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java&p1=httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/BasicServerTestBase.java&r1=1369849&r2=1370953&rev=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/BasicServerTestBase.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java Wed Aug  8 20:35:13 2012
@@ -30,26 +30,16 @@ package org.apache.http.localserver;
 import java.net.InetSocketAddress;
 
 import org.apache.http.HttpHost;
-import org.apache.http.impl.client.DefaultHttpClient;
 import org.junit.After;
-import org.mockito.Mockito;
 
 /**
  * Base class for tests using {@link LocalTestServer}. The server will not be started
  * per default.
  */
-public abstract class BasicServerTestBase extends Mockito {
+public abstract class LocalServerTestBase {
 
     /** The local server for testing. */
     protected LocalTestServer localServer;
-    protected DefaultHttpClient httpclient;
-
-    @After
-    public void shutDownClient() throws Exception {
-        if (httpclient != null) {
-            httpclient.getConnectionManager().shutdown();
-        }
-    }
 
     @After
     public void shutDownServer() throws Exception {
@@ -58,6 +48,14 @@ public abstract class BasicServerTestBas
         }
     }
 
+    protected void startServer() throws Exception {
+        if (localServer == null) {
+            localServer = new LocalTestServer(null, null);
+            localServer.registerDefaultHandlers();
+        }
+        localServer.start();
+    }
+    
     /**
      * Obtains the address of the local test server.
      *

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/localserver/LocalServerTestBase.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpclient/trunk/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/pom.xml?rev=1370953&r1=1370952&r2=1370953&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/pom.xml (original)
+++ httpcomponents/httpclient/trunk/pom.xml Wed Aug  8 20:35:13 2012
@@ -76,7 +76,7 @@
     <junit.version>4.9</junit.version>
     <easymock.version>2.5.2</easymock.version>
     <mockito.version>1.8.5</mockito.version>
-    <api.comparison.version>4.1</api.comparison.version>
+    <api.comparison.version>4.2</api.comparison.version>
   </properties>
 
   <repositories>



Mime
View raw message