diff --git a/src/main/java/com/github/tomakehurst/wiremock/http/ProxyResponseRenderer.java b/src/main/java/com/github/tomakehurst/wiremock/http/ProxyResponseRenderer.java index ea554b6b0e..6ab26308b4 100644 --- a/src/main/java/com/github/tomakehurst/wiremock/http/ProxyResponseRenderer.java +++ b/src/main/java/com/github/tomakehurst/wiremock/http/ProxyResponseRenderer.java @@ -95,7 +95,10 @@ private HttpHeaders headersFrom(HttpResponse httpResponse, ResponseDefinition re public static HttpUriRequest getHttpRequestFor(ResponseDefinition response) { final RequestMethod method = response.getOriginalRequest().getMethod(); - final String url = response.getProxyUrl(); + String url = response.getProxyUrl(); + if (url.endsWith("/")) { + url = url.substring(0, url.length() - 1); + } return HttpClientFactory.getHttpRequestFor(method, url); }