Open blemale opened 6 years ago
The different smart constructors to create an akka.http.scaladsl.model.Uri have a different behavior regarding the port normalization.
akka.http.scaladsl.model.Uri
The apply methods don't normalize the Authority port, unlike the from method:
apply
Authority
from
scala> import akka.http.scaladsl.model.Uri import akka.http.scaladsl.model.Uri scala> Uri("http://www.google.fr:80") res0: akka.http.scaladsl.model.Uri = http://www.google.fr:80 scala> Uri.from(scheme = "http", host = "www.google.fr", port= 80) res1: akka.http.scaladsl.model.Uri = http://www.google.fr
As a side note Spray was normalizing the port on all Uri smart constructors.
Spray
Uri
Thanks for the report, @blemale. Good point. I agree we should do it consistently.
Can I try this one? Thanks! :)
Nobody claimed it till now. So I'd say go for it!
First bits merged in #1864.
The different smart constructors to create an
akka.http.scaladsl.model.Uri
have a different behavior regarding the port normalization.The
apply
methods don't normalize theAuthority
port, unlike thefrom
method:As a side note
Spray
was normalizing the port on allUri
smart constructors.