summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2021-02-22 13:59:50 -0600
committerPatrick Griffis <pgriffis@igalia.com>2021-02-22 13:59:50 -0600
commit33b07391bb0c72c9754d9ed7d7af24364639f30f (patch)
treeed6a9b5e49427a0a9f4554236b880a84fa6137b0
parent02f5240e268792271ce673b47ac18c823587f5b4 (diff)
downloadlibsoup-33b07391bb0c72c9754d9ed7d7af24364639f30f.tar.gz
docs: Remove incorrect redirect docs
These changes never happened.
-rw-r--r--docs/reference/client-advanced.xml32
-rw-r--r--docs/reference/migrating-from-libsoup-2.xml7
2 files changed, 0 insertions, 39 deletions
diff --git a/docs/reference/client-advanced.xml b/docs/reference/client-advanced.xml
index 270a5daa..c5ff3d4c 100644
--- a/docs/reference/client-advanced.xml
+++ b/docs/reference/client-advanced.xml
@@ -134,38 +134,6 @@ linkend="g-proxy-resolver-get-default"><function>g_proxy_resolver_get_default()<
</programlisting></informalexample>
</sect2>
<sect2>
- <title>Controlling Redirections</title>
- <para>By default libsoup automatically handles redirections in a sane way without you needing to worry about it.
- However you may want explicitly block all redirections or perhaps allow some unsafe redirections. <literal>SoupMessage::redirect</literal>
- provides a way to do both of these:</para>
-<informalexample><programlisting><![CDATA[
-static SoupMessageRedirectionFlags
-redirect_callback (SoupMessage *msg, GUri *location, guint redirect_count, gpointer user_data)
-{
- // Here we could compare URIs, check redirect_count, etc. This just always prevents it.
- return SOUP_MESSAGE_REDIRECTION_BLOCK;
-}
-
-int main (int argc, char **argv)
-{
- SoupSession *session = soup_session_new ();
- // Google redirects to https://www.google.com/
- SoupMessage *msg = soup_message_new (SOUP_METHOD_GET, "https://google.com");
- g_signal_connect (msg, "redirect", G_CALLBACK (redirect_callback), NULL);
- GInputStream *in_stream = soup_session_send (session, msg, NULL, NULL);
-
- if (in_stream) {
- // The redirection was not allowed so we get the status code
- // soup_message_get_uri() will also show its unchanged
- g_assert (soup_message_get_status (msg) == SOUP_STATUS_MOVED_PERMANENTLY);
- g_object_unref (in_stream);
- }
-
- return 0;
-}]]>
-</programlisting></informalexample>
- </sect2>
- <sect2>
<title>Handling authentication</title>
<informalexample><programlisting><![CDATA[
static gboolean
diff --git a/docs/reference/migrating-from-libsoup-2.xml b/docs/reference/migrating-from-libsoup-2.xml
index 5242742f..04838338 100644
--- a/docs/reference/migrating-from-libsoup-2.xml
+++ b/docs/reference/migrating-from-libsoup-2.xml
@@ -186,12 +186,5 @@ linkend="soup-uri-decode-data-uri"><function>soup_uri_decode_data_uri()</functio
<link linkend="soup_message_set_request_body_from_bytes"><function>soup_message_set_request_body_from_bytes()</function></link> to use a GBytes
buffer.</para>
</sect2>
- <sect2>
- <title>Redirection handling changes</title>
- <para>Previously a common pattern was using <code>SOUP_MESSAGE_NO_REDIRECT</code> and
- manually handling re-queuing the message. This is now handled for you with the
- <link linkend="SoupMessage-redirect"><literal>SoupMessage::redirect</literal></link> signal where you can block or allow redirects and libsoup
- handles the queueing.</para>
- </sect2>
</chapter>