souphttpsrc: properly track redirections
authorArnaud Vrac <avrac@freebox.fr>
Fri, 13 Jan 2017 15:40:43 +0000 (16:40 +0100)
committerThiago Santos <thiagossantos@gmail.com>
Wed, 18 Jan 2017 01:16:15 +0000 (22:16 -0300)
commit9b23732559dfed243ae425f92a9a8f4cd2261588
treea8252f8c4fedeff50d0c43c663b4578dc0724a51
parent6769dce5c138b0990ece68cbdff79751af76fc8c
souphttpsrc: properly track redirections

The current code configures libsoup to handle redirections
transparently, without informing the caller, thus preventing the element
to record the redirect code and location uri.

Fix this by always setting the SOUP_MESSAGE_NO_REDIRECT, preventing
libsoup from handling the redirection. When we receive a redirection
request and libsoup can safely handle it, return a custom error which
triggers a retry with the new URI.

https://bugzilla.gnome.org/show_bug.cgi?id=777222
ext/soup/gstsouphttpsrc.c