From 709da5efc66e0719468cad510e4c2a59a59694af Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 16 Jan 2018 17:47:07 +0100 Subject: [PATCH] Issue #2126 --- .../jetty/client/HttpClientAuthenticationTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java index a429e3f5317..77fdb96b4f6 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientAuthenticationTest.java @@ -58,6 +58,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.util.Attributes; +import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.URIUtil; import org.eclipse.jetty.util.security.Constraint; import org.eclipse.jetty.util.ssl.SslContextFactory; @@ -465,8 +466,16 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest @Test public void test_RequestFailsAfterResponse() throws Exception - { - startBasic(new EmptyServerHandler()); + { + startBasic(new EmptyServerHandler() + { + @Override + protected void service(String target, org.eclipse.jetty.server.Request jettyRequest, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException + { + IO.readBytes(jettyRequest.getInputStream()); + } + }); AuthenticationStore authenticationStore = client.getAuthenticationStore(); URI uri = URI.create(scheme + "://localhost:" + connector.getLocalPort());