Fix AddressCandidateHelper not generating proper HTTPS candidates

This commit is contained in:
Niels van Velzen 2024-05-03 22:17:47 +02:00 committed by Niels van Velzen
parent 61d702eb63
commit e93a46f103

View File

@ -74,7 +74,10 @@ public class AddressCandidateHelper(
candidates
.filter { it.protocol == URLProtocol.HTTP }
.forEach {
candidates.add(URLBuilder(it).apply { protocol = URLProtocol.HTTPS }.build())
candidates.add(URLBuilder(it).apply {
protocol = URLProtocol.HTTPS
if (port == URLProtocol.HTTP.defaultPort) port = URLProtocol.HTTPS.defaultPort
}.build())
}
}