hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1487529 - in /httpcomponents/httpcore/trunk: httpcore-ab/src/main/java/org/apache/http/benchmark/ httpcore-nio/src/examples/org/apache/http/examples/nio/ httpcore-nio/src/test/java/org/apache/http/nio/integration/ httpcore-nio/src/test/jav...
Date Wed, 29 May 2013 16:10:00 GMT
Author: olegk
Date: Wed May 29 16:10:00 2013
New Revision: 1487529

URL: http://svn.apache.org/r1487529
Log:
HTTPCORE-342: reverted to 'expect-continue' disabled by default

Modified:
    httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java

Modified: httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
Wed May 29 16:10:00 2013
@@ -90,7 +90,7 @@ class BenchmarkWorker implements Runnabl
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent("HttpCore-AB/1.1"),
-                new RequestExpectContinue());
+                new RequestExpectContinue(true));
         this.httpexecutor = new HttpRequestExecutor();
 
         this.connstrategy = DefaultConnectionReuseStrategy.INSTANCE;

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
Wed May 29 16:10:00 2013
@@ -66,7 +66,7 @@ public class NHttpClient {
                 .add(new RequestTargetHost())
                 .add(new RequestConnControl())
                 .add(new RequestUserAgent("Test/1.1"))
-                .add(new RequestExpectContinue()).build();
+                .add(new RequestExpectContinue(true)).build();
         // Create client-side HTTP protocol handler
         HttpAsyncRequestExecutor protocolHandler = new HttpAsyncRequestExecutor();
         // Create client-side I/O event dispatch

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
Wed May 29 16:10:00 2013
@@ -144,7 +144,7 @@ public class NHttpReverseProxy {
                         new RequestTargetHost(),
                         new RequestConnControl(),
                         new RequestUserAgent("Test/1.1"),
-                        new RequestExpectContinue()
+                        new RequestExpectContinue(true)
         });
 
         ProxyClientProtocolHandler clientHandler = new ProxyClientProtocolHandler();

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
Wed May 29 16:10:00 2013
@@ -396,7 +396,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -491,7 +491,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -671,7 +671,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -792,7 +792,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -887,7 +887,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -989,7 +989,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,
@@ -1087,7 +1087,7 @@ public class TestAsyncNHttpHandlers exte
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
                 clientHttpProc,

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
Wed May 29 16:10:00 2013
@@ -338,7 +338,7 @@ public class TestHttpAsyncHandlers exten
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final InetSocketAddress address = start(clientHttpProc, null, registry, null);
 
@@ -379,7 +379,7 @@ public class TestHttpAsyncHandlers exten
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final InetSocketAddress address = start(clientHttpProc, null, registry, null);
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java
Wed May 29 16:10:00 2013
@@ -414,7 +414,7 @@ public class TestThrottlingNHttpHandlers
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final ThrottlingHttpClientHandler clientHandler = new ThrottlingHttpClientHandler(
                 clientHttpProc,
@@ -512,7 +512,7 @@ public class TestThrottlingNHttpHandlers
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final ThrottlingHttpClientHandler clientHandler = new ThrottlingHttpClientHandler(
                 clientHttpProc,
@@ -633,7 +633,7 @@ public class TestThrottlingNHttpHandlers
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final ThrottlingHttpClientHandler clientHandler = new ThrottlingHttpClientHandler(
                 clientHttpProc,
@@ -797,7 +797,7 @@ public class TestThrottlingNHttpHandlers
                 new RequestTargetHost(),
                 new RequestConnControl(),
                 new RequestUserAgent(),
-                new RequestExpectContinue()});
+                new RequestExpectContinue(true)});
 
         final ThrottlingHttpClientHandler clientHandler = new ThrottlingHttpClientHandler(
                 clientHttpProc,

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
Wed May 29 16:10:00 2013
@@ -82,7 +82,7 @@ public class HttpClientNio {
                     new RequestTargetHost(),
                     new RequestConnControl(),
                     new RequestUserAgent("TEST-CLIENT/1.1"),
-                    new RequestExpectContinue()});
+                    new RequestExpectContinue(true)});
 
     private final DefaultConnectingIOReactor ioReactor;
     private final BasicNIOConnPool connpool;

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java
Wed May 29 16:10:00 2013
@@ -60,7 +60,7 @@ public class ElementalHttpGet {
             .add(new RequestTargetHost())
             .add(new RequestConnControl())
             .add(new RequestUserAgent("Test/1.1"))
-            .add(new RequestExpectContinue()).build();
+            .add(new RequestExpectContinue(true)).build();
 
         HttpRequestExecutor httpexecutor = new HttpRequestExecutor();
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java
Wed May 29 16:10:00 2013
@@ -65,7 +65,7 @@ public class ElementalHttpPost {
             .add(new RequestTargetHost())
             .add(new RequestConnControl())
             .add(new RequestUserAgent("Test/1.1"))
-            .add(new RequestExpectContinue()).build();
+            .add(new RequestExpectContinue(true)).build();
 
         HttpRequestExecutor httpexecutor = new HttpRequestExecutor();
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
Wed May 29 16:10:00 2013
@@ -66,7 +66,7 @@ public class ElementalPoolingHttpGet {
             .add(new RequestTargetHost())
             .add(new RequestConnControl())
             .add(new RequestUserAgent("Test/1.1"))
-            .add(new RequestExpectContinue()).build();
+            .add(new RequestExpectContinue(true)).build();
 
         final HttpRequestExecutor httpexecutor = new HttpRequestExecutor();
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
Wed May 29 16:10:00 2013
@@ -179,7 +179,7 @@ public class ElementalReverseProxy {
                             new RequestTargetHost(),
                             new RequestConnControl(),
                             new RequestUserAgent("Test/1.1"),
-                            new RequestExpectContinue()
+                            new RequestExpectContinue(true)
              });
 
             // Set up HTTP protocol processor for outgoing connections

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java
Wed May 29 16:10:00 2013
@@ -51,8 +51,22 @@ import org.apache.http.util.Args;
 @SuppressWarnings("deprecation")
 public class RequestExpectContinue implements HttpRequestInterceptor {
 
+    private final boolean activeByDefault;
+
+    /**
+     * @deprecated (4.3) use {@link org.apache.http.protocol.RequestExpectContinue#RequestExpectContinue(boolean)}
+     */
+    @Deprecated
     public RequestExpectContinue() {
+        this(false);
+    }
+
+    /**
+     * @since 4.3
+     */
+    public RequestExpectContinue(final boolean activeByDefault) {
         super();
+        this.activeByDefault = activeByDefault;
     }
 
     public void process(final HttpRequest request, final HttpContext context)
@@ -66,9 +80,9 @@ public class RequestExpectContinue imple
                 // Do not send the expect header if request body is known to be empty
                 if (entity != null
                         && entity.getContentLength() != 0 && !ver.lessEquals(HttpVersion.HTTP_1_0))
{
-                    final Boolean b = (Boolean) request.getParams().getParameter(
-                            CoreProtocolPNames.USE_EXPECT_CONTINUE);
-                    if (b == null || b.booleanValue() == true) {
+                    final boolean active = request.getParams().getBooleanParameter(
+                            CoreProtocolPNames.USE_EXPECT_CONTINUE, this.activeByDefault);
+                    if (active) {
                         request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE);
                     }
                 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
Wed May 29 16:10:00 2013
@@ -845,7 +845,7 @@ public class TestSyncHttp {
                             new RequestTargetHost(),
                             new RequestConnControl(),
                             new RequestUserAgent(),
-                            new RequestExpectContinue() }));
+                            new RequestExpectContinue(true) }));
 
             final HttpResponse response = this.client.execute(post, host, conn);
             Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
@@ -906,7 +906,7 @@ public class TestSyncHttp {
                             new RequestTargetHost(),
                             new RequestConnControl(),
                             new RequestUserAgent(),
-                            new RequestExpectContinue() }));
+                            new RequestExpectContinue(true) }));
 
             final HttpResponse response = this.client.execute(post, host, conn);
             Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, response.getStatusLine().getStatusCode());

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestChainBuilder.java
Wed May 29 16:10:00 2013
@@ -43,7 +43,7 @@ public class TestChainBuilder {
         final HttpRequestInterceptor i2 = new RequestTargetHost();
         final HttpRequestInterceptor i3 = new RequestConnControl();
         final HttpRequestInterceptor i4 = new RequestUserAgent();
-        final HttpRequestInterceptor i5 = new RequestExpectContinue();
+        final HttpRequestInterceptor i5 = new RequestExpectContinue(true);
         cb.addFirst(i1);
         cb.addAllFirst(i2, i3);
         cb.addFirst(null);

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
Wed May 29 16:10:00 2013
@@ -298,7 +298,7 @@ public class TestStandardInterceptors {
         final String s = "whatever";
         final StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        final RequestExpectContinue interceptor = new RequestExpectContinue();
+        final RequestExpectContinue interceptor = new RequestExpectContinue(true);
         interceptor.process(request, context);
         final Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
         Assert.assertNotNull(header);
@@ -313,7 +313,7 @@ public class TestStandardInterceptors {
         final String s = "whatever";
         final StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        final RequestExpectContinue interceptor = new RequestExpectContinue();
+        final RequestExpectContinue interceptor = new RequestExpectContinue(true);
         interceptor.process(request, context);
         final Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
         Assert.assertNull(header);
@@ -326,7 +326,7 @@ public class TestStandardInterceptors {
         final String s = "";
         final StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        final RequestExpectContinue interceptor = new RequestExpectContinue();
+        final RequestExpectContinue interceptor = new RequestExpectContinue(true);
         interceptor.process(request, context);
         final Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
         Assert.assertNull(header);
@@ -334,7 +334,7 @@ public class TestStandardInterceptors {
 
     @Test
     public void testRequestExpectContinueInvalidInput() throws Exception {
-        final RequestExpectContinue interceptor = new RequestExpectContinue();
+        final RequestExpectContinue interceptor = new RequestExpectContinue(true);
         try {
             interceptor.process(null, null);
             Assert.fail("IllegalArgumentException should have been thrown");
@@ -347,7 +347,7 @@ public class TestStandardInterceptors {
     public void testRequestExpectContinueIgnoreNonenclosingRequests() throws Exception {
         final HttpContext context = new BasicHttpContext(null);
         final BasicHttpRequest request = new BasicHttpRequest("POST", "/");
-        final RequestExpectContinue interceptor = new RequestExpectContinue();
+        final RequestExpectContinue interceptor = new RequestExpectContinue(true);
         interceptor.process(request, context);
         Assert.assertEquals(0, request.getAllHeaders().length);
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java?rev=1487529&r1=1487528&r2=1487529&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java
Wed May 29 16:10:00 2013
@@ -75,7 +75,7 @@ public class HttpClient {
                         new RequestTargetHost(),
                         new RequestConnControl(),
                         new RequestUserAgent("TEST-CLIENT/1.1"),
-                        new RequestExpectContinue()
+                        new RequestExpectContinue(true)
                 }));
     }
 



Mime
View raw message