After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772932 - Proxy basic authentication no longer works
Proxy basic authentication no longer works
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: API
2.56.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2016-10-14 13:24 UTC by Jonathan Lebon
Modified: 2016-10-27 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SoupSession: give password to GSimpleProxyResolver (3.94 KB, patch)
2016-10-14 13:24 UTC, Jonathan Lebon
none Details | Review

Description Jonathan Lebon 2016-10-14 13:24:25 UTC
Created attachment 337717 [details] [review]
SoupSession: give password to GSimpleProxyResolver

After setting the "proxy-uri" property on a SoupSession with embedded basic auth (e.g. http://user:pass@example.com), libsoup does not make use of the auth and ends up emitting an "authenticate" signal on receiving 407. Calling soup_auth_anthenticate() with the same credentials then works, but it should've made use of the auth from the beginning to avoid the round trip.

This seems to be a regression from fb09bf93 (https://bugzilla.gnome.org/show_bug.cgi?id=680273), during the transition to GSimpleProxyResolver. The issue is that libsoup uses `soup_uri_to_string_internal`, which doesn't embed the password in the resulting string.

The attached patch changes this, making sure to retain the previous behaviour in all other cases.
Comment 1 Dan Winship 2016-10-27 12:36:53 UTC
thanks, pushed with some minor tweaks; this will be in the next stable release