2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
4 <refentry id="libsoup-porting-2.2-2.4">
6 <refentrytitle>libsoup 2.2 to 2.4 porting notes</refentrytitle>
7 <manvolnum>3</manvolnum>
8 <refmiscinfo>LIBSOUP Library</refmiscinfo>
12 <refname>Porting notes</refname><refpurpose>Notes on porting from libsoup 2.2 to 2.4</refpurpose>
16 <title>Overview</title>
19 After many API-compatible releases in the 2.2 series,
20 <application>libsoup</application> has now changed its API and bumped
21 its version number to 2.4. Changes were made for a variety of reasons:
26 To fix bugs and add features that couldn't be done ABI-compatibly.
30 To make it easier to generate bindings for libsoup for
31 languages other than C.
35 To clean up ugly/confusing old APIs
39 To be more glib/gobject/gtk-like in general.
46 <title>SoupMessage</title>
49 <link linkend="SoupMessage"><type>SoupMessage</type></link> has had a
50 number of API changes made, mostly to increase its
55 <title>SoupMessageHeaders</title>
58 <type>SoupMessage</type>'s
59 <structfield>request_headers</structfield> and
60 <structfield>response_headers</structfield> fields are now an
62 linkend="SoupMessageHeaders"><type>SoupMessageHeaders</type></link>)
63 rather than being <type>GHashTables</type>. The method names have
64 changed slightly to reflect this:
69 <term><function>soup_message_add_header</function></term>
71 → <link linkend="soup-message-headers-append"><function>soup_message_headers_append</function></link>
75 <term><function>soup_message_get_header</function></term>
77 → <link linkend="soup-message-headers-get"><function>soup_message_headers_get</function></link>
81 <term><function>soup_message_foreach_header</function></term>
83 → <link linkend="soup-message-headers-foreach"><function>soup_message_headers_foreach</function></link>
87 <term><function>soup_message_remove_header</function></term>
89 → <link linkend="soup-message-headers-remove"><function>soup_message_headers_remove</function></link>
93 <term><function>soup_message_clear_headers</function></term>
95 → <link linkend="soup-message-headers-clear"><function>soup_message_headers_clear</function></link>
101 <function>soup_message_get_header_list</function> has no equivalent;
102 if multiple copies of a header are present,
103 <function>soup_message_headers_get</function> will return all of
104 them, concatenated together and separated by commas; RFC 2616 says
105 that the two forms (multiple headers, and a single header with
106 comma-separated values) are equivalent; this change to libsoup
107 ensures that applications will treat them as equivalent.
111 In addition, certain important header fields now have
112 dedicated get/set methods:
117 <link linkend="soup-message-headers-get-encoding"><function>soup_message_headers_get_encoding</function></link> / <link linkend="soup-message-headers-set-encoding"><function>soup_message_headers_set_encoding</function></link>
121 <link linkend="soup-message-headers-get-content-length"><function>soup_message_headers_get_content_length</function></link> / <link linkend="soup-message-headers-set-content-length"><function>soup_message_headers_set_content_length</function></link>
125 <link linkend="soup-message-headers-get-expectations"><function>soup_message_headers_get_expectations</function></link> / <link linkend="soup-message-headers-set-expectations"><function>soup_message_headers_set_expectations</function></link>
130 (<literal>soup_message_headers_set_expectation(msg, SOUP_EXPECTATION_CONTINUE)</literal>
131 replaces the <literal>SOUP_MESSAGE_EXPECT_CONTINUE</literal>
138 <title>SoupMessageBody</title>
141 Similarly, the <structfield>request_body</structfield> and
142 <structfield>response</structfield> fields (renamed from
143 <structfield>request</structfield> and <structfield>response</structfield>) are
144 now a new type, <link
145 linkend="SoupMessageBody"><type>SoupMessageBody</type></link>,
146 implemented in terms of <link
147 linkend="SoupBuffer"><type>SoupBuffer</type></link>, a refcounted
148 memory buffer type with clearer semantics than the old
149 <type>SoupDataBuffer</type>/<type>SoupOwnership</type>.
154 <term><literal>SOUP_BUFFER_STATIC</literal></term>
157 linkend="SOUP-MEMORY-STATIC:CAPS"><literal>SOUP_MEMORY_STATIC</literal></link>
161 <term><literal>SOUP_BUFFER_SYSTEM_OWNED</literal></term>
164 linkend="SOUP-MEMORY-TAKE:CAPS"><literal>SOUP_MEMORY_TAKE</literal></link>
165 (meaning <application>libsoup</application>
166 should take ownership of the memory from your).
170 <term><literal>SOUP_BUFFER_USER_OWNED</literal></term>
173 linkend="SOUP-MEMORY-COPY:CAPS"><literal>SOUP_MEMORY_COPY</literal></link>
174 (meaning <application>libsoup</application>
175 should make a copy of the memory, because you
176 can't make any guarantees about how long it will
183 A fourth <type>SoupMemoryUse</type> value is also available: <link
184 linkend="SOUP-MEMORY-TEMPORARY:CAPS"><literal>SOUP_MEMORY_TEMPORARY</literal></link>,
185 which helps to avoid extra copies in some cases.
186 <literal>SOUP_MEMORY_TEMPORARY</literal> means that the memory
187 will last at least as long as the object you are handing it to (a
188 <type>SoupBuffer</type>, <type>SoupMessageBody</type>, or
189 <type>SoupMessage</type>), and so doesn't need to be copied right
190 away, but that if anyone makes a copy of the buffer,
191 <application>libsoup</application> needs to make a new copy of the
192 memory for them at that point, since the original pointer may not
193 remain valid for the lifetime of the new copy.
197 (In the future, there may be additional <type>SoupBuffer</type>
198 and <type>SoupMessageBody</type> methods to work directly with
199 mmapped memory, splicing to file descriptors, etc.)
204 linkend="soup-message-set-request"><function>soup_message_set_request</function></link>
206 linkend="soup-message-set-response"><function>soup_message_set_response</function></link>
207 still work roughly like they used to.
211 Unlike the old <structfield>request</structfield> and
212 <structfield>response</structfield> fields, the new
213 <structfield>request_body</structfield> and
214 <structfield>response_body</structfield> fields are not guaranteed
215 to be filled in at all times. (In particular, the
216 <structfield>response_body</structfield> is not filled in until it
217 has been fully read, although you can use <link
218 linkend="soup-message-body-get-chunk"><function>soup_message_body_get_chunk</function></link>
219 to iterate through the chunks before that point if you need to.)
223 When <structfield>request_body</structfield> and
224 <structfield>response_body</structfield> <emphasis>are</emphasis>
225 filled in, they are <literal>'\0'</literal>-terminated for your
226 processing convenience. (The terminating 0 byte is not included in
233 <title>Chunked encoding</title>
236 The prototype of the <link
237 linkend="SoupMessage-got-chunk"><literal>SoupMessage::got_chunk</literal></link>
238 signal has been changed; it now includes the chunk as a
239 <type>SoupBuffer</type> parameter (rather than storing the chunk
240 data in <literal>msg->response</literal> as in 2.2). <link
241 linkend="SoupMessageFlags"><literal>SOUP_MESSAGE_OVERWRITE_CHUNKS</literal></link>
242 is now somewhat poorly named, but still has essentially the same
243 semantics: if you set it, each chunk will be discarded after it is
244 read, and <literal>msg->response_body</literal> will not be filled
245 in with the complete response at the end of message processing.
249 The API for sending chunked responses from a
250 <type>SoupServer</type> is also slightly different now:
255 <term><function>soup_server_message_set_encoding</function></term>
258 linkend="soup-message-headers-set-encoding"><function>soup_message_headers_set_encoding</function></link>
262 <term><function>soup_message_add_chunk</function></term>
265 linkend="soup-message-body-append"><function>soup_message_body_append</function></link>
267 linkend="soup-message-body-append-buffer"><function>soup_message_body_append_buffer</function></link>
271 <term><function>soup_message_add_final_chunk</function></term>
274 linkend="soup-message-body-complete"><function>soup_message_body_complete</function></link>
280 Since the new chunk-sending APIs require you to explicitly pass
282 <structfield>request_headers</structfield>/<structfield>request_body</structfield>
283 fields, rather than just assuming you're talking about the
284 response body, in theory it is now possible to use chunked
285 encoding with the request as well. As of the 2.3.0 release this
286 has not yet been tested.
292 <title>Methods</title>
295 <type>SoupMessage</type>'s
296 <structfield>method</structfield> field is now an interned
297 string, and you can compare the method directly against
298 the defines such as <link
299 linkend="SOUP-METHOD-GET:CAPS"><literal>SOUP_METHOD_GET</literal></link>
300 (eg, in a <type>SoupServer</type> request handler).
301 <function>soup_method_get_id</function> and the
302 <literal>SOUP_METHOD_ID_*</literal> macros are now gone.
307 <title>Handlers</title>
311 linkend="soup-message-add-header-handler"><function>soup_message_add_header_handler</function></link>
313 linkend="soup-message-add-status-code-handler"><function>soup_message_add_status_code_handler</function></link>
314 are now just clever wrappers around
315 <function>g_signal_connect</function>. In particular, you now pass
316 a signal name to them rather than a <type>SoupHandlerPhase</type>,
317 and you remove them with the normal signal handler remove methods.
318 However, they still retain the special behavior that if the
319 message has been cancelled or requeued when the time comes for the
320 handler to run, then the handler will be skipped. (Use plain
321 <function>g_signal_connect</function> if you don't want that
327 <title>I/O-related <type>SoupMessage</type> methods</title>
330 <function>soup_message_io_pause</function> and
331 <function>soup_message_io_unpause</function> have been moved to
332 <type>SoupSession</type> and <type>SoupServer</type>, to better
333 reflect the fact that the session/server control the I/O, and
334 <type>SoupMessage</type> is merely acted-upon by them.
339 <term><function>soup_message_io_pause</function></term>
341 → <link linkend="soup-session-pause-message"><function>soup_session_pause_message</function></link> / <link linkend="soup-server-pause-message"><function>soup_server_pause_message</function></link>
345 <term><function>soup_message_io_unpause</function></term>
347 → <link linkend="soup-session-unpause-message"><function>soup_session_unpause_message</function></link> / <link linkend="soup-server-unpause-message"><function>soup_server_unpause_message</function></link>
353 <literal>msg->status</literal> (the I/O status) is now
354 gone as well, because (a) it's really an internal state of
355 <type>SoupSession</type>, and (b) it's too easy to confuse
356 with <literal>msg->status_code</literal> (the HTTP status)
357 anyway. Code that used to check if status was
358 <literal>SOUP_MESSAGE_STATUS_FINISHED</literal> needs to
359 be rewritten to track whether or not the <link
360 linkend="SoupMessage-finished"><literal>finished</literal></link>
361 signal has been emitted.
367 <title>HTTP-Version</title>
370 <type>SoupHttpVersion</type> is now <link
371 linkend="SoupHTTPVersion"><type>SoupHTTPVersion</type></link>
378 <title>SoupSession</title>
381 <title><function>soup_session_queue_message</function> callback</title>
385 linkend="soup-session-queue-message"><function>soup_session_queue_message</function></link>'s
386 callback parameter now includes the <type>SoupSession</type> as a
387 parameter, reflecting the fact that it is a
388 <type>SoupSession</type> callback, not a <type>SoupMessage</type>
389 callback. (It has also been renamed, from
390 <type>SoupMessageCallbackFn</type> to <link
391 linkend="SoupSessionCallback"><type>SoupSessionCallback</type></link>.)
396 <title>Authentication</title>
399 <type>SoupSession</type>'s <literal>authenticate</literal> and
400 <literal>reauthenticate</literal> signals have been merged into a
402 linkend="SoupSession-authenticate"><literal>authenticate</literal></link>
403 signal with a <parameter>retrying</parameter> parameter to indicate if
404 it's the second (or later) try. Also, the signal now includes a
405 <link linkend="SoupAuth"><type>SoupAuth</type></link> directly,
406 and you authenticate by calling <link
407 linkend="soup-auth-authenticate"><function>soup_auth_authenticate</function></link>
408 on the auth (rather than passing back a username and password from
414 <title><type>SoupLogger</type></title>
417 <link linkend="libsoup-SoupLogger"><type>SoupLogger</type></link> is a
418 new object that copies the behavior of
419 <application>evolution-exchange</application>'s
420 <literal>E2K_DEBUG</literal> and its clones. That is, it causes a
421 <type>SoupSession</type> to start logging some or all of its HTTP
422 traffic to stdout, for debugging purposes.
427 <title><type>SoupMessageFilter</type></title>
430 <type>SoupMessageFilter</type> is gone; code that used to use it
431 can now connect to the <link
432 linkend="SoupSession-request-started"><literal>SoupSession::request-started</literal></link>
433 signal to get a chance to act on each message as it is sent.
434 (This is how <type>SoupLogger</type> works.)
439 <title>Internal types</title>
442 The <type>SoupConnection</type> and <type>SoupMessageQueue</type>
443 types (which should always have been internal to
444 <type>SoupSession</type>) have been removed from the public API.
451 <title>SoupURI</title>
453 <type>SoupUri</type> has been renamed <link
454 linkend="SoupURI"><type>SoupURI</type></link>, and its behavior has
455 changed in a few ways:
460 It no longer fully-decodes %-encoded URI components. This
461 is necessary to ensure that complicated URIs (eg, URIs
462 that include other URIs as query parameters) can be
463 round-tripped correctly. This corresponds to the old
464 <structfield>broken_encoding</structfield> behavior, but
465 that flag no longer exists, since it is the default and
466 there's no way to turn it off.
470 In theory, this is an ABI-breaking change, especially for
472 linkend="SoupServer"><type>SoupServer</type></link>s.
473 However, it is unlikely to actually break anything. (And
474 in the <type>SoupServer</type> case, servers now
475 fully-decode the <structfield>path</structfield> component
476 themselves unless you set the <link
477 linkend="SOUP-SERVER-RAW-PATHS:CAPS"><literal>SOUP_SERVER_RAW_PATHS</literal></link>
478 flag on the server, so the behavior should still be the
484 It uses the RFC3986 parsing rules, including support for IPv6 literal
490 The field formerly called
491 <structfield>protocol</structfield> is now
492 <structfield>scheme</structfield>, to match the spec, and
493 it's an interned string rather than a quark. The names of
494 the predefined values have changed to match:
499 <term><function>SOUP_PROTOCOL_HTTP</function></term>
501 → <link linkend="SOUP-URI-SCHEME-HTTP:CAPS"><literal>SOUP_URI_SCHEME_HTTP</literal></link>
505 <term><function>SOUP_PROTOCOL_HTTPS</function></term>
507 → <link linkend="SOUP-URI-SCHEME-HTTPS:CAPS"><literal>SOUP_URI_SCHEME_HTTPS</literal></link>
515 <link linkend="soup-uri-decode"><function>soup_uri_decode</function></link>
516 now returns a new string rather than modifying its input string in
517 place. The new method <link
518 linkend="soup-uri-normalize"><function>soup_uri_normalize</function></link>,
519 which removes some, but not all, %-encoding, behaves similarly.
523 Finally, <type>SoupURI</type> (as well as most other struct types in
524 <application>libsoup</application>) now uses the glib "slice"
525 allocator, so any code that uses <link
526 linkend="g-new"><function>g_new</function></link> to create
527 <type>SoupURI</type>s is wrong. If you want to create a URI "by hand",
529 linkend="soup-uri-new"><function>soup_uri_new</function></link>,
530 passing <literal>NULL</literal>, and you will get back an empty
531 <type>SoupURI</type>. There are also now methods that can be used to
532 set its fields (eg, <link
533 linkend="soup-uri-set-scheme"><function>soup_uri_set_scheme</function></link>,
535 linkend="soup-uri-set-path"><function>soup_uri_set_path</function></link>,
536 etc) rather than mucking with the fields directly.
543 Related to <type>SoupURI</type>, there are some new helper methods for
544 dealing with HTML forms. <link
545 linkend="soup-form-decode-urlencoded">soup_form_decode_urlencoded</link>
546 decodes a URI <structfield>query</structfield> component (or an
547 <literal>application/x-www-form-urlencoded</literal> request body)
548 into a <type>GHashTable</type>. <link
549 linkend="soup-form-encode-urlencoded">soup_form_encode_urlencoded</link>
550 reverses the process, allowing you to fill in a
551 <literal>uri->query</literal> with a properly-encoded form dataset.
552 (<type>SoupURI</type> also provides <link
553 linkend="soup-uri-set-query-from-form"><function>soup_uri_set_query_from_form</function></link>
562 <title>XML-RPC and SOAP</title>
567 SOAP support has been removed; the existing methods covered only a
568 teeny tiny subset of SOAP, which was really only useful to a single
569 application. (The code that was formerly in libsoup has been moved to
570 that application.). If you were using this code, you can resurrect a
571 libsoup-2.4-compatible version of it from revision 1016 of libsoup
577 <title>XML-RPC</title>
579 The XML-RPC code has been completely rewritten to make it simpler to
580 implement XML-RPC clients and servers. (Note: the server-side code has
581 not been heavily tested yet.) The <link
582 linkend="libsoup-XMLRPC-Support">new XML-RPC API</link> makes use of
583 <type>GValue</type>s, with the following type mappings:
588 <term><literal>int</literal></term>
590 → <type>int</type> (<link linkend="G-TYPE-INT:CAPS"><literal>G_TYPE_INT</literal></link>)
594 <term><literal>boolean</literal></term>
596 → <type>gboolean</type> (<link linkend="G-TYPE-BOOLEAN:CAPS"><literal>G_TYPE_BOOLEAN</literal></link>)
600 <term><literal>string</literal></term>
602 → <type>char *</type> (<link linkend="G-TYPE-STRING:CAPS"><literal>G_TYPE_STRING</literal></link>)
606 <term><literal>double</literal></term>
608 → <type>double</type> (<link linkend="G-TYPE-DOUBLE:CAPS"><literal>G_TYPE_DOUBLE</literal></link>)
612 <term><literal>dateTime.iso8601</literal></term>
614 → <link linkend="SoupDate"><type>SoupDate</type></link> (<link linkend="SOUP-TYPE-DATE:CAPS"><literal>SOUP_TYPE_DATE</literal></link>)
618 <term><literal>base64</literal></term>
620 → <type>GByteArray</type> (<link linkend="SOUP-TYPE-BYTE-ARRAY:CAPS"><literal>SOUP_TYPE_BYTE_ARRAY</literal></link>)
624 <term><literal>struct</literal></term>
626 → <type>GHashTable</type> (<link linkend="G-TYPE-HASH-TABLE:CAPS"><literal>G_TYPE_HASH_TABLE</literal></link>)
630 <term><literal>array</literal></term>
632 → <type>GValueArray</type> (<link linkend="G-TYPE-VALUE-ARRAY:CAPS"><literal>G_TYPE_VALUE_ARRAY</literal></link>)
638 <type>SoupDate</type> is discussed below.
639 <literal>SOUP_TYPE_BYTE_ARRAY</literal> is just a new
640 <type>GType</type> value defined by <application>libsoup</application>
641 to represent <type>GByteArray</type>s, which glib does not define a
642 <type>GType</type> for.
646 <application>libsoup</application> provides some additional <link
647 linkend="libsoup-GValue-Support"><type>GValue</type> support
648 methods</link> for working with
649 <type>GValueArray</type>s, and <type>GHashTable</type>s of
650 <type>GValue</type>s, for the XML-RPC <literal>struct</literal> and
651 <literal>array</literal> types. Eg, you can use <link
652 linkend="soup-value-hash-new"><function>soup_value_hash_new</function></link>
653 to create a <type>GHashTable</type> to use with the XML-RPC methods,
655 linkend="soup-value-hash-insert"><function>soup_value_hash_insert</function></link>
656 to add values to it without needing to muck with <type>GValue</type>s
661 The <literal>getbug</literal> and <literal>xmlrpc-test</literal>
662 programs in the <application>libsoup</application> sources provide
663 examples of how to use the new API. (Beware that
664 <literal>xmlrpc-test</literal>'s use of the API is a little
665 complicated because of the way it sends all calls through a single
666 <literal>do_xmlrpc</literal> method.)
673 <title>SoupServer</title>
676 <title>SoupServer handlers</title>
679 The prototypes for <link
680 linkend="soup-server-add-handler"><function>soup_server_add_handler</function></link>,
682 linkend="SoupServerCallback"><type>SoupServer</type>
683 handlers</link> themselves have changed:
686 <informalexample><programlisting>
687 typedef void (*SoupServerCallback) (SoupServer *server,
691 SoupClientContext *client,
694 void soup_server_add_handler (SoupServer *server,
696 SoupServerCallback callback,
698 GDestroyNotify destroy);
699 </programlisting></informalexample>
702 <function>soup_server_add_handler</function> no longer takes a
703 <type>SoupServerAuthContext</type> (see the discussion of server
704 authentication below), and the order of the final two arguments
705 has been swapped. (Additionally, <type>SoupServerCallbackFn</type>
706 has been renamed to <type>SoupServerCallback</type>, and the old
707 <parameter>unregister</parameter> parameter of type
708 <type>SoupServerUnregisterFn</type> is now a standard
709 <type>GDestroyNotify</type>. The change to
710 <type>GDestroyNotify</type> and the swapping of the final two
711 arguments is to make the method conform to standard glib/gtk
716 In <type>SoupServerCallback</type>, several bits of data that used
717 to be part of the <parameter>context</parameter> argument are now
718 provided directly, and <parameter>context</parameter> specifically
719 only contains more specifically-client-related information (such
720 as the <type>SoupSocket</type> that the request arrived on, and
721 information about authentication).
725 <parameter>path</parameter> is the fully %-decoded path component
726 of <parameter>msg</parameter>'s URI, and
727 <parameter>query</parameter> is a hash table containing
728 <parameter>msg</parameter>'s URI's
729 <structfield>query</structfield> component decoded with <link
730 linkend="soup-form-decode-urlencoded">soup_form_decode_urlencoded</link>.
731 These are provided for your convenience; if you need the raw
732 query, you can get it out of <parameter>msg</parameter>'s URI
733 directly. If you need the raw path, you'll need to set the <link
734 linkend="SOUP-SERVER-RAW-PATHS:CAPS"><literal>SOUP_SERVER_RAW_PATHS</literal></link>
735 property on the server, which actually changes the behavior of the
736 server with respect to how paths are matched; see the
737 documentation for details.
742 <title>Server-side authentication</title>
745 <type>SoupServer</type> authentication has been completely
746 rewritten, with <type>SoupServerAuthContext</type> being replaced
748 linkend="SoupAuthDomain"><type>SoupAuthDomain</type></link>. Among
749 other improvements, you no longer need to have the cleartext
750 password available to check against. See the
751 <type>SoupAuthDomain</type> documentation, the <link
752 linkend="libsoup-server-howto">server tutorial</link>, and
753 <literal>tests/server-auth-test.c</literal>.
758 <title><literal>Expect: 100-continue</literal> and other early <type>SoupMessage</type> processing</title>
761 <type>SoupServer</type> now handles
762 "<literal>Expect: 100-continue</literal>" correctly. In
763 particular, if the client passes that header, and your server
764 requires authentication, then authentication will be checked
765 before reading the request body.
769 If you want to do additional pre-request-body handling, you can
770 connect to <type>SoupServer</type>'s <link
771 linkend="SoupServer-request-started"><literal>request_started</literal></link>
772 signal, and connect to the request's <link
773 linkend="SoupMessage-got-headers"><literal>got_headers</literal></link>
774 signal from there. (See the description of
775 <literal>request_started</literal> for information about other
776 related <type>SoupServer</type> signals.)
781 <title>Date header</title>
784 <type>SoupServer</type> now automatically sets the
785 <literal>Date</literal> header on all responses, as required by
791 <title>SoupServerMessage</title>
794 <type>SoupServerMessage</type> is now merged into
795 <type>SoupMessage</type>.
796 <function>soup_server_message_set_encoding</function> is replaced
798 linkend="soup-message-headers-set-encoding"><function>soup_message_headers_set_encoding</function></link>
799 as described in the section on <type>SoupMessage</type> above.
804 <title><function>soup_server_run</function> / <function>soup_server_quit</function></title>
808 linkend="soup-server-run"><function>soup_server_run</function></link>
810 linkend="soup-server-run-async"><function>soup_server_run_async</function></link>
811 no longer <function>g_object_ref</function> the server, and
813 linkend="soup-server-quit"><function>soup_server_quit</function></link>
821 <title>Miscellaneous</title>
824 <title>SoupDate</title>
827 The new <link linkend="SoupDate"><type>SoupDate</type></link> type
828 replaces the old <function>soup_date_*</function> methods, and has
829 an improved (more liberal) date parser.
834 <title>Header parsing</title>
837 <literal>soup-headers.h</literal> now has a few additional methods
838 for parsing list-type headers.
843 <title>SoupAddress, SoupSocket</title>
846 <type>SoupSocket</type> has had various simplifications made to
847 reflect the fact that this is specifically libsoup's socket
848 implementation, not some random generic socket API.
852 Various <type>SoupAddress</type> and <type>SoupSocket</type>
853 methods now take arguments of the new <link
854 linkend="GCancellable"><type>GCancellable</type></link> type, from
855 libgio. When porting old code, you can just pass
856 <literal>NULL</literal> for these. (<link
857 linkend="soup-address-resolve-async"><function>soup_address_resolve_async</function></link>
858 also takes another new argument, a <link
859 linkend="GMainContext"><type>GMainContext</type></link> that
860 you'll want to pass <literal>NULL</literal> for.) If you pass a
861 <type>GCancellable</type>, you can use it to cleanly cancel the
862 address resolution / socket operation.
868 <title>Base64 methods</title>
871 The deprecated base64 methods are now gone; use glib's base64