UriComponentsBuilder handles invalid port correctly

See gh-26905
This commit is contained in:
Jeon Ilwoong
2021-05-07 18:31:45 +09:00
committed by Rossen Stoyanchev
parent 5811212a9f
commit 65797d04f2
2 changed files with 40 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
private static final String HOST_PATTERN = "(" + HOST_IPV6_PATTERN + "|" + HOST_IPV4_PATTERN + ")";
private static final String PORT_PATTERN = "(\\d*(?:\\{[^/]+?})?)";
private static final String PORT_PATTERN = "(.[^/]*(?:\\{[^/]+?})?)";
private static final String PATH_PATTERN = "([^?#]*)";