Waldemar Kornewald
11/20/2024, 7:03 AMUrl("")
as Url("<http://localhost>")
? At least within the Ktor client context, wouldn’t it be better to enforce providing the full, absolute URL, including a hostname? When just constructing and combining relative URLs (e.g. in a 301 redirect) of course the hostname might be missing and that’s fine. But when sending a request, why would localhost
ever be a good default? The current behavior causes quite a bit of confusion in our team because the Ktor client treats missing/incorrect configuration values as URLs against localhost which of course is not what anyone wanted.Aleksei Tirman [JB]
11/20/2024, 7:40 AMUrlBuilder
. As far as I know, the default host and default protocol have been used to fill in the empty values while parsing incomplete URL strings. That decision was made long ago and cannot be easily reverted because the Ktor users already rely on this behavior.Waldemar Kornewald
11/20/2024, 9:40 AMWaldemar Kornewald
11/20/2024, 9:40 AMWaldemar Kornewald
11/20/2024, 9:41 AM