platform/upstream/libsoup.git
13 years agosoup-cache: keep track of the HTTP status code to use it for cache responses
Sergio Villar Senin [Tue, 14 Jun 2011 15:29:28 +0000 (17:29 +0200)]
soup-cache: keep track of the HTTP status code to use it for cache responses

SoupMessages returned by the cache were lacking the HTTP status code. We
must store it in the cache and restore it when sending responses back.

https://bugzilla.gnome.org/show_bug.cgi?id=649965

13 years agosoup-cache: Add versioning support to SoupCache
Sergio Villar Senin [Tue, 14 Jun 2011 11:37:05 +0000 (13:37 +0200)]
soup-cache: Add versioning support to SoupCache

Cache index file was renamed to soup.cache2. It now contains the version of
the cache used to store data. If the version used to save the file is not
the same than the current cache versions then cache files will be deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=652554

13 years agosoup-session.c: reference leak in soup_session_prepare_for_uri
Sergio Villar Senin [Thu, 16 Jun 2011 14:56:50 +0000 (16:56 +0200)]
soup-session.c: reference leak in soup_session_prepare_for_uri

soup_session_prepare_for_uri() takes a reference to a SoupAddress that is
never unref'ed. This could lead to big leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=652699

13 years agosoup-cache: removed a g_debug statement
Sergio Villar Senin [Tue, 14 Jun 2011 12:09:37 +0000 (14:09 +0200)]
soup-cache: removed a g_debug statement

I added it by mistake in the patch that was fixing some SoupCache leaks.

13 years agosoup-cache: fix several leaks.
Sergio Villar Senin [Mon, 13 Jun 2011 12:13:06 +0000 (14:13 +0200)]
soup-cache: fix several leaks.

We were incorrectly using the GVariant API to serialize/deserialize cache
contents. The consequence is that several leaks were created when loading
and dumping the cache.

https://bugzilla.gnome.org/show_bug.cgi?id=649309

13 years agosoup-cache: update state of SoupMessages when returning data from the cache
Sergio Villar Senin [Wed, 8 Jun 2011 07:18:07 +0000 (09:18 +0200)]
soup-cache: update state of SoupMessages when returning data from the cache

SoupCache generates conditional requests to validate some resources. As the
cache is transparent for the client it must update the state of the
SoupMessage used by the SoupHTTPRequest as if the message was really
transmitted over the network. SoupCache was not updating the state
(basically status code and headers) of the SoupMessage that belongs to the
SoupHTTPRequest but the one used for freshness validation.

https://bugzilla.gnome.org/show_bug.cgi?id=649965

13 years agosoup-message-io: clear connection from queue items when IDLE status is set
Sergio Villar Senin [Thu, 26 May 2011 13:27:37 +0000 (15:27 +0200)]
soup-message-io: clear connection from queue items when IDLE status is set

Do not reuse the SoupConnection we used for the first time when
a SoupMessage gets redirected as it could have been assigned to a different
SoupMessage meanwhile.

https://bugzilla.gnome.org/show_bug.cgi?id=651146

13 years agoFix few memory leaks
Milan Crha [Fri, 3 Jun 2011 05:55:57 +0000 (07:55 +0200)]
Fix few memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=651643

13 years agoCOPYING: update to a version with the correct mailing address
Dan Winship [Tue, 24 May 2011 15:17:32 +0000 (11:17 -0400)]
COPYING: update to a version with the correct mailing address

13 years agosoup-cache: do not store hop-by-hop headers.
Sergio Villar Senin [Thu, 19 May 2011 08:19:13 +0000 (10:19 +0200)]
soup-cache: do not store hop-by-hop headers.

Those headers are meaningful only for single transport-level connections,
we should not store them.

https://bugzilla.gnome.org/show_bug.cgi?id=650094

13 years agoSoupContentDecoder: deal with broken apache Content-Encoding
Dan Winship [Sun, 22 May 2011 14:01:30 +0000 (10:01 -0400)]
SoupContentDecoder: deal with broken apache Content-Encoding

When sending a .gz file, Apache will (by default) incorrectly claim
"Content-Encoding: gzip", causing us to do the wrong thing with it.
Work around this bug in the same way Firefox does.

https://bugzilla.gnome.org/show_bug.cgi?id=613361

13 years agodocs: fix typo in client-howto
Dan Winship [Sat, 21 May 2011 14:29:12 +0000 (10:29 -0400)]
docs: fix typo in client-howto

Patch from Davide Italiano
https://bugzilla.gnome.org/show_bug.cgi?id=650526

13 years agosoup-request-file: plug leak
Xan Lopez [Thu, 5 May 2011 20:44:32 +0000 (13:44 -0700)]
soup-request-file: plug leak

We are needlessly duplicating a string that we never free.

13 years agosoup-cache: free params hash list
Xan Lopez [Thu, 5 May 2011 20:42:20 +0000 (13:42 -0700)]
soup-cache: free params hash list

There's one code path where we can exit the method without freeing
it. Plug the leak.

13 years agoFix docs build for pickier linkers
Dan Winship [Mon, 2 May 2011 20:54:26 +0000 (16:54 -0400)]
Fix docs build for pickier linkers

Patch from "arno"
https://bugzilla.gnome.org/show_bug.cgi?id=648948

13 years agosoup-session.c: always send the "Keep-Alive" header
Sergio Villar Senin [Tue, 26 Apr 2011 16:47:11 +0000 (18:47 +0200)]
soup-session.c: always send the "Keep-Alive" header

This will save us many new connection attempts when connecting to HTTP1.0
servers that automatically try to close the connection unless specified by
the client.

https://bugzilla.gnome.org/show_bug.cgi?id=648680

13 years agoPost-branch version bump to 2.35.0
Dan Winship [Mon, 25 Apr 2011 21:30:05 +0000 (17:30 -0400)]
Post-branch version bump to 2.35.0

13 years ago2.34.1 LIBSOUP_2_34_1
Dan Winship [Mon, 25 Apr 2011 21:13:05 +0000 (17:13 -0400)]
2.34.1

13 years agosoup-cache: plug leak
Xan Lopez [Sat, 23 Apr 2011 19:40:55 +0000 (12:40 -0700)]
soup-cache: plug leak

We are leaking a GFile per cache response.

https://bugzilla.gnome.org/show_bug.cgi?id=648521

13 years agosoup_session_abort: fix a race condition in SoupSessionSync
Dan Winship [Wed, 20 Apr 2011 14:18:57 +0000 (10:18 -0400)]
soup_session_abort: fix a race condition in SoupSessionSync

soup_session_abort() on a SoupSessionSync would sometimes crash,
because of races between the cancellation of the pending messages and
the destruction of the open connections. Fix this by waiting for all
of the messages to finish cancelling before we start closing the
connections.

13 years agosoup-cache: do not append data to existing files
Sergio Villar Senin [Wed, 20 Apr 2011 11:22:01 +0000 (13:22 +0200)]
soup-cache: do not append data to existing files

SoupCache was creating files using g_file_append_to_async(). Whenever there
was an untracked existing file in the directory cache, the SoupCache was
incorrectly appending data to the existing file, and thus, creating invalid
cached resources on disk.

https://bugzilla.gnome.org/show_bug.cgi?id=648285

13 years agosoup_uri_to_string: print port numbers as unsigned integers
Sergio Villar Senin [Fri, 15 Apr 2011 15:10:58 +0000 (17:10 +0200)]
soup_uri_to_string: print port numbers as unsigned integers

soup_uri_to_string() was using the "%d" printf format but it
should use "%u" instead as the port number is a guint in SoupURI.

https://bugzilla.gnome.org/show_bug.cgi?id=647767

13 years agoBuild relevant parts of libsoup-gnome on windows
Fridrich Štrba [Tue, 12 Apr 2011 22:16:38 +0000 (00:16 +0200)]
Build relevant parts of libsoup-gnome on windows

13 years agosoup_request_data_send: data URL decoding fix
Sergio Villar Senin [Wed, 6 Apr 2011 19:55:23 +0000 (21:55 +0200)]
soup_request_data_send: data URL decoding fix

SoupRequestData was not unescaping base64 URIs before trying to decode them.
This was incorrectly causing decoding errors with base64 data.

https://bugzilla.gnome.org/show_bug.cgi?id=646896

13 years agoFix memory leaks, update libsoup.supp
Dan Winship [Mon, 28 Mar 2011 18:59:00 +0000 (14:59 -0400)]
Fix memory leaks, update libsoup.supp

13 years agoheader-parsing: update tests for RFC 5987 and multipart quoting changes
Dan Winship [Tue, 5 Apr 2011 17:54:33 +0000 (13:54 -0400)]
header-parsing: update tests for RFC 5987 and multipart quoting changes

13 years agosoup-multipart: Fix generation of Content-Disposition for broken servers
Dan Winship [Mon, 4 Apr 2011 17:21:16 +0000 (13:21 -0400)]
soup-multipart: Fix generation of Content-Disposition for broken servers

Some servers require that Content-Disposition headers use
quoted-string values, even if the provided filename can be represented
as a token. So use soup_header_g_string_append_param_quoted(), but also
change that to fall back to using RFC 5987 encoding if necessary, so
that we can still specify UTF-8-encoded filenames.

13 years agosoup-headers: Update UTF-8 header param handling for RFC 5987
Dan Winship [Mon, 4 Apr 2011 17:18:36 +0000 (13:18 -0400)]
soup-headers: Update UTF-8 header param handling for RFC 5987

Update the handling of UTF-8 header parameters for the
changes/clarifications to RFC 2231 published in RFC 5987:

    * Decode iso-8859-1 params in addition to UTF-8 ones
    * An encoded UTF-8 param should override an unencoded param
      of the same name, regardless of which order they appear in

13 years agopost-release version bump to 2.34.1
Dan Winship [Thu, 7 Apr 2011 12:35:46 +0000 (08:35 -0400)]
post-release version bump to 2.34.1

13 years ago2.34.0 LIBSOUP_2_34_0
Dan Winship [Mon, 4 Apr 2011 15:39:26 +0000 (11:39 -0400)]
2.34.0

13 years agoUse the custom main context in SoupProxyResolverDefault
Sebastian Dröge [Wed, 30 Mar 2011 07:41:33 +0000 (09:41 +0200)]
Use the custom main context in SoupProxyResolverDefault

https://bugzilla.gnome.org/show_bug.cgi?id=646201

13 years agoBump shared library minor version for API additions since 2.32
Dan Winship [Tue, 29 Mar 2011 16:26:03 +0000 (12:26 -0400)]
Bump shared library minor version for API additions since 2.32

13 years agoFix introspection build on Debian/Ubuntu
Dan Winship [Thu, 24 Mar 2011 17:22:34 +0000 (13:22 -0400)]
Fix introspection build on Debian/Ubuntu

Debian libtool is weird about dependencies, so specify that
SoupGNOME-2.4.gir depends libsoup-2.4.la too, even though we shouldn't
have to.

(Also use --include-uninstalled, which turned out not to be the fix
for this bug, but is correct anyway.)

https://bugzilla.gnome.org/show_bug.cgi?id=645505

13 years ago2.33.92 LIBSOUP_2_33_92
Dan Winship [Tue, 22 Mar 2011 02:15:18 +0000 (22:15 -0400)]
2.33.92

13 years agosoup_socket_get_remote_address: fix
Dan Winship [Mon, 21 Mar 2011 17:42:44 +0000 (13:42 -0400)]
soup_socket_get_remote_address: fix

This was setting priv->local_addr instead of priv->remote_addr, and so
it always ended up returning NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=645227

13 years agoAdd restarted streaming chunk-test, which is where it really starts to get fun
David Woodhouse [Mon, 21 Mar 2011 17:15:29 +0000 (17:15 +0000)]
Add restarted streaming chunk-test, which is where it really starts to get fun

13 years agoAdd client streaming test to chunk-test.c
David Woodhouse [Mon, 21 Mar 2011 14:30:17 +0000 (14:30 +0000)]
Add client streaming test to chunk-test.c

For when the client *really* wants the request not to accumulate. It can
call soup_message_body_wrote_chunk() from the wrote-chunk signal handler,
to simulate the behaviour that the server side gets.

13 years agoSoupProxyResolverGNOME: make this a subclass of SoupProxyResolverDefault
Dan Winship [Mon, 21 Mar 2011 17:23:15 +0000 (13:23 -0400)]
SoupProxyResolverGNOME: make this a subclass of SoupProxyResolverDefault

modify SoupProxyResolverDefault so it's possible to override the
choice of g_proxy_resolver_get_default(), and make
SoupProxyResolverGNOME just be a subclass of SoupProxyResolverDefault
that specifically requests the "gnome" GProxyResolver.

libsoup-gnome no longer depends on libproxy and GConf. (Perhaps it
should now depend on gsettings-desktop-schemas, or else a
glib-networking that includes GProxyResolverGnome. But it will fall
back to using the libproxy-based proxy resolver in that case anyway,
so it's all good.)

https://bugzilla.gnome.org/show_bug.cgi?id=625898

13 years agosoup-proxy-resolver-default.c: new proxy resolver based on GProxyResolver
Gustavo Noronha Silva [Mon, 21 Feb 2011 23:04:35 +0000 (20:04 -0300)]
soup-proxy-resolver-default.c: new proxy resolver based on GProxyResolver

This adds a new session feature that makes it easy to take advantage
of the new GProxyResolver object available in GIO.

https://bugzilla.gnome.org/show_bug.cgi?id=642928

13 years agoReset priv->base_offset in soup_message_body_truncate()
David Woodhouse [Mon, 21 Mar 2011 14:02:27 +0000 (14:02 +0000)]
Reset priv->base_offset in soup_message_body_truncate()

13 years agoAdd 'soup_server_disconnect' method
Andreas Rottmann [Sat, 12 Mar 2011 19:28:03 +0000 (20:28 +0100)]
Add 'soup_server_disconnect' method

This is primarily useful for language bindings, where you don't have
explicit control over reference counts, and hence cannot just use
'g_object_unref' on the server object.

See https://bugzilla.gnome.org/show_bug.cgi?id=638576

13 years agotests: remove a redundant GOptionEntry flag that now causes a warning
Dan Winship [Fri, 11 Mar 2011 12:03:29 +0000 (07:03 -0500)]
tests: remove a redundant GOptionEntry flag that now causes a warning

13 years agoSoupCookieJar: catch overflows when parsing very distant dates
Dan Winship [Fri, 11 Mar 2011 11:52:56 +0000 (06:52 -0500)]
SoupCookieJar: catch overflows when parsing very distant dates

Our APIs use an int for max_age, which meant that when reading a
cookie file/db written by another program on a 64-bit architecture, a
very large max_age would overflow. Fix things up to avoid that. Since
we can't change the APIs to use a long for max_age, this means that we
will end up expiring the cookie "early" (eg, in 20 years rather than
50).

Based on a patch from Mark Starovoytov
https://bugzilla.gnome.org/show_bug.cgi?id=643462

13 years agosoup-cookie-jar: avoid a g_return_if_fail when using non-http URIs
Dan Winship [Fri, 11 Mar 2011 00:59:07 +0000 (19:59 -0500)]
soup-cookie-jar: avoid a g_return_if_fail when using non-http URIs

When using SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY, don't try to
domain-match the cookie if the first_party URI has no domain.

https://bugzilla.gnome.org/show_bug.cgi?id=643226

13 years agoDOAP: fix download location
Olav Vitters [Tue, 8 Mar 2011 21:34:51 +0000 (22:34 +0100)]
DOAP: fix download location

13 years agoParse month names regardless of case
Christian Dywan [Mon, 7 Mar 2011 16:18:40 +0000 (17:18 +0100)]
Parse month names regardless of case

A test case is added that verifies that this works.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=644048

13 years ago2.33.90 LIBSOUP_2_33_90
Dan Winship [Tue, 22 Feb 2011 02:10:42 +0000 (21:10 -0500)]
2.33.90

13 years agosoup-cache.c: do not cache multipart/x-mixed-replace content
Sergio Villar Senin [Wed, 16 Feb 2011 10:27:44 +0000 (11:27 +0100)]
soup-cache.c: do not cache multipart/x-mixed-replace content

That MIME type is normally used to stream video from webcams. Makes no sense to
cache those resources as they are always changing.

https://bugzilla.gnome.org/show_bug.cgi?id=642028

13 years agosoup-session.c: send Keep-Alive for HTTP/1.0 connections
Sergio Villar Senin [Mon, 24 Jan 2011 13:32:11 +0000 (14:32 +0100)]
soup-session.c: send Keep-Alive for HTTP/1.0 connections

Sending the keep alive header prevents connections from closing and thus
improves overall performance when requesting multiple resources from HTTP/1.0
hosts as we do not need to create new connections for each request but reuse
the existing ones.

https://bugzilla.gnome.org/show_bug.cgi?id=640414

13 years agosoup-message-client-io: ASCIIfy unicode hostnames for Host header
Dan Winship [Tue, 15 Feb 2011 20:13:32 +0000 (15:13 -0500)]
soup-message-client-io: ASCIIfy unicode hostnames for Host header

We were resolving unicode hostnames correctly, but then putting them
in the Host header as UTF-8 rather than using the ASCII-encoded
version. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=642075

13 years agoFix typo
Andre Klapper [Wed, 2 Feb 2011 23:35:25 +0000 (00:35 +0100)]
Fix typo

13 years agoMake the glib-networking dependency more explicit
Dan Winship [Wed, 2 Feb 2011 20:38:26 +0000 (15:38 -0500)]
Make the glib-networking dependency more explicit

Require glib-networking to be present at build time (with an error
explaining that you can pass --disable-tls-check, but packagers should
make sure libsoup has a runtime dependency on glib-networking).

Also, if a TLS connection fails because of missing glib-networking,
mention that in the reason_phrase, as a last resort.

13 years ago2.33.6 LIBSOUP_2_33_6
Dan Winship [Mon, 31 Jan 2011 21:47:17 +0000 (16:47 -0500)]
2.33.6

13 years agosoup-cache: fix a warning (and a bug)
Dan Winship [Tue, 25 Jan 2011 17:23:08 +0000 (12:23 -0500)]
soup-cache: fix a warning (and a bug)

If a request specifies "Cache-Control: max-age=0", revalidate the
response, but don't mark the cache entry as "must_revalidate", since
the need for revalidation applies only to the current request.

https://bugzilla.gnome.org/show_bug.cgi?id=640556

13 years agosoup-request-data: return decoded contents for non-base64 data URLs
Sergio Villar Senin [Mon, 31 Jan 2011 12:29:22 +0000 (13:29 +0100)]
soup-request-data: return decoded contents for non-base64 data URLs

SoupRequestData was not returning the decoded version of data URLs when they
were not encoded in base64

https://bugzilla.gnome.org/show_bug.cgi?id=641022

13 years agoSoupCache fails to load resources when cache contents are externally removed
Sergio Villar Senin [Fri, 28 Jan 2011 22:32:23 +0000 (17:32 -0500)]
SoupCache fails to load resources when cache contents are externally removed

Try to download cached resources again if they are no longer
accesible by the cache.

https://bugs.webkit.org/show_bug.cgi?id=50577

(belatedly copied from WebKit's version of this file)

13 years agoFix a warning (again)
Dan Winship [Tue, 25 Jan 2011 17:18:57 +0000 (12:18 -0500)]
Fix a warning (again)

soup-date uses strtoul() to parse the sub-second portion of an ISO
8601 timestamp (to verify that it's syntactically valid), but then
throws that information away. gcc 4.6 is pickier about how we throw it
away though.

13 years agosoup-form: fix soup_form_decode() for multiple values with the same key
Sven Neumann [Tue, 18 Jan 2011 15:22:26 +0000 (10:22 -0500)]
soup-form: fix soup_form_decode() for multiple values with the same key

If multiple values in an urlencoded dataset use the same key, the
resulting value in the hash-table created by soup_form_decode() used
to point to memory that is already freed. That is because
g_hash_table_insert() frees the passed key which happens to point
to the memory that contains the new value. Fix this by using
g_hash_table_replace() instead.

13 years agoAdd test for soup_form_decode().
Sven Neumann [Tue, 18 Jan 2011 15:08:41 +0000 (10:08 -0500)]
Add test for soup_form_decode().

Add a test that checks how soup_form_decode() handles multiple values
with the same key.

13 years agosoup-session-async:fixed a connection starvation issue
Sergio Villar Senin [Mon, 17 Jan 2011 17:43:20 +0000 (18:43 +0100)]
soup-session-async:fixed a connection starvation issue

Trying to cleanup connections ASAP could potentially lead to starvation of the
messages in the queue tail if we issue a lot of connections in a short period
of time to a reduced set of servers. As we are able to notice connections
closed by servers without even running the cleanup connections code, trying to
prune connections so quickly is not that important now.

https://bugzilla.gnome.org/show_bug.cgi?id=639768

13 years ago2.33.5 LIBSOUP_2_33_5
Dan Winship [Mon, 10 Jan 2011 22:54:33 +0000 (17:54 -0500)]
2.33.5

13 years agosoup_session_cancel_message: fix up, especially in sync sessions
Dan Winship [Mon, 10 Jan 2011 18:47:52 +0000 (13:47 -0500)]
soup_session_cancel_message: fix up, especially in sync sessions

Cancelling a message from another thread had some race conditions that
could sometimes cause crashes. Fix things up a bit by using
GCancellable to interrupt the I/O, rather than calling
soup_message_io_finished() directly.

Also added a test for this case to tests/misc-test, although
unfortunately due to the raciness of the bug, it only failed
sporadically even before the fix (but seems to fail never now).

https://bugzilla.gnome.org/show_bug.cgi?id=637741

13 years agosoup-message-io: don't watch for SoupSocket::disconnect
Dan Winship [Mon, 10 Jan 2011 17:50:21 +0000 (12:50 -0500)]
soup-message-io: don't watch for SoupSocket::disconnect

The IO code was explicitly handling the SoupSocket::disconnect signal,
but this is actually redundant; if the socket gets disconnected we'll
get either an error (if writing) or an eof (if reading), and the code
will do the right thing with that. Watching ::disconnected too just
results in processing the same error twice and having to be extra
careful to do it idempotently.

13 years ago2.33.4 LIBSOUP_2_33_4
Dan Winship [Tue, 21 Dec 2010 15:39:19 +0000 (10:39 -0500)]
2.33.4

13 years ago[gi] annotate nicks for the elements of HTTPVersion enum
John (J5) Palmieri [Mon, 13 Dec 2010 20:33:16 +0000 (15:33 -0500)]
[gi] annotate nicks for the elements of HTTPVersion enum

* GI was parsing as HTTPVersion.SOUP_HTTP_1_0 as HTTPVersion.0
* GI now parses as HTTPVersion.HTTP_1_0 (identifiers can't start with a number
  so we append HTTP for good measure)

13 years agosoup-http-input-stream: fixed a condition
Sergio Villar Senin [Mon, 13 Dec 2010 09:31:22 +0000 (10:31 +0100)]
soup-http-input-stream: fixed a condition

priv->caller_buffsize and priv->leftover_bufsize are both unsigned integers,
and thus, checking (a - b > 0) could incorrectly return TRUE if b > a.

13 years agosoup-request-data: another fix
Dan Winship [Sun, 12 Dec 2010 11:14:06 +0000 (12:14 +0100)]
soup-request-data: another fix

13 years agosoup-request-data: Fix content-type decoding
Dan Winship [Sun, 12 Dec 2010 10:50:57 +0000 (11:50 +0100)]
soup-request-data: Fix content-type decoding

Given "data:text/html,<html>...", it was reporting the content-type as
"data:text/html". Fix.

https://bugs.webkit.org/show_bug.cgi?id=50885

13 years agosoup-cookie-jar: allow setting cookies on file:// URIs
Dan Winship [Sat, 11 Dec 2010 10:31:59 +0000 (11:31 +0100)]
soup-cookie-jar: allow setting cookies on file:// URIs

Because other browsers do, and WebKit has a test for it.

https://bugzilla.gnome.org/show_bug.cgi?id=603825

13 years agoFix leak when processing the set cookie header
Jonathon Jongsma [Wed, 8 Dec 2010 05:09:31 +0000 (23:09 -0600)]
Fix leak when processing the set cookie header

Valgrind trace:
==4617== 401 (96 direct, 305 indirect) bytes in 2 blocks are definitely lost in loss record 15,500 of 16,590
==4617==    at 0x4C244E8: malloc (vg_replace_malloc.c:236)
==4617==    by 0x103D73AA: g_malloc (gmem.c:164)
==4617==    by 0x103F0EB4: g_slice_alloc (gslice.c:842)
==4617==    by 0x103F0F0C: g_slice_alloc0 (gslice.c:854)
==4617==    by 0xE1CCD04: parse_one_cookie (soup-cookie.c:218)
==4617==    by 0xE1CD2B3: soup_cookies_from_response (soup-cookie.c:763)
==4617==    by 0xE1CE332: process_set_cookie_header (soup-cookie-jar.c:562)
==4617==    by 0xFB4AC36: g_cclosure_marshal_VOID__VOID (gmarshal.c:79)
==4617==    by 0xFB2F59E: g_closure_invoke (gclosure.c:766)
==4617==    by 0xFB4A2B1: signal_emit_unlocked_R (gsignal.c:3252)
==4617==    by 0xFB490EE: g_signal_emit_valist (gsignal.c:2983)
==4617==    by 0xFB4966C: g_signal_emit (gsignal.c:3040)
==4617==    by 0xE1DA0DF: io_read (soup-message-io.c:903)

https://bugzilla.gnome.org/show_bug.cgi?id=636741

13 years agoDon't uselessly g_warn when TLS isn't available
Dan Winship [Fri, 10 Dec 2010 11:53:48 +0000 (12:53 +0100)]
Don't uselessly g_warn when TLS isn't available

We g_warn if we can't read the provided SOUP_SESSION_SSL_CA_FILE
(since we have no other way to indicate the error to the app). But
don't warn if the problem is just that the TLS backend isn't available,
since that will cause equally-obvious failures later on that don't
require g_warnings.

13 years agoRemove SoupCoding, SoupCodingGZip, use GZlibDecompressor
Dan Winship [Fri, 10 Dec 2010 11:44:59 +0000 (12:44 +0100)]
Remove SoupCoding, SoupCodingGZip, use GZlibDecompressor

also add a new test to coding-test for handling content that
doesn't decode correctly

13 years agofix previous commit; I only tested the "not working" case before...
Dan Winship [Fri, 10 Dec 2010 11:27:52 +0000 (12:27 +0100)]
fix previous commit; I only tested the "not working" case before...

13 years agoAdd glib-networking to the MISSING_REGRESSION_TEST_PACKAGES checks
Dan Winship [Fri, 10 Dec 2010 09:27:39 +0000 (10:27 +0100)]
Add glib-networking to the MISSING_REGRESSION_TEST_PACKAGES checks

and make timeout-test and proxy-test skip their https tests if
it's not available

13 years agoSoupDirectoryInputStream: fixed a reference leak
Sergio Villar Senin [Thu, 9 Dec 2010 16:39:09 +0000 (17:39 +0100)]
SoupDirectoryInputStream: fixed a reference leak

The GFileInfo returned by g_file_enumerator_next_file must be unref'ed when no
longer needed

13 years agoCache must not return a cached resource with "no-cache" directive
Sergio Villar Senin [Thu, 9 Dec 2010 12:32:41 +0000 (13:32 +0100)]
Cache must not return a cached resource with "no-cache" directive

If "Pragma: no-cache" or "Cache-Control: no-cache" do exist in a request then
the cache must not return a cached resource but reload the resource from the
original server.

A "Cache-Control: max-age=0" should also force the cache to revalidate its
entries against the original server.

13 years ago2.33.1 (not a release, just a pkg-config-able number)
Dan Winship [Thu, 9 Dec 2010 11:08:06 +0000 (12:08 +0100)]
2.33.1 (not a release, just a pkg-config-able number)

2.33.1 is "the version with SoupRequest and SoupCache"

13 years agoMake SoupRequester a SoupSessionFeature and the request types sub-features
Dan Winship [Wed, 8 Dec 2010 11:52:54 +0000 (12:52 +0100)]
Make SoupRequester a SoupSessionFeature and the request types sub-features

WebKit already exposes the SoupSession to its users, so this change
will automatically give them access to the SoupRequest infrastructure
as well.

13 years agoImport SoupRequest/cache stuff from new-io branch / WebKit
Dan Winship [Wed, 8 Dec 2010 09:40:02 +0000 (10:40 +0100)]
Import SoupRequest/cache stuff from new-io branch / WebKit

SoupRequest stuff is based on Gabriel Corvalan's Google Summer of Code
project from 2009, as further hacked on at the 2009 WebKitGTK Hackfest.

The cache stuff was written on top of that by Sergio Villar and
initially committed to WebKit since it only works with the SoupRequest
infrastructure, and the SoupRequest stuff was never fully completed
(eg, the synchronous versions never worked right).

Move all of this here now as a first step to finishing it, but hide it
behind #ifdef LIBSOUP_USE_UNSTABLE_REQUEST_API.

13 years agoSoupSession, SoupAuthManagerNTLM: Use subfeatures for NTLM auth too
Dan Winship [Mon, 7 Jun 2010 21:03:19 +0000 (17:03 -0400)]
SoupSession, SoupAuthManagerNTLM: Use subfeatures for NTLM auth too

Deprecate SoupSession:use-ntlm in favor of using
soup_session_add_feature_by_type() with SOUP_TYPE_AUTH_NTLM.

13 years agoSoupAuthManager: implement subfeatures for adding/removing auth types
Dan Winship [Mon, 7 Jun 2010 20:46:20 +0000 (16:46 -0400)]
SoupAuthManager: implement subfeatures for adding/removing auth types

Allow using soup_session_add/remove_feature_by_type() to add/remove auth
types from the session, and add a test for that

13 years agoSoupSession: allow features to implement "subfeatures"
Dan Winship [Mon, 7 Jun 2010 20:45:22 +0000 (16:45 -0400)]
SoupSession: allow features to implement "subfeatures"

Let soup_session_add_feature_by_type() (and remove()) add and remove
"features" from existing features. Eg, to add/remove auth types or
Content-Encodings.

13 years agosoup-message-headers: add missing annotations in get_content_type
Lucas Rocha [Tue, 7 Dec 2010 15:56:27 +0000 (15:56 +0000)]
soup-message-headers: add missing annotations in get_content_type

13 years agoSet SoupMessage:tls-certificate from SoupSocket:tls-certificate sooner
Dan Winship [Tue, 7 Dec 2010 14:12:08 +0000 (15:12 +0100)]
Set SoupMessage:tls-certificate from SoupSocket:tls-certificate sooner

Use the new GTlsConnection:peer-certificate semantics to guarantee we
set the certificate on the message as soon as it's been accepted.

13 years agoAdd SoupMessage:tls-certificate and SoupMessage:tls-errors
Dan Winship [Mon, 6 Dec 2010 13:05:15 +0000 (14:05 +0100)]
Add SoupMessage:tls-certificate and SoupMessage:tls-errors

These provide more information about the certificate on the other end of
a TLS connection.

13 years agoSoupSocket: port to GSocketConnection/GTlsConnection
Dan Winship [Fri, 13 Nov 2009 00:44:27 +0000 (19:44 -0500)]
SoupSocket: port to GSocketConnection/GTlsConnection

and remove libsoup's built-in TLS support, which is no longer needed

13 years agoBump version to 2.33.0
Dan Winship [Tue, 7 Dec 2010 10:22:28 +0000 (11:22 +0100)]
Bump version to 2.33.0

13 years agoInclude C header and exported packages information in GIRs
Evan Nemerson [Sun, 21 Nov 2010 00:11:39 +0000 (16:11 -0800)]
Include C header and exported packages information in GIRs

https://bugzilla.gnome.org/show_bug.cgi?id=635395

13 years ago2.32.2 LIBSOUP_2_32_2
Dan Winship [Mon, 29 Nov 2010 23:01:58 +0000 (18:01 -0500)]
2.32.2

13 years agoSoupSocket: tweak GMainContext handling
Dan Winship [Tue, 23 Nov 2010 20:50:42 +0000 (15:50 -0500)]
SoupSocket: tweak GMainContext handling

GSocketClient may take multiple steps, in which case we need to make
sure that the socket's async_context is the thread-default context
throughout all of them.

This will break horribly if someone tries to send things off to
multiple different contexts from a single thread, but that was never
supposed to have worked, and always had race conditions anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=635101

13 years agoSoupSessionSync: fix messages getting stuck forever
Dan Winship [Tue, 23 Nov 2010 17:53:37 +0000 (12:53 -0500)]
SoupSessionSync: fix messages getting stuck forever

Messages in SoupSessionSync were getting stuck forever if they didn't
manage to get a connection on the first try; the test programs didn't
pick this up because none of them queue enough messages all at once to
hit the max-conns limit.

Fix the messages-getting-stuck bug, and add a test case to misc-test
to verify it. Also fix another SoupSessionSync bug where cancelling
several messages at once could cause spurious errors.

https://bugzilla.gnome.org/show_bug.cgi?id=634422

13 years agomisc-test: fix up the new persistent connection timeout test
Dan Winship [Thu, 18 Nov 2010 15:15:28 +0000 (10:15 -0500)]
misc-test: fix up the new persistent connection timeout test

The original version of the test implicitly depended on thread
scheduling, and would fail if the server thread didn't get a chance to
run after returning its response but before the the client thread made
its next request. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=631525

13 years ago2.32.1 LIBSOUP_2_32_1
Dan Winship [Mon, 15 Nov 2010 23:42:02 +0000 (18:42 -0500)]
2.32.1

13 years agotests/httpd.conf.in: fix passwords-in-uri stuff for srcdir!=builddir
Dan Winship [Mon, 15 Nov 2010 23:41:43 +0000 (18:41 -0500)]
tests/httpd.conf.in: fix passwords-in-uri stuff for srcdir!=builddir

13 years agoAdd tests to auth-test for password-in-URI
Sergio Villar Senin [Wed, 6 Oct 2010 16:51:11 +0000 (18:51 +0200)]
Add tests to auth-test for password-in-URI

https://bugzilla.gnome.org/show_bug.cgi?id=631679

13 years agosoup-auth-manager: make URI username/password override cached info
Dan Winship [Sun, 14 Nov 2010 16:48:04 +0000 (11:48 -0500)]
soup-auth-manager: make URI username/password override cached info

This allows a page to, eg, force a logout by sending an XMLHttpRequest
using a bad password.

Based on a patch from Sergio Villar.

https://bugzilla.gnome.org/show_bug.cgi?id=631679

13 years agoReturn SOUP_STATUS_CAN_RESOLVE_PROXY as appropriate
Dan Winship [Sat, 13 Nov 2010 22:06:26 +0000 (17:06 -0500)]
Return SOUP_STATUS_CAN_RESOLVE_PROXY as appropriate

We weren't converting the status codes to their proxy versions when
proxy address resolution failed.

https://bugzilla.gnome.org/show_bug.cgi?id=632354

13 years agosoup-message-io: fix retry-after-unexpected-connection-close
Dan Winship [Wed, 10 Nov 2010 21:48:56 +0000 (16:48 -0500)]
soup-message-io: fix retry-after-unexpected-connection-close

When sending a request on a previously-used connection, we have to
deal with the possibility of the server deciding to time out the
connection right as we start sending data (which sounds like a crazy
race condition, but is in fact pretty much standard behavior). This
got broken in the connection/session reorg earlier in the year. Fix
it.

Also, add a test to misc-test for this.

Based on patch from Sergio Villar.

https://bugzilla.gnome.org/show_bug.cgi?id=631525

13 years agosoup-message-io: deal with stupid servers that do chunked encoding wrong
Dan Winship [Tue, 9 Nov 2010 18:22:25 +0000 (13:22 -0500)]
soup-message-io: deal with stupid servers that do chunked encoding wrong

Some servers fail to send the final 0-length chunk when allegedly doing
chunked encoding. Browsers cope. Now we do too.

https://bugzilla.gnome.org/show_bug.cgi?id=629160

13 years agotimeout-test: add SOUP_SESSION_IDLE_TIMEOUT tests as well
Dan Winship [Tue, 9 Nov 2010 17:58:31 +0000 (12:58 -0500)]
timeout-test: add SOUP_SESSION_IDLE_TIMEOUT tests as well