GSocketClient cannot proxy connect unless default port is explicitly specified in proxy URL
This is a follow on discussion from: !3100 (comment 1611314)
In working to upgrade from libsoup2 to libsoup3, I had to learn to use GSimpleProxyResolver
. After a lot of troubleshooting (and looking at libsoup2.4's code), I realized that an HTTP/HTTPS proxy requires the port to be enumerated in the URI, even if it is the default port. I added documentation to glib in case others were looking too in this commit eb12afed .
My intuition was that this was a bug until I saw that this is how libsoup2 also sets up their proxy (as can be seen here https://gitlab.gnome.org/GNOME/libsoup/-/blob/libsoup-2-74/libsoup/soup-session.c#L619 ). I would have assumed if it was a bug, the libsoup2 folks would have raised an issue in glib or attempted to fix it (maybe they did and I just can't find the documentation?).
I do know as the behavior exists now, at least documenting the behavior will help a lot of folks who are updating to Libsoup3 and use a proxy (I spent several hours to realize this was why I ran into issues). If it is a bug and needs to be fixed, I would argue the documentation should stay and an update like you no longer need to specify a port in glib $VERSION
to help folks that run into this API behavior.