Lenient URI template encoding
URI template encoding ignores mismatched curly braces, treating them as literal parts instead. Issue: SPR-17630
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -131,6 +131,12 @@ public class UriComponentsTests {
|
||||
assertEquals("/myurl/test/show", uriComponents.getPath());
|
||||
}
|
||||
|
||||
@Test // SPR-17630
|
||||
public void uirTemplateExpandWithMismatchedCurlyBraces() {
|
||||
assertEquals("/myurl/?q=%7B%7B%7B%7B",
|
||||
UriComponentsBuilder.fromUriString("/myurl/?q={{{{").encode().build().toUriString());
|
||||
}
|
||||
|
||||
@Test // SPR-12123
|
||||
public void port() {
|
||||
UriComponents uri1 = fromUriString("http://example.com:8080/bar").build();
|
||||
|
||||
Reference in New Issue
Block a user