[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    httpcomponents-core git commit: HTTPCORE-473: fixed classic i/o reverse proxy example
From:       olegk () apache ! org
Date:       2017-06-24 16:33:05
Message-ID: 9e38d42759db4d4293204f4dc89feb6b () git ! apache ! org
[Download RAW message or body]

Repository: httpcomponents-core
Updated Branches:
  refs/heads/4.4.x 0877c2882 -> 3a4fe27af


HTTPCORE-473: fixed classic i/o reverse proxy example


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/3a4fe27a
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/3a4fe27a
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/3a4fe27a

Branch: refs/heads/4.4.x
Commit: 3a4fe27afd894ac69514f51e57b6f6652fea4cab
Parents: 0877c28
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Sat Jun 24 18:28:43 2017 +0200
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Sat Jun 24 18:29:28 2017 +0200

----------------------------------------------------------------------
 .../http/examples/ElementalReverseProxy.java    | 24 ++++++++------------
 1 file changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3a4fe27a/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
                
----------------------------------------------------------------------
diff --git a/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java \
b/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java index \
                011fb42..bf442df 100644
--- a/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
+++ b/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
@@ -38,9 +38,7 @@ import org.apache.http.HttpClientConnection;
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseInterceptor;
 import org.apache.http.HttpServerConnection;
 import org.apache.http.impl.DefaultBHttpClientConnection;
 import org.apache.http.impl.DefaultBHttpServerConnection;
@@ -169,22 +167,18 @@ public class ElementalReverseProxy {
 
             // Set up HTTP protocol processor for incoming connections
             final HttpProcessor inhttpproc = new ImmutableHttpProcessor(
-                    new HttpRequestInterceptor[] {
-                            new RequestContent(),
-                            new RequestTargetHost(),
-                            new RequestConnControl(),
-                            new RequestUserAgent("Test/1.1"),
-                            new RequestExpectContinue(true)
-             });
+                    new ResponseDate(),
+                    new ResponseServer("Test/1.1"),
+                    new ResponseContent(),
+                    new ResponseConnControl());
 
             // Set up HTTP protocol processor for outgoing connections
             final HttpProcessor outhttpproc = new ImmutableHttpProcessor(
-                    new HttpResponseInterceptor[] {
-                            new ResponseDate(),
-                            new ResponseServer("Test/1.1"),
-                            new ResponseContent(),
-                            new ResponseConnControl()
-            });
+                    new RequestContent(),
+                    new RequestTargetHost(),
+                    new RequestConnControl(),
+                    new RequestUserAgent("Test/1.1"),
+                    new RequestExpectContinue(true));
 
             // Set up outgoing request executor
             final HttpRequestExecutor httpexecutor = new HttpRequestExecutor();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic