summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-09-19 14:50:43 -0700
committerPatrick Griffis <pgriffis@igalia.com>2020-09-19 15:41:25 -0700
commit1a3a29a3e395180474243c6e3f2ae870efddf1eb (patch)
tree6f94b8a68d73e20ae1b966e845e0e1750e5614ae
parent52f1598fb183bb06afee70b94da6cb0a9888664c (diff)
downloadlibsoup-1a3a29a3e395180474243c6e3f2ae870efddf1eb.tar.gz
Bump libsoup API to 3.0
-rw-r--r--docs/reference/build-howto.xml8
-rw-r--r--docs/reference/client-howto.xml2
-rw-r--r--docs/reference/libsoup-2.4-overrides.txt6
-rw-r--r--docs/reference/libsoup-3.0-docs.sgml (renamed from docs/reference/libsoup-2.4-docs.sgml)11
-rw-r--r--docs/reference/libsoup-3.0-sections.txt (renamed from docs/reference/libsoup-2.4-sections.txt)0
-rw-r--r--docs/reference/meson.build7
-rw-r--r--docs/reference/session-porting.xml221
-rw-r--r--libsoup/Soup-3.0-custom.vala (renamed from libsoup/Soup-2.4-custom.vala)0
-rw-r--r--libsoup/Soup-3.0.metadata (renamed from libsoup/Soup-2.4.metadata)0
-rw-r--r--libsoup/include/meson.build2
-rw-r--r--libsoup/meson.build2
-rw-r--r--meson.build6
-rw-r--r--po/meson.build4
13 files changed, 15 insertions, 254 deletions
diff --git a/docs/reference/build-howto.xml b/docs/reference/build-howto.xml
index bec9a454..1eb34ac6 100644
--- a/docs/reference/build-howto.xml
+++ b/docs/reference/build-howto.xml
@@ -18,20 +18,20 @@
<para>
Like other GNOME libraries, <application>libsoup</application> uses
<application>pkg-config</application> to provide compiler options. The
-package name is "<literal>libsoup-2.4</literal>". So in your
+package name is "<literal>libsoup-3.0</literal>". So in your
<literal>configure</literal> script, you might specify something like:
</para>
<informalexample><programlisting>
-PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])
+PKG_CHECK_MODULES(LIBSOUP, [libsoup-3.0 >= 2.26])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>
<para>
-The "<literal>2.4</literal>" in the package name is the "API version"
+The "<literal>3.0</literal>" in the package name is the "API version"
(indicating "the version of the <application>libsoup</application> API
-that first appeared in version 2.4") and is essentially just part of
+that first appeared in version 3.0") and is essentially just part of
the package name.
</para>
diff --git a/docs/reference/client-howto.xml b/docs/reference/client-howto.xml
index f9e0327c..cdaf6d48 100644
--- a/docs/reference/client-howto.xml
+++ b/docs/reference/client-howto.xml
@@ -258,7 +258,7 @@ request headers and body of the message:
<para>
(Although this is a bad example, because
<application>libsoup</application> actually has convenience methods
-for dealing with <link linkend="libsoup-2.4-HTML-Form-Support">HTML
+for dealing with <link linkend="libsoup-3.0-HTML-Form-Support">HTML
forms</link>.)
</para>
diff --git a/docs/reference/libsoup-2.4-overrides.txt b/docs/reference/libsoup-2.4-overrides.txt
deleted file mode 100644
index 06826ca5..00000000
--- a/docs/reference/libsoup-2.4-overrides.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-<FUNCTION>
-<NAME>soup_address_get_sockaddr</NAME>
-<RETURNS>struct sockaddr *</RETURNS>
-SoupAddress *addr,
-int *len
-</FUNCTION>
diff --git a/docs/reference/libsoup-2.4-docs.sgml b/docs/reference/libsoup-3.0-docs.sgml
index 07da9241..725a4926 100644
--- a/docs/reference/libsoup-2.4-docs.sgml
+++ b/docs/reference/libsoup-3.0-docs.sgml
@@ -11,7 +11,6 @@
<xi:include href="build-howto.xml"/>
<xi:include href="client-howto.xml"/>
<xi:include href="request-howto.xml"/>
- <xi:include href="session-porting.xml"/>
<xi:include href="server-howto.xml"/>
</chapter>
@@ -35,10 +34,7 @@
<xi:include href="xml/soup-request-file.xml"/>
<xi:include href="xml/soup-request-data.xml"/>
<xi:include href="xml/soup-server.xml"/>
- <xi:include href="xml/soup-server-deprecated.xml"/>
<xi:include href="xml/soup-session.xml"/>
- <xi:include href="xml/soup-session-async.xml"/>
- <xi:include href="xml/soup-session-sync.xml"/>
<xi:include href="xml/soup-status.xml"/>
<xi:include href="xml/soup-tld.xml"/>
<xi:include href="xml/soup-uri.xml"/>
@@ -57,7 +53,6 @@
<xi:include href="xml/soup-hsts-enforcer.xml"/>
<xi:include href="xml/soup-hsts-enforcer-db.xml"/>
<xi:include href="xml/soup-logger.xml"/>
- <xi:include href="xml/soup-proxy-resolver-default.xml"/>
</chapter>
<chapter>
@@ -66,12 +61,6 @@
<xi:include href="xml/soup-websocket.xml"/>
</chapter>
- <chapter>
- <title>Low-level Networking API</title>
- <xi:include href="xml/soup-address.xml"/>
- <xi:include href="xml/soup-socket.xml"/>
- </chapter>
-
<index>
<title>Index</title>
</index>
diff --git a/docs/reference/libsoup-2.4-sections.txt b/docs/reference/libsoup-3.0-sections.txt
index 5a608fd3..5a608fd3 100644
--- a/docs/reference/libsoup-2.4-sections.txt
+++ b/docs/reference/libsoup-3.0-sections.txt
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 3956b5ef..e6c6658b 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -53,8 +53,8 @@ scan_args = [
'--ignore-decorators="SOUP_DEPRECATED\w*\s*\([^)]*\)|SOUP_DEPRECATED\w*|SOUP_AVAILABLE\w*"'
]
-gnome.gtkdoc('libsoup-2.4',
- main_sgml : 'libsoup-2.4-docs.sgml',
+gnome.gtkdoc('libsoup-3.0',
+ main_sgml : 'libsoup-3.0-docs.sgml',
src_dir : srcdir,
ignore_headers : ignore_headers,
namespace : 'soup',
@@ -66,7 +66,6 @@ gnome.gtkdoc('libsoup-2.4',
'build-howto.xml',
'client-howto.xml',
'request-howto.xml',
- 'server-howto.xml',
- 'session-porting.xml',
+ 'server-howto.xml'
]
)
diff --git a/docs/reference/session-porting.xml b/docs/reference/session-porting.xml
deleted file mode 100644
index 67a433a1..00000000
--- a/docs/reference/session-porting.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<refentry id="libsoup-session-porting">
-<refmeta>
-<refentrytitle>Porting to the new SoupSession</refentrytitle>
-<manvolnum>3</manvolnum>
-<refmiscinfo>LIBSOUP Library</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>Porting to the new SoupSession</refname><refpurpose>Notes on
-porting from SoupSessionAsync and SoupSessionSync to SoupSession</refpurpose>
-</refnamediv>
-
-<refsect2 id="intro">
-<title>Introduction</title>
-
-<para>
-As of libsoup 2.42, <link
-linkend="SoupSession"><type>SoupSession</type></link> is no longer an
-abstract class, and the base <type>SoupSession</type> class is now
-preferred over its traditional subclasses, <link
-linkend="SoupSessionAsync"><type>SoupSessionAsync</type></link> and
-<link linkend="SoupSessionSync"><type>SoupSessionSync</type></link>.
-</para>
-
-<para>
-There are several changes in behavior between the old and new sessions
-to be aware of.
-</para>
-
-</refsect2>
-
-<refsect2 id="defaults">
-<title>Different defaults</title>
-
-<para>
-The new <link linkend="SoupSession"><type>SoupSession</type></link>
-has different (and hopefully better) defaults than <link
-linkend="SoupSessionAsync"><type>SoupSessionAsync</type></link> and
-<link linkend="SoupSessionSync"><type>SoupSessionSync</type></link>:
-</para>
-
-<itemizedlist>
- <listitem>
- <para>
- The system TLS/SSL certificate database is used by default to
- validate https certificates, and sites with invalid certificates
- will refuse to load with a
- <link linkend="SOUP-STATUS-SSL-FAILED:CAPS"><literal>SOUP_STATUS_SSL_FAILED</literal></link>
- error.
- </para>
- <para>
- You can still override the CA database as before, by setting the
- <link linkend="SoupSession--ssl-ca-file"><type>"ssl-ca-file"</type></link>
- property, although the
- <link linkend="SoupSession--tls-database"><type>"tls-database"</type></link>
- property is preferred, since it allows you to do proper error
- handling.
- </para>
- <para>
- If you want to accept all certificates, set
- <link linkend="SoupSession--ssl-strict"><type>"ssl-strict"</type></link> to
- <literal>FALSE</literal>. Note that libsoup will still check
- certificates, it will just continue with the HTTP request even
- if the certificate fails to validate. You can use
- <link linkend="soup-message-get-https-status"><function>soup_message_get_https_status()</function></link>
- to look at the certificate after the fact.
- </para>
- </listitem>
- <listitem>
- <para>
- The
- <link linkend="SoupSession--timeout"><type>"timeout"</type></link>
- and
- <link linkend="SoupSession--idle-timeout"><type>"idle-timeout"</type></link>
- properties both default to 60 seconds.
- </para>
- </listitem>
- <listitem>
- <para>
- The
- <link linkend="SoupSession--http-aliases"><type>"http-aliases"</type></link>
- property defaults to <literal>NULL</literal>, meaning that URI
- schemes like "<literal>webcal</literal>" and
- "<literal>dav</literal>" (and "<literal>ftp</literal>") are not
- considered to be aliases for "<literal>http</literal>", and so
- libsoup will not accept requests for such URIs, and will not
- follow redirects to such URIs.
- </para>
- </listitem>
- <listitem>
- <para>
- The new
- <link linkend="SoupSession--proxy-resolver"><type>"proxy-resolver"</type></link>
- property is now initialized to the default
- <link linkend="GProxyResolver"><type>GProxyResolver</type></link>,
- meaning that it will automatically use the user's system proxy
- configuration. This replaces the use of the
- <link linkend="SoupProxyResolverDefault"><type>SoupProxyResolverDefault</type></link>,
- session feature in earlier releases. You can set this property to
- <literal>NULL</literal> if you don't want to use proxies, and the
- <link linkend="SoupSession--proxy-uri"><type>"proxy-uri"</type></link>
- property still works if you want to use a single proxy for all requests.
- </para>
- </listitem>
- <listitem>
- <para>
- Every session gets a
- <link linkend="SoupContentDecoder"><type>SoupContentDecoder</type></link>
- attached to it by default, meaning that it will automatically
- handle (and request) "gzip"- and "deflate"-encoded response
- bodies.
- </para>
- </listitem>
-</itemizedlist>
-
-</refsect2>
-
-<refsect2 id="behavior">
-<title>Differences in feature behavior</title>
-
-<para>
-If you are using NTLM authentication, the new <type>SoupSession</type>
-behaves slightly differently from the old session types.
-</para>
-
-<para>
-First, the deprecated <link
-linkend="SOUP-SESSION-USE-NTLM:CAPS"><literal>SOUP_SESSION_USE_NTLM</literal></link>
-property is no longer supported. If you want to add support for NTLM
-to a session, call <link
-linkend="soup-session-add-feature-by-type"><function>soup_session_add_feature_by_type()</function></link>,
-passing <link
-linkend="SOUP-TYPE-AUTH-NTLM:CAPS"><literal>SOUP_TYPE_AUTH_NTLM</literal></link>.
-</para>
-
-<para>
-Second, with the old session types, enabling NTLM would cause all
-(otherwise-unauthenticated) requests to be sent with an NTLM request
-in the <literal>Authorization</literal> header. That is, libsoup would
-assume that all servers supported NTLM, and would attempt to begin
-negotiating NTLM authentication before the server ever returned a 401
-response. With the plain <type>SoupSession</type>, this no longer
-happens. If you want the old behavior, you need to call <link
-linkend="soup-auth-manager-use-auth"><function>soup_auth_manager_use_auth()</function></link>
-for each host to "preload" the NTLM authentication:
-</para>
-
-<informalexample><programlisting>
- SoupAuthManager *auth_manager;
- SoupAuth *auth;
- SoupURI *uri;
-
- auth_manager = SOUP_AUTH_MANAGER (soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER));
- auth = g_object_new (SOUP_TYPE_AUTH_NTLM, NULL);
- uri = soup_uri_new ("http://ntlm-using-host.example.com/");
- soup_auth_manager_use_auth (auth_manager, uri, auth);
- g_object_unref (auth);
- soup_uri_free (auth);
-</programlisting></informalexample>
-
-</refsect2>
-
-<refsect2 id="apis">
-<title>Differences in SoupMessage-sending APIs</title>
-
-<para>
-<type>SoupSessionAsync</type> always uses asynchronous I/O, and
-<type>SoupSessionSync</type> always uses blocking I/O, regardless of
-the operation. In the new <type>SoupSession</type>, <link
-linkend="soup-session-queue-message"><function>soup_session_queue_message()</function></link>
-uses asynchronous I/O (like <type>SoupSessionAsync</type>), and <link
-linkend="soup-session-send-message"><function>soup_session_send_message()</function></link>
-uses blocking I/O (like <type>SoupSessionSync</type>). There is no API
-on the plain <type>SoupSession</type> that simulates the effect of
-calling <function>soup_session_send_message()</function> on a
-<type>SoupSessionAsync</type> (ie, running the main loop internally),
-or of calling <function>soup_session_queue_message()</function> on a
-<type>SoupSessionSync</type> (ie, automatically sending the request in
-another thread).
-</para>
-
-</refsect2>
-
-<refsect2 id="async">
-<title>Differences in Asynchronous I/O</title>
-
-<para>
-As compared to <link
-linkend="SoupSessionAsync"><type>SoupSessionAsync</type></link>, <link
-linkend="SoupSession"><type>SoupSession</type></link> behaves more
-like gio with respect to asynchronous I/O.
-</para>
-
-<para>
-In particular, the <link
-linkend="SoupSession--async-context"><type>"async-context"</type></link>
-and <link
-linkend="SoupSession--use-thread-context"><type>"use-thread-context"</type></link>
-properties are now effectively unused, and the session always queues
-asynchronous requests in the <link
-linkend="GMainContext"><type>GMainContext</type></link> that was is
-the thread default when the asynchronous operation is started. Session
-bookkeeping tasks (like closing idle connections) happen in the
-context that was thread default when the session was created.
-</para>
-
-<para>
-Additionally, <link
-linkend="soup-session-cancel-message"><function>soup_session_cancel_message()</function></link>
-now acts asynchronously when you cancel an asynchronous request;
-rather than having the request's callback be called from inside
-<function>soup_session_cancel_message()</function>, it just gets called
-when you need return to the main loop.
-</para>
-
-</refsect2>
-
-</refentry>
diff --git a/libsoup/Soup-2.4-custom.vala b/libsoup/Soup-3.0-custom.vala
index ffd1849f..ffd1849f 100644
--- a/libsoup/Soup-2.4-custom.vala
+++ b/libsoup/Soup-3.0-custom.vala
diff --git a/libsoup/Soup-2.4.metadata b/libsoup/Soup-3.0.metadata
index da138e39..da138e39 100644
--- a/libsoup/Soup-2.4.metadata
+++ b/libsoup/Soup-3.0.metadata
diff --git a/libsoup/include/meson.build b/libsoup/include/meson.build
index 0318aa2b..31480d7a 100644
--- a/libsoup/include/meson.build
+++ b/libsoup/include/meson.build
@@ -4,5 +4,5 @@ configure_file (
output: 'soup.h',
copy: true,
install: true,
- install_dir: get_option('includedir') / 'libsoup',
+ install_dir: get_option('includedir') / includedir,
) \ No newline at end of file
diff --git a/libsoup/meson.build b/libsoup/meson.build
index e1784112..76fd28b3 100644
--- a/libsoup/meson.build
+++ b/libsoup/meson.build
@@ -1,3 +1,4 @@
+includedir = join_paths(libsoup_api_name, meson.project_name())
subdir('include')
pkg = import('pkgconfig')
@@ -151,7 +152,6 @@ if brotlidec_dep.found()
endif
-includedir = join_paths(libsoup_api_name, meson.project_name())
install_headers(soup_installed_headers, subdir : includedir)
version_cdata = configuration_data()
diff --git a/meson.build b/meson.build
index 1c3648eb..a548f84b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('libsoup', 'c',
- version: '2.72.0',
+ version: '2.91.0',
meson_version : '>=0.50',
license : 'LGPL2',
default_options : 'c_std=c99')
@@ -20,8 +20,8 @@ soup_version_micro = version_arr[2]
#
# When bumping the first component version, set the second and third components
# to 0. When bumping the second version, set the third one to zero.
-libversion = '1.11.0'
-apiversion = '2.4'
+libversion = '0.0.0'
+apiversion = '3.0'
soversion = libversion.split('.')[0]
libsoup_api_name = '@0@-@1@'.format(meson.project_name(), apiversion)
libversion_arr = libversion.split('.')
diff --git a/po/meson.build b/po/meson.build
index b024aeaf..e344cd18 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,8 +1,8 @@
i18n = import('i18n')
-i18n.gettext(meson.project_name(),
+i18n.gettext(libsoup_api_name,
preset : 'glib',
args: [
- '--default-domain=' + meson.project_name(),
+ '--default-domain=' + libsoup_api_name,
]
)