GUri: apply scheme normalization flag consistently
Now that GUri can do scheme normalization, we still need to keep API in libsoup to get the actual port when it's normalized by GUri. I think GUri should provide that information, since the normalization is done by GLib. I assume -1 (I wonder why -1 is used instead of 0) for the port means it's unknown, but in case of a normalized port, it's not really unknown. So, I think we have several options here:
- Add specific API like g_uri_get_port_default() or similar that returns the actual port if known based on the scheme.
- Make g_uri_get_port() return the actual port always when known based on the scheme
- Make g_uri_get_port() return the actual port, but only when the scheme normalization flag is present
What do you think? I think get_port should always return the actual port when it's known, but I'm fine to do it only when the flag is present to preserve previous behavior.
cc @pgriffis
Edited by Carlos Garcia Campos