Skip to content

Commit

Permalink
Issue wiremock#655 - Added check to remove trailing forward slash if …
Browse files Browse the repository at this point in the history
…found in proxy URL
  • Loading branch information
kieran.obrien committed May 2, 2017
1 parent 81e24c6 commit 2330049
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2330049

Please sign in to comment.