platform/upstream/libsoup.git
15 years agoFix soup_date_to_string() to deal with non-UTC times correctly
Dan Winship [Sat, 18 Apr 2009 15:37:26 +0000 (11:37 -0400)]
Fix soup_date_to_string() to deal with non-UTC times correctly

soup_date_new_from_string: fix setting of UTC vs floating for ISO8601
and RFC2822 timestamps. Allow a time of "24:00:00" (per ISO).

soup_date_to_string: coerce @date to UTC for HTTP and cookie dates,
output correct offset for RFC2822, ISO compact, and ISO full.

15 years agoBug 579055 – SOUP_DATE_RFC2822 not handled in soup_date_to_string()
Enrico Tröger [Sat, 18 Apr 2009 13:33:39 +0000 (09:33 -0400)]
Bug 579055 – SOUP_DATE_RFC2822 not handled in soup_date_to_string()

15 years agoAdd a regression test for SOUP_SESSION_TIMEOUT
Dan Winship [Sat, 18 Apr 2009 12:34:22 +0000 (08:34 -0400)]
Add a regression test for SOUP_SESSION_TIMEOUT

15 years agoBug 578928 – SOUP_SESSION_TIMEOUT does not work with https
Dan Winship [Sat, 18 Apr 2009 12:31:48 +0000 (08:31 -0400)]
Bug 578928 – SOUP_SESSION_TIMEOUT does not work with https

soup-gnutls.c: Fix error-code logic to return G_IO_STATUS_AGAIN even
with synchronous connections, if the underlying socket operation
returns EAGAIN.

15 years agoBug 574414 – Make SOUP_SESSION_TIMEOUT work with SoupSessionAsync
Dan Winship [Sat, 18 Apr 2009 12:29:28 +0000 (08:29 -0400)]
Bug 574414 – Make SOUP_SESSION_TIMEOUT work with SoupSessionAsync

soup-socket.c: when adding an IO watch to wait for an async socket to
become readable/writable, add a timeout as well, and fail if the
timeout times out.

soup-connection.c: Pass the TIMEOUT flag to async sockets too

15 years agoAdd .gitignore
Dan Winship [Fri, 17 Apr 2009 14:43:34 +0000 (10:43 -0400)]
Add .gitignore

15 years agoAdd libsoup.doap
Dan Winship [Fri, 17 Apr 2009 14:13:51 +0000 (10:13 -0400)]
Add libsoup.doap

15 years ago2.26.1 LIBSOUP_2_26_1
Dan Winship [Mon, 13 Apr 2009 22:15:27 +0000 (22:15 +0000)]
2.26.1

* configure.in: 2.26.1

* NEWS: update

svn path=/trunk/; revision=1275

15 years ago2.26.1
Dan Winship [Mon, 13 Apr 2009 22:15:08 +0000 (22:15 +0000)]
2.26.1

* configure.in: 2.26.1

* NEWS: update

svn path=/trunk/; revision=1274

15 years agofix use of async context here
Dan Winship [Mon, 13 Apr 2009 21:50:14 +0000 (21:50 +0000)]
fix use of async context here

* libsoup/soup-proxy-resolver-gnome.c (get_proxy_async): fix
use of async context here

svn path=/trunk/; revision=1273

15 years ago Bug 578809 – warnings in soup_address_equal_by_ip
Dan Winship [Mon, 13 Apr 2009 20:52:07 +0000 (20:52 +0000)]
Bug 578809 – warnings in soup_address_equal_by_ip

* libsoup/soup-session.c (get_host_for_message): don't try to look
up unresolved addresses in the hosts hash; just return NULL. The
"cancel other messages for the bad host" code in connect_result()
will loop over the whole queue, including messages with unresolved
addresses.

svn path=/trunk/; revision=1272

15 years ago Bug 578746 – http_proxy env var set to "http://:80" in session
Dan Winship [Mon, 13 Apr 2009 14:04:54 +0000 (14:04 +0000)]
Bug 578746 – http_proxy env var set to ":80" in session
despite proxy mode "none"

* libsoup/soup-proxy-resolver-gnome.c (update_proxy_settings):
Don't set anything if proxy_mode is NONE, and properly ignore the
proxy host if it's empty.

svn path=/trunk/; revision=1271

15 years ago Bug 578645 - crash in Rhythmbox Music Player
Dan Winship [Sat, 11 Apr 2009 12:45:57 +0000 (12:45 +0000)]
Bug 578645 - crash in Rhythmbox Music Player

* libsoup/soup-proxy-resolver-gnome.c
(soup_proxy_resolver_gnome_init): unlock id.lock before freeing
it. (Fixes the case where SoupProxyResolverGNOME is first
initialized from a thread other than the main thread, while the
default main loop is running.)

svn path=/trunk/; revision=1270

15 years ago2.26.0.9, aka "I can't believe it's not 2.26.1!", a pre-release to give LIBSOUP_2_26_0_9
Dan Winship [Wed, 8 Apr 2009 18:07:48 +0000 (18:07 +0000)]
2.26.0.9, aka "I can't believe it's not 2.26.1!", a pre-release to give

* configure.in: 2.26.0.9, aka "I can't believe it's not 2.26.1!",
a pre-release to give the proxy resolver fix a bit of extra
testing before next week.

* NEWS: Update

svn path=/trunk/; revision=1268

15 years ago Re-fix GNOME proxy resolution (qv bug 571527)
Dan Winship [Wed, 8 Apr 2009 17:16:52 +0000 (17:16 +0000)]
Re-fix GNOME proxy resolution (qv bug 571527)

* libsoup/soup-proxy-resolver-gnome.c: New and improved GNOME
proxy resolver; gets information out of GConf in a thread-safe
manner, and then passes it on to libproxy via environment
variables, so that libproxy won't try to access GConf itself, but
we still can use it for PAC, WPAD, and ignore_hosts.

* libsoup/soup-proxy-resolver-gconf.c:
* libsoup/soup-proxy-resolver-libproxy.c: gone now

* libsoup/soup-gnome-features.c: update for the fact that
SoupProxyResolverGNOME is actually a real type now, not
compile-time-defined alias

svn path=/trunk/; revision=1267

15 years ago Fix ISO 8601 parsing to accept either "." or ","
Dan Winship [Wed, 8 Apr 2009 14:23:15 +0000 (14:23 +0000)]
Fix ISO 8601 parsing to accept either "." or ","

* libsoup/soup-date.c (parse_iso8601_date): accept either "." or
"," as decimal separator, per the spec. qv glib bug 578369.

svn path=/trunk/; revision=1265

15 years ago Don't allow CR/LF in header names or values
Dan Winship [Sun, 5 Apr 2009 21:53:10 +0000 (21:53 +0000)]
Don't allow CR/LF in header names or values

* libsoup/soup-message-headers.c (soup_message_headers_append):
Don't let the caller create a header with whitespace or ":" in its
name, or with CR or LF in its value, since that would result in us
generating syntactically invalid headers.

svn path=/trunk/; revision=1264

15 years ago Bug 577386 – Fails to handle HTTPS redirect from a certain site.
Dan Winship [Fri, 3 Apr 2009 14:31:44 +0000 (14:31 +0000)]
Bug 577386 – Fails to handle HTTPS redirect from a certain site.

* libsoup/soup-gnutls.c (soup_gnutls_read): Treat abnormal
EOFs as though they were normal, rather than as errors. Shrug.

Reported by Diego Escalante Urrelo.

svn path=/trunk/; revision=1263

15 years ago Bug 577360 – handle cookies with same name but different path
Dan Winship [Fri, 3 Apr 2009 14:14:07 +0000 (14:14 +0000)]
Bug 577360 – handle cookies with same name but different path

* libsoup/soup-cookie-jar.c (soup_cookie_jar_add_cookie): check
both name and path when matching cookies; "foo=one; path=/bar"
should not replace "foo=two; path=/". They are separate cookies.

Reported by Alexander V. Butenko.

svn path=/trunk/; revision=1262

15 years agoFix the -p option in tests/get again
Dan Winship [Fri, 3 Apr 2009 00:49:43 +0000 (00:49 +0000)]
Fix the -p option in tests/get again

svn path=/trunk/; revision=1261

15 years ago Bug 577630 - libsoup should ignore broken Content-Type headers
Dan Winship [Fri, 3 Apr 2009 00:45:08 +0000 (00:45 +0000)]
Bug 577630 - libsoup should ignore broken Content-Type headers

* libsoup/soup-message-headers.c (content_type_setter): Ignore
Content-Type if it's not at least minimally syntactically correct.
(soup_message_headers_get_content_type): Document that.

* tests/header-parsing.c (do_content_type_tests): test it.

svn path=/trunk/; revision=1260

15 years ago Bug 577728 – soup_header_g_string_append_param should handle NULL values
Dan Winship [Fri, 3 Apr 2009 00:28:39 +0000 (00:28 +0000)]
Bug 577728 – soup_header_g_string_append_param should handle NULL values

* libsoup/soup-headers.c (soup_header_g_string_append_param):
allow @value to be %NULL.

* tests/header-parsing.c (do_append_param_tests): test
soup_header_g_string_append_param()

svn path=/trunk/; revision=1259

15 years ago Bug 576760 – soup_message_headers_get_content_type returns bad headers
Dan Winship [Fri, 3 Apr 2009 00:25:51 +0000 (00:25 +0000)]
Bug 576760 – soup_message_headers_get_content_type returns bad headers

* libsoup/soup-message-headers.c (soup_message_headers_get_one)
(soup_message_headers_get_list): New replacements for
soup_message_headers_get(), indicating explicitly whether the
caller expects the header to be a list or not; for non-list-type
headers, if there's more than one, the second one should be
ignored rather than concatenated to the first.
(soup_message_headers_get): deprecate this.

* libsoup/*.c:
* tests/*.c: Update to use soup_message_headers_get_one() or
_get_list() as appropriate.

* tests/header-parsing.c (do_content_type_tests): Add some tests
of Content-Type parsing/setting, including making sure that
duplicate Content-Type headers are ignored.

* docs/reference/libsoup-2.4-sections.txt: update

svn path=/trunk/; revision=1258

15 years ago Bug 576583 - Tests fail if "localhost" resolves to ::1
Dan Winship [Fri, 27 Mar 2009 19:47:03 +0000 (19:47 +0000)]
Bug 576583 - Tests fail if "localhost" resolves to ::1

* tests/*.c: Use "127.0.0.1" in URIs rather than "localhost",
since the default SoupServer config only listen on IPv4 (qv bug
522519), and tests/httpd.conf.in only configures apache to listen
on IPv4, and we don't handle multiple IP addresses (qv bug 526321)
but the machine might be configured to return "::1" rather than
"127.0.0.1" first for "localhost". Patch from Andreas Rottmann.

svn path=/trunk/; revision=1257

15 years agoFix docs to not claim that the cookie domain can be %NULL. Add some
Dan Winship [Fri, 27 Mar 2009 16:19:47 +0000 (16:19 +0000)]
Fix docs to not claim that the cookie domain can be %NULL. Add some

* libsoup/soup-cookie.c (soup_cookie_new): Fix docs to not claim
that the cookie domain can be %NULL. Add some g_return_if_fail()s.

svn path=/trunk/; revision=1256

15 years agoclarify that SoupSessionAsync is not thread-safe, and that setting a
Dan Winship [Fri, 27 Mar 2009 16:18:30 +0000 (16:18 +0000)]
clarify that SoupSessionAsync is not thread-safe, and that setting a

* docs/reference/client-howto.xml: clarify that SoupSessionAsync
is not thread-safe, and that setting a non-default GMainContext on
a non-threadsafe object means you can only use that object from
that GMainContext's thread.

svn path=/trunk/; revision=1255

15 years agoBug 574957 - soup-session-sync doesn't unlock mutex on proxy error
Milan Crha [Thu, 26 Mar 2009 09:20:36 +0000 (09:20 +0000)]
Bug 574957 - soup-session-sync doesn't unlock mutex on proxy error

2009-03-26  Milan Crha  <mcrha@redhat.com>

Bug 574957 - soup-session-sync doesn't unlock mutex on proxy error

* libsoup/soup-session-sync.c: (wait_for_connection):
Unlock private lock also on proxy error.

svn path=/trunk/; revision=1254

15 years ago Bug 571283 - Allow LF LF instead of CRLF CRLF as header/body separator
Dan Winship [Tue, 24 Mar 2009 23:12:21 +0000 (23:12 +0000)]
Bug 571283 - Allow LF LF instead of CRLF CRLF as header/body separator

* libsoup/soup-message-io.c (read_metadata): Change how this
works; instead of taking a boundary string, just always pass "\n"
as the boundary to soup_socket_read_until(), but call it multiple
times if the caller wants us to read until a blank line.
(io_read): update to deal with the fact that the headers might be
terminated by LF LF rather than CRLF CRLF.

svn path=/trunk/; revision=1253

15 years ago Bug 566530 - Handle (illegal) unencoded spaces in URIs
Dan Winship [Mon, 23 Mar 2009 21:39:40 +0000 (21:39 +0000)]
Bug 566530 - Handle (illegal) unencoded spaces in URIs

* libsoup/soup-uri.c (uri_normalized_copy): optionally fix up
parts with unencoded spaces in them.
(soup_uri_new_with_base): tell uri_normalized_copy() to fix up
spaces in the path and query components

* tests/uri-parsing.c (abs_tests): test parsing and unparsing a
URI with an unencoded space in it.

* tests/redirect-test.c (tests, server_callback): add a test of
redirecting to a URI with an unencoded space in it.

svn path=/trunk/; revision=1252

15 years ago2.26.0 LIBSOUP_2_26_0
Dan Winship [Mon, 16 Mar 2009 16:24:05 +0000 (16:24 +0000)]
2.26.0

* configure.in: 2.26.0

* NEWS: Update

svn path=/trunk/; revision=1250

15 years agoAdd G_{BEGIN,END}_DECLS guards to public headers.
Xan Lopez [Sat, 14 Mar 2009 21:58:40 +0000 (21:58 +0000)]
Add G_{BEGIN,END}_DECLS guards to public headers.

2009-03-14  Xan Lopez  <xan@gnome.org>

        Add G_{BEGIN,END}_DECLS guards to public headers.

        * libsoup/soup-auth.h:
        * libsoup/soup-cookie-jar-sqlite.h:
        * libsoup/soup-cookie-jar-text.h:
        * libsoup/soup-proxy-resolver.h:

svn path=/trunk/; revision=1249

15 years agoadd more detail to the doc comment
Dan Winship [Wed, 11 Mar 2009 17:51:43 +0000 (17:51 +0000)]
add more detail to the doc comment

* libsoup/soup-session.c (soup_session_cancel_message): add more
detail to the doc comment

* libsoup/soup-message.c (SoupMessage): Note in the doc comment
that reason phrases are not very useful, and should not be
presented to the user.

* libsoup/soup-status.c: add a comment explaining why reason
phrases aren't localized. Also some misc doc fixes.
(soup_status_get_phrase): Note in the doc comment that you
shouldn't present reason phrases to the user.

svn path=/trunk/; revision=1248

15 years ago Bug 571527 – gvfsd-http crashed with SIGSEGV in
Dan Winship [Mon, 9 Mar 2009 23:35:25 +0000 (23:35 +0000)]
Bug 571527 – gvfsd-http crashed with SIGSEGV in
g_hash_table_lookup().

As currently written, libproxy's gnome plugin causes intermittent
gvfsd-http crashes, and I didn't have time to come up with either
a fix or a workaround. So for 2.26.0 we will fall back to using
the GConf-based proxy resolver. Hopefully to be fixed for 2.26.1.

* configure.in: require both gconf and libproxy if building
--with-gnome

* libsoup/soup-proxy-resolver-gconf.c: bring this back.

* libsoup/soup-gnome-features.c
(soup_proxy_resolver_gnome_get_type): use gconf instead of
libproxy

* libsoup/Makefile.am: updates

svn path=/trunk/; revision=1247

15 years agogtk-doc updates. In particular, document a bunch of convenience #defines,
Dan Winship [Sun, 8 Mar 2009 15:05:43 +0000 (15:05 +0000)]
gtk-doc updates. In particular, document a bunch of convenience #defines,

* libsoup/*.c: gtk-doc updates. In particular, document a bunch of
convenience #defines, and add "Since" tags where appropriate.

svn path=/trunk/; revision=1246

15 years agoProcess messages in the CONNECTING iostate before messages in the QUEUED
Dan Winship [Fri, 6 Mar 2009 15:19:50 +0000 (15:19 +0000)]
Process messages in the CONNECTING iostate before messages in the QUEUED

* libsoup/soup-session-async.c (run_queue): Process messages in
the CONNECTING iostate before messages in the QUEUED iostate.
Otherwise, if a bunch of messages are queued all at once, and the
server doesn't support persistent connections, some messages can
get stranded in the queue. Fixes #574365 (reported by Xan Lopez)
and removes a five-year-old FIXME...

svn path=/trunk/; revision=1245

15 years agonow returns NULL if there is no Content-Type header; fix documentation to
Gustavo Noronha Silva [Fri, 20 Feb 2009 14:33:30 +0000 (14:33 +0000)]
now returns NULL if there is no Content-Type header; fix documentation to

2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>

* libsoup/soup-message-headers.c
(soup_message_headers_get_content_type): now returns NULL if there
is no Content-Type header; fix documentation to account for this
change and to actually be correct about how the Content-Type is
returned.

svn path=/trunk/; revision=1244

15 years ago Bug 572153 – SoupServer doesn't support SOUP_ENCODING_EOF
Dan Winship [Thu, 19 Feb 2009 18:55:49 +0000 (18:55 +0000)]
Bug 572153 – SoupServer doesn't support SOUP_ENCODING_EOF

* libsoup/soup-message-io.c (io_write): Various fixes to make
SOUP_ENCODING_EOF work correctly when sending response
bodies. (Previously, the code assumed that SoupServer responses
would always be chunked or Content-Length-encoded.)

* libsoup/soup-message-client-io.c (get_request_headers): when
changing a request body from SOUP_ENCODING_NONE to
SOUP_ENCODING_CONTENT_LENGTH, return the new encoding value to
soup-message-io, not the old one.

* libsoup/soup-message.c (set_property): when setting
priv->server_side to TRUE, set the default encoding on the
response headers to CONTENT_LENGTH. (Moved from SoupServer.)
(soup_message_cleanup_response): If priv->server_side is TRUE,
re-fix the response header encoding after clearing the headers.
Otherwise the response headers revert to SOUP_ENCODING_EOF after
sending a "100 Continue".
(soup_message_is_keepalive): reorganize a little, fix a bug in the
HTTP/1.0 case.

* libsoup/soup-server.c (start_request): remove request encoding
override from here.

* tests/streaming-test.c: new test of SoupServer response
streaming, testing chunked, content-length, and eof-terminated
responses

svn path=/trunk/; revision=1243

15 years agoexplain why @len normally needs to be at least @boundary_len+1. Suggested
Dan Winship [Thu, 19 Feb 2009 16:21:13 +0000 (16:21 +0000)]
explain why @len normally needs to be at least @boundary_len+1. Suggested

* libsoup/soup-socket.c (soup_socket_read_until): explain why @len
normally needs to be at least @boundary_len+1. Suggested by
Benjamin Otte.
(soup_socket_class_init): add longer gtk-docs to the non-blocking
property, to explain the way non-blocking I/O works in SoupSocket.

svn path=/trunk/; revision=1242

15 years agoFix a series of issues that prevented SoupCookieJarSQLite from working:
Xan Lopez [Thu, 19 Feb 2009 14:00:52 +0000 (14:00 +0000)]
Fix a series of issues that prevented SoupCookieJarSQLite from working:

2009-02-19  Xan Lopez  <xan@gnome.org>

        * libsoup/soup-cookie-jar-sqlite.c:
        (callback):
        (try_create_table):
        (exec_query_with_try_create_table):
        (load):
        (changed):

        Fix a series of issues that prevented SoupCookieJarSQLite from working:

        - Try to create cookies table on errors. The table was never created before.
        - Store max_age in a gulong, not int.
        - Parse correctly boolean values from query. It's 0/1, not FALSE/TRUE.
- The host is stored as host in the table, not as domain.

        #572409

svn path=/trunk/; revision=1241

15 years ago2.25.91 LIBSOUP_2_25_91
Dan Winship [Mon, 16 Feb 2009 23:40:33 +0000 (23:40 +0000)]
2.25.91

* configure.in: 2.25.91

* NEWS: update

svn path=/trunk/; revision=1239

15 years agoUpdates: Mention SoupSessionFeature (and link to SoupLogger,
Dan Winship [Sun, 15 Feb 2009 21:28:28 +0000 (21:28 +0000)]
Updates: Mention SoupSessionFeature (and link to SoupLogger,

* docs/reference/client-howto.xml: Updates: Mention
SoupSessionFeature (and link to SoupLogger, SoupCookieJar, and
SoupProxyResolverGNOME specifically). Mention forms and XML-RPC
support. Mention header-parsing methods. Give a concrete example
of connecting to SoupMessage signals. Document the (minimal)
thread-safety guarantees

* docs/reference/build-howto.xml: basic notes on pkg-config and
#include usage.

svn path=/trunk/; revision=1238

15 years agoFix crash when getting a 407 when using SoupProxyResolverGNOME (or when
Dan Winship [Fri, 6 Feb 2009 16:07:44 +0000 (16:07 +0000)]
Fix crash when getting a 407 when using SoupProxyResolverGNOME (or when

* libsoup/soup-auth-manager.c (authenticate_auth): Fix crash when
getting a 407 when using SoupProxyResolverGNOME (or when not using
any proxy). Launchpad bug #326099. (Note that this doesn't
actually make proxy-auth-with-SoupProxyResolverGNOME *work*, it
just makes it not crash.)

svn path=/trunk/; revision=1237

15 years ago2.25.5 LIBSOUP_2_25_5
Dan Winship [Mon, 2 Feb 2009 21:59:27 +0000 (21:59 +0000)]
2.25.5

* configure.in: 2.25.5

* NEWS: update

svn path=/trunk/; revision=1235

15 years agofix docs build
Dan Winship [Mon, 2 Feb 2009 21:58:25 +0000 (21:58 +0000)]
fix docs build

svn path=/trunk/; revision=1234

15 years agoRemove this, as it was incomplete, and libproxy is now officially a
Dan Winship [Mon, 2 Feb 2009 17:28:46 +0000 (17:28 +0000)]
Remove this, as it was incomplete, and libproxy is now officially a

* libsoup/soup-proxy-resolver-gconf.h:
* libsoup/soup-proxy-resolver-gconf.c: Remove this, as it was
incomplete, and libproxy is now officially a dependency of GNOME.

* libsoup/Makefile.am:
* libsoup/soup-gnome-features.c: remove gconf-vs-libproxy ifdefs

* configure.in: Remove GConf checks, require libproxy if building
libsoup-gnome.

svn path=/trunk/; revision=1233

15 years agoFix this; previously it would discard the entire message body after
Dan Winship [Thu, 29 Jan 2009 18:40:24 +0000 (18:40 +0000)]
Fix this; previously it would discard the entire message body after

* libsoup/soup-message-body.c (soup_message_body_wrote_chunk): Fix
this; previously it would discard the entire message body after
writing a SOUP_MEMORY_TEMPORARY chunk. Part of WebKit bug 18343.

* libsoup/soup-message-io.c (io_write): use
io->write_chunk->length *before* freeing io->write_chunk.

* tests/chunk-test.c (do_temporary_test): new test to make sure
that TEMPORARY buffers are handled properly.

svn path=/trunk/; revision=1232

15 years agoremove the dummy typedef for struct SoupSessionFeature that was needed
Dan Winship [Wed, 21 Jan 2009 17:15:35 +0000 (17:15 +0000)]
remove the dummy typedef for struct SoupSessionFeature that was needed

* libsoup/soup-session-feature.h: remove the dummy typedef for
struct SoupSessionFeature that was needed because we weren't
scanning soup-types.h. Fixes the build with non-GNU compilers.

* libsoup/soup-session-feature.c: document
SoupSessionFeatureInterface

* docs/reference/Makefile.am (IGNORE_HFILES): oops, don't ignore
soup-types.h

* docs/reference/libsoup-2.4-docs.sgml:
* docs/reference/libsoup-2.4-sections.txt: Split
SoupSessionFeature into its own file.

svn path=/trunk/; revision=1231

15 years agoDon't pass NULL to soup_message_headers_replace(), call
Dan Winship [Mon, 12 Jan 2009 22:21:50 +0000 (22:21 +0000)]
Don't pass NULL to soup_message_headers_replace(), call

* libsoup/soup-cookie-jar.c (request_started): Don't pass NULL to
soup_message_headers_replace(), call soup_message_headers_remove()
if there are no cookies. Likely fix for webkit bug #23240.

* libsoup/soup-message-headers.c (soup_message_headers_append):
g_return_if_fail (value != NULL)

svn path=/trunk/; revision=1227

15 years ago 2.25.4 LIBSOUP_2_25_4
Dan Winship [Mon, 5 Jan 2009 21:37:00 +0000 (21:37 +0000)]
2.25.4

* NEWS: update

svn path=/trunk/; revision=1225

15 years agodoh. belatedly commit the 2.25.3 commit, and then bump to 2.25.4
Dan Winship [Tue, 23 Dec 2008 19:25:27 +0000 (19:25 +0000)]
doh. belatedly commit the 2.25.3 commit, and then bump to 2.25.4

svn path=/trunk/; revision=1224

15 years agoadd these to query session features. #565392.
Dan Winship [Tue, 23 Dec 2008 19:21:08 +0000 (19:21 +0000)]
add these to query session features. #565392.

* libsoup/soup-session.c (soup_session_get_features)
(soup_session_get_feature): add these to query session features.
#565392.

svn path=/trunk/; revision=1223

15 years agoadd some more warning CFLAGS, inspired by Benjamin Otte's blog post,
Dan Winship [Tue, 23 Dec 2008 19:05:12 +0000 (19:05 +0000)]
add some more warning CFLAGS, inspired by Benjamin Otte's blog post,

* configure.in: add some more warning CFLAGS, inspired by Benjamin
Otte's blog post, although none of them picked out any actual
bugs. Annoyingly, the most interesting warnings came from
-Wwrite-strings and -Wshadow, both of which I decided against
keeping, because they had too many false positives.

* libsoup/soup-cookie-jar.c (soup_cookie_jar_get_cookies): rename
a variable to avoid shadowing.

* libsoup/soup-message-headers.c
(soup_message_headers_get_ranges): move a variable declaration to
avoid a possibly-confusing shadowing.

* tests/forms-test.c:
* tests/header-parsing.c:
* tests/range-test.c:
* tests/test-utils.c: constify some "char *"s that should have
already been const.

* tests/get.c (find_hrefs): rename an arg whose name shadowed a
global, to avoid possible future confusion
(get_url): Likewise with a functional-internal shadowing.

svn path=/trunk/; revision=1222

15 years agoExplicitly document the fact that you have to call soup_uri_set_path()
Dan Winship [Tue, 9 Dec 2008 19:53:49 +0000 (19:53 +0000)]
Explicitly document the fact that you have to call soup_uri_set_path()

* libsoup/soup-uri.c (soup_uri_new): Explicitly document the fact
that you have to call soup_uri_set_path() when using
soup_uri_new(NULL), since path is required to be non-%NULL.

* libsoup/soup-connection.c (connect_message): initialize
uri->path

* libsoup/soup-cookie.c (soup_cookie_applies_to_uri):
g_return_val_if_fail() rather than crashing if uri->path is %NULL.
Also, fix the cookie/uri path comparison to not potentially read
off the end of uri->path. #562191, Mark Lee.

svn path=/trunk/; revision=1221

15 years agoCorrectly handle forms that have URI-encoded parameter names. #563302,
Dan Winship [Fri, 5 Dec 2008 03:57:05 +0000 (03:57 +0000)]
Correctly handle forms that have URI-encoded parameter names. #563302,

* libsoup/soup-form.c (soup_form_decode): Correctly handle forms
that have URI-encoded parameter names. #563302, Evan Nemerson.

* tests/forms-test.c: test that

svn path=/trunk/; revision=1220

15 years agodisconnect from gconf notifications. Fixes a crash, #563145.
Dan Winship [Wed, 3 Dec 2008 19:49:14 +0000 (19:49 +0000)]
disconnect from gconf notifications. Fixes a crash, #563145.

* libsoup/soup-proxy-resolver-gconf.c (finalize): disconnect from
gconf notifications. Fixes a crash, #563145.

svn path=/trunk/; revision=1219

15 years ago2.25.2 LIBSOUP_2_25_2
Dan Winship [Mon, 1 Dec 2008 23:08:33 +0000 (23:08 +0000)]
2.25.2

* configure.in: 2.25.2

* NEWS: update

svn path=/trunk/; revision=1217

15 years agoFix this so we choose the *strongest* auth type first, rather than the
Dan Winship [Fri, 28 Nov 2008 23:12:32 +0000 (23:12 +0000)]
Fix this so we choose the *strongest* auth type first, rather than the

* libsoup/soup-auth-manager.c (auth_type_compare_func): Fix this
so we choose the *strongest* auth type first, rather than the
weakest. Doh. #562339, Pontus Oldberg.

svn path=/trunk/; revision=1216

15 years agomake this $(includedir)/libsoup-gnome-2.4/libsoup rather than being the
Dan Winship [Fri, 28 Nov 2008 22:21:18 +0000 (22:21 +0000)]
make this $(includedir)/libsoup-gnome-2.4/libsoup rather than being the

* libsoup/Makefile.am (libsoupgnomeincludedir): make this
$(includedir)/libsoup-gnome-2.4/libsoup rather than being the same
as $(libsoupincludedir). Makes it easier to split into two
packages.

svn path=/trunk/; revision=1215

15 years agofix method name in example. #562411, Andreas Bruse.
Dan Winship [Fri, 28 Nov 2008 21:28:09 +0000 (21:28 +0000)]
fix method name in example. #562411, Andreas Bruse.

* docs/reference/client-howto.xml: fix method name in example.
#562411, Andreas Bruse.

svn path=/trunk/; revision=1214

15 years agoclarify exactly when stuff gets logged (and in particular, that
Dan Winship [Mon, 24 Nov 2008 17:15:47 +0000 (17:15 +0000)]
clarify exactly when stuff gets logged (and in particular, that

* libsoup/soup-logger.c: clarify exactly when stuff gets logged
(and in particular, that SoupSession::authenticate gets emitted
before the response it is authenticating gets logged).

svn path=/trunk/; revision=1207

16 years agofix linking with --as-needed. #559342, pointed out by Götz Waschk
Dan Winship [Thu, 6 Nov 2008 15:14:45 +0000 (15:14 +0000)]
fix linking with --as-needed. #559342, pointed out by Götz Waschk

* libsoup/Makefile.am (libsoup_gnome_2_4_la_LIBADD): fix linking
with --as-needed. #559342, pointed out by Götz Waschk

svn path=/trunk/; revision=1205

16 years ago2.25.1 LIBSOUP_2_25_1
Dan Winship [Tue, 4 Nov 2008 21:54:35 +0000 (21:54 +0000)]
2.25.1

* configure.in: 2.25.1

* NEWS: update

svn path=/trunk/; revision=1203

16 years agofix to mention that xan and diegoe did most of the cookie stuff
Dan Winship [Tue, 4 Nov 2008 21:49:12 +0000 (21:49 +0000)]
fix to mention that xan and diegoe did most of the cookie stuff

svn path=/trunk/; revision=1202

16 years agomisc doc fixes
Dan Winship [Tue, 4 Nov 2008 21:08:30 +0000 (21:08 +0000)]
misc doc fixes

* libsoup/soup-address.c (soup_address_is_resolved):
* libsoup/soup-cookie.c (soup_cookie_copy):
* libsoup/soup-cookie-jar.c (soup_cookie_jar_class_init):
* libsoup/soup-message-headers.c (SoupMessageHeadersType):
* libsoup/soup-proxy-resolver.c
(soup_proxy_resolver_get_proxy_async)
(soup_proxy_resolver_get_proxy_sync):
* libsoup/soup-status.c (soup_status_proxyify): misc doc fixes

* libsoup/soup-cookie-jar-text.h: remove a "deprecated" API that
was never actually released

* libsoup/soup.h: include soup-proxy-resolver.h

* docs/reference/Makefile.am (SCAN_OPTIONS): set
--deprecated-guards correctly
(IGNORE_HFILES): ignore some more internal files
(GTKDOC_LIBS): link against libsoup-gnome, not libsoup

* docs/reference/libsoup-2.4-docs.sgml:
* docs/reference/libsoup-2.4.types:
* docs/reference/libsoup-2.4-sections.txt: add new stuff

svn path=/trunk/; revision=1201

16 years agoimplementation of SoupCookieJar that persists to a text file in the old
Dan Winship [Tue, 4 Nov 2008 20:30:37 +0000 (20:30 +0000)]
implementation of SoupCookieJar that persists to a text file in the old

* libsoup/soup-cookie-jar-text.c: implementation of SoupCookieJar
that persists to a text file in the old Mozilla cookies.txt
format.

* libsoup/soup-cookie-jar-sqlite.c: implementation of
SoupCookieJar that persists to an sqlite database in the new
Mozilla cookies.sqlite format. (Part of libsoup-gnome.)

* libsoup/soup-cookie-jar.c: add various functionality needed by
the two new subclasses. Does not break API/ABI compat with 2.24.

* libsoup/soup-cookie.c (soup_cookie_get_type): register
SoupCookie as a boxed type.
(domain_matches): fix a bug here that meant "foo.com" couldn't set
a cookie for domain=.foo.com
(soup_cookie_applies_to_uri): fix path checking

* configure.in: if building --with-gnome, require sqlite3

svn path=/trunk/; revision=1200

16 years agodon't remove the item from the queue here; it should already have happened
Dan Winship [Mon, 3 Nov 2008 22:43:12 +0000 (22:43 +0000)]
don't remove the item from the queue here; it should already have happened

* libsoup/soup-session-sync.c (process_queue_item): don't remove
the item from the queue here; it should already have happened in
all circumstances. Possible fix for #559052.

* libsoup/soup-session.c (cancel_message): don't remove the item
from the queue here; the call to soup_message_finished() will do
that.

* libsoup/soup-message-queue.c (soup_message_queue_remove): This
should only be called once, so g_return_if_fail (!item->removed)

* tests/test-utils.c (test_init): install a new default g_log
handler that increments the error count when it's called so that a
test won't pass if it triggers a g_warning() or
g_return_if_fail().

svn path=/trunk/; revision=1199

16 years agofix srcdir/builddir mixup.
Dan Winship [Mon, 3 Nov 2008 22:18:36 +0000 (22:18 +0000)]
fix srcdir/builddir mixup.

* tests/Makefile.am (get_LDADD): fix srcdir/builddir mixup.

svn path=/trunk/; revision=1198

16 years agodon't leak the header string
Dan Winship [Mon, 3 Nov 2008 22:11:51 +0000 (22:11 +0000)]
don't leak the header string

* libsoup/soup-message-headers.c (set_content_foo): don't leak the
header string

* libsoup/soup-multipart.c (generate_boundary): avoid a (harmless)
valgrind warning

* libsoup/soup-proxy-resolver-static.c (get_proxy_sync): don't
leak the address on error

* libsoup/soup-session-sync.c (wait_for_connection): don't leak
proxy_addr

* tests/misc-test.c: don't leak the SoupMessage signal ids

* tests/range-test.c (main): don't leak base_uri

* tests/libsoup.supp: update this using lots and lots of wildcards

svn path=/trunk/; revision=1197

16 years agoFix the signal handler disconnection here: for "finished" we were passing
Dan Winship [Mon, 3 Nov 2008 15:50:30 +0000 (15:50 +0000)]
Fix the signal handler disconnection here: for "finished" we were passing

* libsoup/soup-session.c (message_finished): Fix the signal
handler disconnection here: for "finished" we were passing the
wrong user_data to g_signal_handlers_disconnect_by_func(), and for
"got_body" it turns out you can't use _disconnect_by_func() when
there's a metamarshal, making it incompatible
withsoup_message_add_header_handler(). Fixes a crash in
evolution-exchange, #559054.

* tests/misc-test.c (do_msg_reuse_test): Ensure that SoupSession
and its features disconnect all of their signals from a message
when they're done with it.

svn path=/trunk/; revision=1196

16 years agocommit changelog for previous commit. oops
Dan Winship [Fri, 31 Oct 2008 18:12:53 +0000 (18:12 +0000)]
commit changelog for previous commit. oops

svn path=/trunk/; revision=1195

16 years ago Add libsoup-gnome, for new features that depend on GNOME
Dan Winship [Fri, 31 Oct 2008 18:12:18 +0000 (18:12 +0000)]
Add libsoup-gnome, for new features that depend on GNOME
libraries.

* configure.in: Check for libproxy and/or gconf, accept
--without-gnome option, output libsoup-gnome-2.4.pc

* libsoup-gnome-2.4.pc: pc file for libsoup with GNOME support

* libsoup/Makefile.am: build libsoup-gnome.la if so configured

* libsoup/soup-gnome.h: base header for libsoup-gnome

* libsoup/soup-proxy-resolver-libproxy.c: An implementation of
SoupProxyResolver that uses libproxy.

* libsoup/soup-proxy-resolver-gconf.c: An implementation of
SoupProxyResolver that uses the proxy keys in GConf. Does not
completely handle ignore_hosts; this is currently just used as a
fallback if libproxy is not available.

* libsoup/soup-gnome-features.c: provides
SOUP_TYPE_PROXY_RESOLVER_GNOME (abstracting over
SoupProxyResolverGConf and SoupProxyResolverLibproxy) and
SOUP_TYPE_GNOME_FEATURES_2_26, which adds "all GNOME-specific
features in libsoup 2.26", which is currently just the proxy
resolver.

* libsoup/soup-session-async.c (resolved_proxy_addr): set
item->resolved_proxy_addr
(run_queue): resolve the proxy if !item->resolved_proxy_addr, not
if !item->proxy_addr, since the proxy addr might resolve to NULL.

* tests/Makefile.am (get_LDADD):
* tests/get.c: If we built libsoup-gnome, use it in "get" for
automatic proxy support

svn path=/trunk/; revision=1194

16 years agorename from libsoup.pc.in; the attempt to keep the source tree
Dan Winship [Fri, 31 Oct 2008 17:55:32 +0000 (17:55 +0000)]
rename from libsoup.pc.in; the attempt to keep the source tree

* libsoup-2.4.pc.in: rename from libsoup.pc.in; the attempt to
keep the source tree API-version-generic wasn't really working,
and we're probably not ever going to change the API version again
anyway.

* Makefile.am (pkgconfig_DATA): install the .pc file the normal
way rather than using an install-data-local rule to rename the .pc
file as we install it

* libsoup/Makefile.am (libsoupincludedir):
* tests/Makefile.am (LIBS):
* docs/reference/Makefile.am (GTKDOC_LIBS): Say "2.4" everywhere,
instead of 2.4 in some places and $(SOUP_API_VERSION) in others.

* configure.in: updates for .pc renaming. Also, use
AS_HELP_STRING() in AC_ARG_ENABLE() and AC_ARG_WITH() rules

svn path=/trunk/; revision=1193

16 years agonew abstract base class for a SoupSessionFeature that determines what
Dan Winship [Fri, 31 Oct 2008 13:05:14 +0000 (13:05 +0000)]
new abstract base class for a SoupSessionFeature that determines what

* libsoup/soup-proxy-resolver.c: new abstract base class for a
SoupSessionFeature that determines what proxy to use for a given
URI.

* libsoup/soup-proxy-resolver-static.c: a SoupProxyResolver that
always returns the same value.

* libsoup/soup-session.c (set_property, get_property): implement
the SOUP_SESSION_PROXY_URI property by creating/destroying a
SoupProxyResolverStatic as needed.
(soup_session_get_connection): Use the proxy address passed by the
caller rather than priv->proxy_uri.

* libsoup/soup-session-async.c (run_queue): if the session has a
proxy resolver, use it, and pass the resolved proxy to
soup_session_get_connection().
(request_restarted): clear the previously-resolved proxy address
when restarting the message

* libsoup/soup-session-sync.c (wait_for_connection): if the
session has a proxy resolver, use it, and pass the resolved proxy
to soup_session_get_connection().

* libsoup/soup-message-queue.h (SoupMessageQueueItem): add
proxy-address-resolving fields

* libsoup/soup-status.c (soup_status_proxify): moved from
soup-connection; turn SOUP_STATUS_CANT_RESOLVE into
SOUP_STATUS_CANT_RESOLVE_PROXY, and SOUP_STATUS_CANT_CONNECT into
SOUP_STATUS_CANT_CONNECT_PROXY (and pass all other statuses
through unchanged)

svn path=/trunk/; revision=1192

16 years agodo directory listings. (wrote this a long time ago, it just never made it
Dan Winship [Thu, 30 Oct 2008 21:01:55 +0000 (21:01 +0000)]
do directory listings. (wrote this a long time ago, it just never made it

* tests/simple-httpd.c: do directory listings. (wrote this a long
time ago, it just never made it into svn)

svn path=/trunk/; revision=1191

16 years agofree the expires date, if set
Dan Winship [Mon, 27 Oct 2008 21:40:40 +0000 (21:40 +0000)]
free the expires date, if set

* libsoup/soup-cookie.c (soup_cookie_free): free the expires date,
if set

* libsoup/soup-auth-domain-basic.h:
* libsoup/soup-auth-domain-digest.h:
* libsoup/soup-auth-domain.h:
* libsoup/soup-cookie-jar.h:
* libsoup/soup-logger.h:
* libsoup/soup-multipart.h: add G_BEGIN/END_DECLS

* libsoup/soup-date.c: add some g_return_if_fails

Patches from and inspired by Xan Lopez, #522125

svn path=/trunk/; revision=1190

16 years agofix up some of the regression test configuration stuff, and print warnings
Dan Winship [Wed, 22 Oct 2008 15:41:23 +0000 (15:41 +0000)]
fix up some of the regression test configuration stuff, and print warnings

* configure.in:
* tests/Makefile.am: fix up some of the regression test
configuration stuff, and print warnings when some tests aren't run
do to missing dependencies

svn path=/trunk/; revision=1189

16 years agoremove gtk-doc.make. i'm not sure why it was ever committed
Dan Winship [Wed, 22 Oct 2008 14:40:41 +0000 (14:40 +0000)]
remove gtk-doc.make. i'm not sure why it was ever committed

svn path=/trunk/; revision=1188

16 years agoadd SOUP_MAINTAINER_FLAGS here too.
Dan Winship [Mon, 20 Oct 2008 15:06:16 +0000 (15:06 +0000)]
add SOUP_MAINTAINER_FLAGS here too.

* tests/Makefile.am (INCLUDES): add SOUP_MAINTAINER_FLAGS here
too.

* tests/dns.c (main):
* tests/getbug.c (main):
* tests/server-auth-test.c (do_test): replace deprecated glib
functions

svn path=/trunk/; revision=1184

16 years agoBuild with G_DISABLE_DEPRECATED and G_DISABLE_SINGLE_INCLUDES; enforce the
Cosimo Cecchi [Mon, 20 Oct 2008 13:17:59 +0000 (13:17 +0000)]
Build with G_DISABLE_DEPRECATED and G_DISABLE_SINGLE_INCLUDES; enforce the

2008-10-20  Cosimo Cecchi  <cosimoc@gnome.org>

* configure.in:
* libsoup/Makefile.am:
* libsoup/soup-status.h:
* libsoup/soup-types.h:
* libsoup/soup-uri.c: (soup_uri_to_string):
Build with G_DISABLE_DEPRECATED and G_DISABLE_SINGLE_INCLUDES; enforce
the first switch under maintainer mode and the second one
unconditionally (#557072).

svn path=/trunk/; revision=1183

16 years agocompare scheme name case-insensitively, to prevent an infinite loop when
Dan Winship [Sun, 19 Oct 2008 13:41:17 +0000 (13:41 +0000)]
compare scheme name case-insensitively, to prevent an infinite loop when

* libsoup/soup-auth.c (soup_auth_update): compare scheme name
case-insensitively, to prevent an infinite loop when it's not in
standard form. #536285

svn path=/trunk/; revision=1182

16 years agoif the caller passed the total_length of the message body, then sort sort
Dan Winship [Fri, 10 Oct 2008 21:35:35 +0000 (21:35 +0000)]
if the caller passed the total_length of the message body, then sort sort

* libsoup/soup-message-headers.c
(soup_message_headers_get_ranges): if the caller passed the
total_length of the message body, then sort sort the ranges and
merge overlapping ones to generate a minimal set.

* tests/range-test.c: test it

svn path=/trunk/; revision=1181

16 years agoVerify whether uri is non-NULL and avoid crash on NULL pointer dereference
Andrew W. Nosenko [Fri, 10 Oct 2008 17:05:58 +0000 (17:05 +0000)]
Verify whether uri is non-NULL and avoid crash on NULL pointer dereference

2008-10-09  Andrew W. Nosenko  <andrew.w.nosenko@gmail.com>

* libsoup/soup-uri.c (soup_uri_to_string): Verify whether uri is
non-NULL and avoid crash on NULL pointer dereference therefore.

svn path=/trunk/; revision=1180

16 years agoChange the SoupURI properties to SoupAddress properties.
Dan Winship [Fri, 3 Oct 2008 21:01:54 +0000 (21:01 +0000)]
Change the SoupURI properties to SoupAddress properties.

* libsoup/soup-connection.c: Change the SoupURI properties to
SoupAddress properties.

* libsoup/soup-address.c (soup_address_resolve_async)
(soup_address_resolve_sync): Redo slightly so that multiple
simultaneous attempts to resolve the same address won't cause
problems.
(soup_address_hash_by_name, soup_address_equal_by_name):
(soup_address_hash_by_ip, soup_address_equal_by_ip): methods to
hash addresses by name or IP address

* libsoup/soup-message.c (soup_message_get_address): gets a
SoupAddress corresponding to the message's URI

* libsoup/soup-auth-manager.c (SoupAuthHost): hash hosts by
soup_address_hash_by_name() rather than by URI.

* libsoup/soup-session.c (soup_session_get_connection): pass
addresses to soup_connection_new(), not URIs.
(SoupSessionHost): hash hosts by soup_address_hash_by_ip() rather
than by URI. This requires that the addresses will have already
been resolved by the SoupSession subclasses before calling
soup_session_get_connection(), but also means that now requests
made to different virtual hosts on the same IP address can share a
connection.

* libsoup/soup-message-queue.c (SoupMessageQueueItem): add
address-resolving state

* libsoup/soup-session-sync.c (process_queue_item): resolve the
message's address before getting a connection

* libsoup/soup-session-async.c (run_queue, resolve_msg_addr)
(resolved_msg_addr): resolve the message's address before getting
a connection
(request_restarted): if the message gets requeued to a different
host, we'll need to re-resolve the address.

* libsoup/soup-uri.c (soup_uri_copy_root, soup_uri_host_hash)
(soup_uri_host_equal): No longer needed

* libsoup/soup-dns.c (do_async_callback): disconnect from the
cancellable before invoking the callback

* tests/proxy-test.c (tests): fix the 403 example; hostnames are
resolved by the session now, even when sending to a proxy, so we
need to use a hostname that actually exists

svn path=/trunk/; revision=1179

16 years agoMake this more complicated, with a SoupMessageQueueItem to keep track of
Dan Winship [Fri, 3 Oct 2008 20:17:56 +0000 (20:17 +0000)]
Make this more complicated, with a SoupMessageQueueItem to keep track of

* libsoup/soup-message-queue.c: Make this more complicated, with a
SoupMessageQueueItem to keep track of the session's per-message
state. (Part of the process of moving session-related state out of
SoupMessagePrivate.)

* libsoup/soup-session.c: Update to work in terms of
SoupMessageQueueItem

* libsoup/soup-session-async.c:
* libsoup/soup-session-sync.c: use SoupMessageQueueItem (and get
rid of SoupSessionAsyncQueueData and SoupSessionSyncAsyncData).

svn path=/trunk/; revision=1178

16 years agoupdate
Dan Winship [Fri, 3 Oct 2008 19:48:26 +0000 (19:48 +0000)]
update

svn path=/trunk/; revision=1177

16 years agoNew type and methods for working with multipart HTTP bodies (eg,
Dan Winship [Wed, 1 Oct 2008 21:53:26 +0000 (21:53 +0000)]
New type and methods for working with multipart HTTP bodies (eg,

* libsoup/soup-multipart.c: New type and methods for working with
multipart HTTP bodies (eg, multipart/form-data and
multipart/byte-ranges)

* libsoup/soup-message-headers.c (soup_message_headers_get_ranges)
(soup_message_headers_set_ranges)
(soup_message_headers_set_range)
(soup_message_headers_get_content_range)
(soup_message_headers_set_content_range): New methods for dealing
with the Range and Content-Range headers.

* libsoup/soup-form.h (SOUP_FORM_MIME_TYPE_URLENCODED)
(SOUP_FORM_MIME_TYPE_MULTIPART): #define these MIME types here

* libsoup/soup-form.c (soup_form_decode_multipart): new utility
for parsing multipart/form-data forms.
(soup_form_request_new_from_multipart): new utility for
constructing multipart/form-data forms

* libsoup/soup-headers.c (soup_headers_parse): this is now
non-static, for use by soup-multipart

* libsoup/soup-message-server-io.c (get_response_headers)
(handle_partial_get): if the client requested a partial GET, and
the SoupServer is returning the full body, rebuild the response to
include only the requested range instead

* tests/forms-test.c: renamed from query-test and updated to do
both application/x-www-form-urlencoded and multipart/form-data
tests

* tests/range-test.c: test of Range/Content-Range functionality

svn path=/trunk/; revision=1176

16 years agoUpdate these to deal with RFC2231-encoded UTF-8 header params
Dan Winship [Wed, 1 Oct 2008 21:12:24 +0000 (21:12 +0000)]
Update these to deal with RFC2231-encoded UTF-8 header params

* libsoup/soup-headers.c (soup_header_parse_param_list)
(soup_header_parse_semi_param_list): Update these to deal with
RFC2231-encoded UTF-8 header params
(soup_header_g_string_append_param): new utility method to do
parameters with quoted-strings (handling escaping) and RFC2231.

* libsoup/soup-auth-digest.c (get_authorization):
* libsoup/soup-auth-domain-basic.c (challenge):
* libsoup/soup-auth-domain-digest.c (challenge): use
soup_header_g_string_append_param so we handle escaping correctly

* libsoup/soup-message-headers.c
(soup_message_headers_get_content_type)
(soup_message_headers_set_content_type)
(soup_message_headers_get_content_disposition)
(soup_message_headers_set_content_disposition): New convenience
methods.

* tests/header-parsing.c (do_rfc2231_tests): new test of RFC2231
encoded header parsing in Content-Disposition.

* tests/get.c (get_url): use
soup_message_headers_get_content_type()

* docs/reference/libsoup-2.4-sections.txt: update

svn path=/trunk/; revision=1175

16 years agoadd a new -s flag to indicate that it's being run from inside
Dan Winship [Wed, 1 Oct 2008 20:54:09 +0000 (20:54 +0000)]
add a new -s flag to indicate that it's being run from inside

* tests/xmlrpc-test.c (main): add a new -s flag to indicate that
it's being run from inside xmlrpc-server-test.
(test_echo): if we aren't running inside xmlrpc-server-test, and
the response strings don't match the request strings, then compare
them to echo_strings_broken instead; a bug in php-xmlrpc manifests
when using libxml2 >= 2.7.1, resulting in incorrect responses. :-/

* tests/xmlrpc-server-test.c (do_xmlrpc_tests): Pass -s to
xmlrpc-test

svn path=/trunk/; revision=1173

16 years agobump version to 2.25.0
Dan Winship [Wed, 1 Oct 2008 20:15:19 +0000 (20:15 +0000)]
bump version to 2.25.0

* configure.in: bump version to 2.25.0

svn path=/trunk/; revision=1172

16 years agodoc fixups
Dan Winship [Wed, 1 Oct 2008 20:09:42 +0000 (20:09 +0000)]
doc fixups

* libsoup/soup-cookie-jar.c:
* libsoup/soup-cookie.c:
* libsoup/soup-cookie.h:
* libsoup/soup-headers.c:
* libsoup/soup-logger.c:
* libsoup/soup-session-feature.c:
* libsoup/soup-session-feature.h:
* libsoup/soup-session.c: doc fixups

* docs/reference/libsoup-2.4-docs.sgml:
* docs/reference/libsoup-2.4-sections.txt:
* docs/reference/libsoup-2.4.types: Add missing bits

svn path=/trunk/; revision=1170

16 years agosoup_value_hash_insert_value() copies the value, so we have to
Dan Winship [Tue, 30 Sep 2008 17:16:48 +0000 (17:16 +0000)]
soup_value_hash_insert_value() copies the value, so we have to

* libsoup/soup-xmlrpc.c (parse_value):
soup_value_hash_insert_value() copies the value, so we have to
g_value_unset() our copy.

* tests/chunk-test.c:
* tests/misc-test.c:
* tests/ntlm-test.c: fix leaks

* tests/libsoup.supp: update

svn path=/trunk/; revision=1169

16 years agostore the GSource in priv, don't ref the session. Otherwise the session
Dan Winship [Tue, 30 Sep 2008 15:43:17 +0000 (15:43 +0000)]
store the GSource in priv, don't ref the session. Otherwise the session

* libsoup/soup-session-async.c (do_idle_run_queue): store the
GSource in priv, don't ref the session. Otherwise the session
won't get destroyed if you abort it and then don't return to its
main loop. (addendum to #498509, Arnout Vandecappelle)
(finalize): Destroy the idle_run_queue source when finalizing.
(run_queue, got_connection): Ref the session when calling
soup_connection_connect_async(), and do a
do_idle_run_queue()+unref in got_connection, to ensure correct
handling regardless of what the application does with its own ref
on the session.
(final_finished): Likewise, ref/do_idle_run_queue/unref rather
than calling run_queue directly and playing with weak pointers.

* libsoup/soup-session.c (connect_result): ref the session around
the cancel-if-error loop

Fixes #533473, crash in seahorse when connecting to a
non-responsive key server.

* tests/misc-test.c (do_callback_unref_test): Add a test for the
bug in #533473.

* tests/test-utils.c (soup_test_session_abort_unref): abort and
unref a SoupSession, and consider it an error if the session still
exists afterward. Suggested by Arnout Vandecappelle.
(test_server_shutdown): Likewise, consider it an error if the
server is leaked.

* tests/*.c: Use soup_test_session_abort_unref().

svn path=/trunk/; revision=1168

16 years agolibsoup/soup-auth-manager-ntlm.c libsoup/soup-auth-manager.c
Dan Winship [Fri, 26 Sep 2008 21:59:42 +0000 (21:59 +0000)]
libsoup/soup-auth-manager-ntlm.c libsoup/soup-auth-manager.c

* libsoup/soup-auth-manager-ntlm.c
* libsoup/soup-auth-manager.c
* libsoup/soup-cookie-jar.c
* libsoup/soup-dns.c
* libsoup/soup-logger.c:
* libsoup/soup-message-body.h:
* libsoup/soup-message.h
* libsoup/soup-misc.h:
* libsoup/soup-xmlrpc.h:

* tests/continue-test.c:
* tests/ntlm-test.c: Fix warnings pointed out by gcc -pedantic.
#553976, Sander Dijkhuis.

svn path=/trunk/; revision=1167

16 years ago2.24.0.1
Dan Winship [Wed, 24 Sep 2008 12:17:55 +0000 (12:17 +0000)]
2.24.0.1

* configure.in: 2.24.0.1

* NEWS: Update

* libsoup/soup-session.c (redirect_handler):
* libsoup/soup-message.c (soup_message_new):
(soup_message_new_from_uri, soup_message_set_uri): Revert the
2008-08-25 change; it breaks the rhythmbox DAAP plugin. #553466.
To be revisited.

svn path=/trunk/; revision=1164

16 years ago2.24.0 LIBSOUP_2_24_0
Dan Winship [Mon, 22 Sep 2008 18:08:07 +0000 (18:08 +0000)]
2.24.0

* configure.in: 2.24.0

svn path=/trunk/; revision=1161

16 years ago2.23.92 (belated; I apparently forgot to commit this after disting LIBSOUP_2_23_92
Dan Winship [Tue, 16 Sep 2008 16:36:19 +0000 (16:36 +0000)]
2.23.92 (belated; I apparently forgot to commit this after disting

2.23.92
(belated; I apparently forgot to commit this after disting 2.23.92)

svn path=/trunk/; revision=1159

16 years agoa 302 response to HEAD (or any other safe method) should be treated like a
Dan Winship [Sun, 7 Sep 2008 17:43:03 +0000 (17:43 +0000)]
a 302 response to HEAD (or any other safe method) should be treated like a

* libsoup/soup-session.c (redirect_handler): a 302 response to
HEAD (or any other safe method) should be treated like a 307, not
a 303. #551190, Jonathan Matthew.

* tests/redirect-test.c: test that

svn path=/trunk/; revision=1158

16 years ago2.23.91 LIBSOUP_2_23_91
Dan Winship [Mon, 1 Sep 2008 21:48:11 +0000 (21:48 +0000)]
2.23.91

* configure.in: 2.23.91

* NEWS: update

svn path=/trunk/; revision=1156

16 years agonew macro to check if a URI is a valid http or https URI.
Dan Winship [Mon, 25 Aug 2008 13:53:41 +0000 (13:53 +0000)]
new macro to check if a URI is a valid http or https URI.

* libsoup/soup-uri.h (SOUP_URI_VALID_FOR_HTTP): new macro to check
if a URI is a valid http or https URI.

* libsoup/soup-uri.c (soup_uri_new_with_base): Update http/https
check to use SOUP_URI_VALID_FOR_HTTP().

* libsoup/soup-session.c (redirect_handler): Check
SOUP_URI_VALID_FOR_HTTP() and call it an error if the check fails.

* libsoup/soup-message.c (soup_message_new): Remove the uri->host
check from here. Update docs to clarify that @uri must be an
http/https URI.
(soup_message_new_from_uri): Check SOUP_URI_VALID_FOR_HTTP().
Update docs.
(soup_message_set_uri): Check SOUP_URI_VALID_FOR_HTTP(). Update
docs.

Should prevent the crash in #528882, but there's still something
going wrong there at a higher level.

svn path=/trunk/; revision=1155

16 years agoAdd a SoupDate to GTimeVal conversion function, for use in gvfs. #549006,
Bastien Nocera [Fri, 22 Aug 2008 14:13:56 +0000 (14:13 +0000)]
Add a SoupDate to GTimeVal conversion function, for use in gvfs. #549006,

2008-08-22  Bastien Nocera  <hadess@hadess.net>

* libsoup/soup-date.c (soup_date_to_time_t),
(soup_date_to_timeval):
* libsoup/soup-date.h: Add a SoupDate to GTimeVal conversion
function, for use in gvfs. #549006, with help from Dan Winship
<danw@gnome.org>

svn path=/trunk/; revision=1154