GNOME Bugzilla – Bug 657422
[souphttpsrc] The souphttpsrc plugin doesn't work behind a proxy that requires authentication
Last modified: 2011-09-07 11:30:32 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.
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.
Created attachment 195067 [details] [review] Patch created by "git format-patch" As requested, a patch created by "git format-patch".
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.