Skip to content

Commit

Permalink
Fix failing tests by correcting OkHttpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jan 18, 2018
1 parent 395c7db commit 834478e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public HttpResponse execute(HttpRequest request, boolean followRedirects) throws

HttpUrl.Builder url;
try {
url = HttpUrl.parse(baseUrl.toString() + request.getUri()).newBuilder();
String rawUrl = baseUrl.toExternalForm().replaceAll("/$", "") + request.getUri();
url = HttpUrl.parse(rawUrl).newBuilder();
} catch (NullPointerException e) {
throw new IOException("Unable to parse URL: " + baseUrl.toString() + request.getUri());
}
Expand Down

0 comments on commit 834478e

Please sign in to comment.