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 744996 - souphttpsrc error handling doesn't differentiate "password needed"
souphttpsrc error handling doesn't differentiate "password needed"
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-23 08:32 UTC by Bastien Nocera
Modified: 2018-11-03 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsterror: add code for authorization-needed (2.14 KB, patch)
2015-05-10 02:55 UTC, Reynaldo H. Verdejo Pinochet
needs-work Details | Review
souphttpsrc: differentiate needed from failed auth (1.65 KB, patch)
2015-05-10 03:01 UTC, Reynaldo H. Verdejo Pinochet
none Details | Review

Description Bastien Nocera 2015-02-23 08:32:34 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.
Comment 1 Bastien Nocera 2015-02-23 08:32:51 UTC
See also https://bugzilla.gnome.org/show_bug.cgi?id=601733
Comment 2 Sebastian Dröge (slomo) 2015-02-24 09:09:56 UTC
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?
Comment 3 Bastien Nocera 2015-02-24 09:10:47 UTC
(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.
Comment 4 Bastien Nocera 2015-02-24 09:38:37 UTC
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
Comment 5 Reynaldo H. Verdejo Pinochet 2015-05-10 02:55:52 UTC
Created attachment 303165 [details] [review]
gsterror: add code for authorization-needed
Comment 6 Reynaldo H. Verdejo Pinochet 2015-05-10 03:01:14 UTC
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?
Comment 7 Tim-Philipp Müller 2016-08-08 17:24:17 UTC
Apps should now be able to extract the exact http error code via gst_message_parse_error_details() with git master, see bug #763038 .
Comment 8 GStreamer system administrator 2018-11-03 14:57:58 UTC
-- 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.