mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
UriComponentsBuilder.fromHttpRequest sets port correctly
Issue: SPR-12771
This commit is contained in:
@@ -307,6 +307,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
|
||||
builder.scheme(scheme);
|
||||
builder.host(host);
|
||||
builder.port(null);
|
||||
if (scheme.equals("http") && port != 80 || scheme.equals("https") && port != 443) {
|
||||
builder.port(port);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user