#1727 - Prevent premature base encoding in UriTemplate if host is templated.
This commit is contained in:
@@ -375,6 +375,13 @@ class UriTemplateUnitTest {
|
||||
assertThat(template.toString()).isEqualTo("/path/{bar}/foo.zip?type=foo{&foobar}");
|
||||
}
|
||||
|
||||
@Test // #1727
|
||||
void supportsVariableInHostName() {
|
||||
|
||||
assertThatCode(() -> UriTemplate.of("https://{somehost}/somepath"))
|
||||
.doesNotThrowAnyException();
|
||||
}
|
||||
|
||||
private static void assertVariables(UriTemplate template, TemplateVariable... variables) {
|
||||
assertVariables(template, Arrays.asList(variables));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user