7 years agoSoup-2.4.gir: filter out SoupProxyResolver
Dan Winship [Sun, 31 Jul 2011 18:01:31 +0000 (14:01 -0400)]
Soup-2.4.gir: filter out SoupProxyResolver

SoupProxyResolver has been deprecated (in favor of
SoupProxyURIResolver) since before Soup-2.4.gir was available, and it
would need annotations to work correctly anyway, so just remove it

7 years agoAdd/update some "Since" flags
Dan Winship [Sun, 31 Jul 2011 17:55:57 +0000 (13:55 -0400)]
Add/update some "Since" flags

7 years agosoup-request-http: fix usage with non-default-context
Dan Winship [Sun, 31 Jul 2011 15:28:35 +0000 (11:28 -0400)]
soup-request-http: fix usage with non-default-context

SoupHTTPInputStream was doing I/O in a thread if the session didn't
use the global default context. But really, it should have been
checking the thread-default context instead. And anyway, the threaded
version doesn't actually work, it turns out. So, fix the check, make
it into a g_return_if_fail(), and remove the threaded codepath.

Also, fix a handful of places that were adding sources to the global
default context rather than the thread-default/SoupSession context.

Add tests/requester-test to do some basic
SoupRequester/SoupRequestHTTP/SoupHTTPInputStream testing.

7 years agoDoh, fix the CVE number: should have been CVE-2011-2524
Dan Winship [Thu, 28 Jul 2011 21:12:36 +0000 (17:12 -0400)]
Doh, fix the CVE number: should have been CVE-2011-2524

7 years ago2.35.4
Dan Winship [Thu, 28 Jul 2011 13:01:52 +0000 (09:01 -0400)]

7 years agoSoupServer: fix to not allow smuggling ".." into path
Dan Winship [Wed, 29 Jun 2011 14:04:06 +0000 (10:04 -0400)]
SoupServer: fix to not allow smuggling ".." into path

When SoupServer:raw-paths was set (the default), it was possible to
sneak ".." segments into the path passed to the SoupServerHandler,
which could then end up tricking some handlers into retrieving
arbitrary files from the filesystem. Fix that.

7 years agosoup-session.c: mark helper property API as (skip) to not collide with bindings
Jasper St. Pierre [Thu, 21 Jul 2011 19:13:44 +0000 (15:13 -0400)]
soup-session.c: mark helper property API as (skip) to not collide with bindings

gobject-introspection-bindable interpreters like pygobject and gjs replace "-"s
in property names with "_"s. Given that the property API intentionally uses the
same names as their real methods, this causes a collision. Since the properties
were never intended to be bindable, just mark them as (skip).

7 years agosoup-cache.c: use hashes for entry keys. Added entry key collision handling.
Sergio Villar Senin [Mon, 4 Jul 2011 08:30:57 +0000 (10:30 +0200)]
soup-cache.c: use hashes for entry keys. Added entry key collision handling.

It's faster to use uint32 keys for the SoupCacheEntries instead of the full
URI as string. This patch also adds collision handling support.

7 years agosoup-cache: plug memory leak
Xan Lopez [Wed, 29 Jun 2011 19:25:27 +0000 (21:25 +0200)]
soup-cache: plug memory leak

7 years ago2.35.3
Dan Winship [Tue, 5 Jul 2011 01:46:30 +0000 (21:46 -0400)]

7 years agoRevert "soup-message-io: clear connection from queue items when IDLE status is set"
Dan Winship [Tue, 5 Jul 2011 01:36:47 +0000 (21:36 -0400)]
Revert "soup-message-io: clear connection from queue items when IDLE status is set"

This broke tests/proxy-test.

This reverts commit c56c66aa2625bc95f54f8a1972e13503f454a51a.

7 years agosoup-message-io.c: Fix integer overflow on 32bit
Jens Georg [Sat, 25 Jun 2011 10:54:44 +0000 (12:54 +0200)]
soup-message-io.c: Fix integer overflow on 32bit

Fixes a bug serving large files, eg, in Rygel.

7 years agosoup-cache: fix a use after free
Sergio Villar Senin [Mon, 13 Jun 2011 16:52:35 +0000 (18:52 +0200)]
soup-cache: fix a use after free

Store a list of SoupBuffers to write data to cache instead of using
a GString. The reason is that g_string_append might reallocate the str
pointer, which is not guaranteed to keep pointing to the same area, and
which would cause the original area that was pointed to to be freed, leading
to the buffer passed to write() to be invalid.

7 years agosoup-cache.c: Replaced the type of some SoupCacheEntry fields.
Sergio Villar Senin [Fri, 24 Jun 2011 16:00:10 +0000 (18:00 +0200)]
soup-cache.c: Replaced the type of some SoupCacheEntry fields.

GVariant format string specifies not only the type but the size of the
numeric values it stores. We were using "u" to store the values of time_t
variables that are not guaranteed to be 32 bit. We were also reading values
stored with "u" using unitialized time_t variables.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

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

7 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

7 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.

7 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.

7 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

7 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.

7 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.

7 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"

7 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.

7 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

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

7 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.

7 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

7 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.

7 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.

7 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

7 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.

7 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

7 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

7 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.

7 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

7 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

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

7 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

7 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

7 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 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.)

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

7 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.

7 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

7 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.

7 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.)

7 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.

7 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()

7 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.


7 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

7 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

Based on a patch from Mark Starovoytov

7 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

domain-match the cookie if the first_party URI has no domain.

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

7 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.


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

7 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.

7 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.

7 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.

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

7 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.

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

7 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.

7 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

7 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.

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

7 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.

7 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.

7 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.

7 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.

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

7 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).

7 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.

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

7 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)

7 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.

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

7 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.

7 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.

7 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)

7 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.

7 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

7 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...

7 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

7 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

7 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.

7 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"

7 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.

7 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

7 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.

7 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

7 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

7 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

7 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.

7 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.

7 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