GNOME Bugzilla – Bug 744996
souphttpsrc error handling doesn't differentiate "password needed"
Last modified: 2018-11-03 14:57:58 UTC
In cf31a4284bcd87f4137bdd8f2dc1cf3cedf43ccb, souphttpsrc starting sending NOT_AUTHORIZED when 401, 402, 403 and 407 HTTP codes are sent back. 401 and 407 are the only ones that should trigger password prompts, but there's no way to differentiate them.
See also https://bugzilla.gnome.org/show_bug.cgi?id=601733
So we need to distinguish between a "need authorization" error and a "not authorized, don't even try" error? So maybe let's add a NEED_AUTHORIZATION error code?
(In reply to Sebastian Dröge (slomo) from comment #2) > So we need to distinguish between a "need authorization" error and a "not > authorized, don't even try" error? Yes. > So maybe let's add a NEED_AUTHORIZATION > error code? That would be useful indeed.
I will add that it's currently impossible to make a difference between: - hostname/proxy not being resolvable (SOUP_STATUS_CANT_RESOLVE/SOUP_STATUS_CANT_RESOLVE_PROXY) - access refused (403/SOUP_STATUS_FORBIDDEN) and - missing files (404/SOUP_STATUS_NOT_FOUND) without parsing the error message: https://git.gnome.org/browse/totem/tree/src/backend/bacon-video-widget.c#n3758
Created attachment 303165 [details] [review] gsterror: add code for authorization-needed
Created attachment 303166 [details] [review] souphttpsrc: differentiate needed from failed auth If the previous patch is correct I understand all is needed for souphttpsrc is to treat 401 and 407 as authorization needed once the new resource error type is added?
Apps should now be able to extract the exact http error code via gst_message_parse_error_details() with git master, see bug #763038 .
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/161.