Follow-up fix, checking also "ws" and port 80 case

See gh-27097
This commit is contained in:
Rossen Stoyanchev
2021-07-16 09:34:12 +01:00
parent ca262eaa1c
commit 0b1d14cdd9
2 changed files with 24 additions and 2 deletions

View File

@@ -881,7 +881,8 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
"with the removeOnly=true. Request headers: " + headers);
}
if (this.scheme != null && ((this.scheme.equals("http") && "80".equals(this.port)) ||
if (this.scheme != null &&
(((this.scheme.equals("http") || this.scheme.equals("ws")) && "80".equals(this.port)) ||
((this.scheme.equals("https") || this.scheme.equals("wss")) && "443".equals(this.port)))) {
port(null);
}