mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-02 12:39:14 +00:00
Added check for illegal characters when creating an encoded UriComponents object
This commit is contained in:
+11
@@ -59,4 +59,15 @@ public class UriComponentsTests {
|
||||
UriComponentsBuilder.fromPath("/{foo}").build().encode().expand("bar");
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void invalidCharacters() {
|
||||
UriComponentsBuilder.fromPath("/{foo}").build(true);
|
||||
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void invalidEncodedSequence() {
|
||||
UriComponentsBuilder.fromPath("/fo%2o").build(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user