Make HTTP scheme parsing case-insensitive

Issue: SPR-10779
This commit is contained in:
Rossen Stoyanchev
2013-07-30 12:30:21 -04:00
parent 1e90d02973
commit 4c991ba4d0
2 changed files with 11 additions and 2 deletions

View File

@@ -161,6 +161,14 @@ public class UriComponentsBuilderTests {
assertEquals("1USD=?EUR", result.getQueryParams().getFirst("q"));
}
// SPR-10779
@Test
public void fromHttpUrlStringCaseInsesitiveScheme() {
assertEquals("http", UriComponentsBuilder.fromHttpUrl("HTTP://www.google.com").build().getScheme());
assertEquals("https", UriComponentsBuilder.fromHttpUrl("HTTPS://www.google.com").build().getScheme());
}
@Test
public void path() throws URISyntaxException {
UriComponentsBuilder builder = UriComponentsBuilder.fromPath("/foo/bar");