Fix bug where host contains protocol characters (#97)

Fixes #94
This commit is contained in:
Ryan Baxter
2018-12-18 14:48:31 -05:00
committed by Spencer Gibb
parent 88a6682f46
commit 4e7e187323
2 changed files with 16 additions and 1 deletions

View File

@@ -109,6 +109,16 @@ public class FeignRibbonClientTests {
any(Options.class));
}
@Test
public void verifyCleanUrl() throws Exception {
Request request = new RequestTemplate().method("GET").append("http://tp/abc/bcd.json")
.request();
this.client.execute(request, new Options());
RequestMatcher matcher = new RequestMatcher("http://foo.com:8000/abc/bcd.json");
verify(this.delegate).execute(argThat(matcher),
any(Options.class));
}
@Test
public void remoteRequestIsSecure() throws Exception {
Request request = new RequestTemplate().method("GET").append("https://foo/")