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 657422 - [souphttpsrc] The souphttpsrc plugin doesn't work behind a proxy that requires authentication
[souphttpsrc] The souphttpsrc plugin doesn't work behind a proxy that require...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: David Schleef
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-26 10:32 UTC by Konstantin Miller
Modified: 2011-09-07 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (663 bytes, patch)
2011-08-26 10:32 UTC, Konstantin Miller
none Details | Review
Patch created by "git format-patch" (1002 bytes, patch)
2011-08-29 12:23 UTC, Konstantin Miller
committed Details | Review

Description Konstantin Miller 2011-08-26 10:32:06 UTC
Created attachment 194808 [details] [review]
Patch

Using Gstreamer and the souphttpsrc plugin to connect to a HTTP server from behind a proxy that requires authentication fails with the error: Proxy Authentication Required, although username and password are provided at the command line.

Can be reproduced by the following command:
gst-launch -v souphttpsrc location=http://google.com proxy=http://name:port/ proxy-id=username proxy-pw=password ! filesink location=./output.txt

As far as I can see, the problem is as follows. The libsoup library that is used by souphttpsrc would send a GET request without proxy authentication data, receive the 407 Proxy Authentication Required reply, and resend GET including authentication data. The souphttpsrc plugin never resends the GET. Instead, it produces an error due to a call to the gst_soup_http_src_parse_status function before soup_auth_authenticate is called.

If I'm not missing something and this is really a bug, it could be fixed by adding one line in the gst_soup_http_src_got_headers_cb function of the plugin. The patch is attached. It has the effect that 407 Proxy Authentication Required is not interpreted as a fatal error if proxy authentication data is available, so that the authentication can be performed.
Comment 1 David Schleef 2011-08-27 03:33:32 UTC
I'm pretty sure this makes sense, but I'll review it soon and push it.

If you are compiling from git, could you create a git commit and then create a patch using git format-patch?  This makes it a lot easier to review.  Thanks.
Comment 2 Konstantin Miller 2011-08-29 12:23:10 UTC
Created attachment 195067 [details] [review]
Patch created by "git format-patch"

As requested, a patch created by "git format-patch".
Comment 3 Sebastian Dröge (slomo) 2011-09-07 11:30:25 UTC
commit 24d002e04d46ed510d5591563eb2a21574ff0c9a
Author: Konstantin Miller <konstantin.miller@gmail.com>
Date:   Mon Aug 29 14:12:22 2011 +0200

    souphttpsrc: Don't handle HTTP response 407 as error if proxy authentication
    
    Fixes bug #657422.