Issue #476 - HttpClient should not send absolute-form target with non HttpProxy.

Fixed test case.
This commit is contained in:
Simone Bordet 2016-04-01 22:04:15 +02:00
parent 4f68d44a50
commit 3fb06cca21
1 changed files with 1 additions and 4 deletions

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.client;
import java.io.IOException;
import java.net.URI;
import java.nio.ByteBuffer;
import java.util.Map;
import java.util.concurrent.Executor;
@ -93,9 +92,7 @@ public class HttpClientCustomProxyTest
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
baseRequest.setHandled(true);
if (!URI.create(baseRequest.getHttpURI().toString()).isAbsolute())
response.setStatus(HttpServletResponse.SC_USE_PROXY);
else if (serverHost.equals(request.getServerName()))
if (serverHost.equals(request.getServerName()))
response.setStatus(status);
else
response.setStatus(HttpServletResponse.SC_NOT_ACCEPTABLE);