platform/upstream/libsoup.git
12 years agobump version to 2.37.2.1 for the request API changes
Dan Winship [Fri, 2 Dec 2011 09:21:44 +0000 (10:21 +0100)]
bump version to 2.37.2.1 for the request API changes

12 years agoSoupRequestHTTP: don't complete send() until after sniffing
Dan Winship [Sat, 22 Oct 2011 21:59:07 +0000 (17:59 -0400)]
SoupRequestHTTP: don't complete send() until after sniffing

If the session has a SoupContentSniffer (and it's not disabled for
this message), wait until content-sniffed is emitted before completing
send()/send_async(). Remove the faked content-sniffed emissions from
the cache codepaths, since they should no longer be needed.

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

12 years agoSoupHTTPInputStream: change handling of error responses
Dan Winship [Sun, 23 Oct 2011 17:51:13 +0000 (13:51 -0400)]
SoupHTTPInputStream: change handling of error responses

Old behavior:

  - If the (initial) response status code is 3xx/401/407, and the
    message is successfully restarted, then just throw away the
    initial response.

  - If the (final) response status code is 2xx, then stream the body.

  - Otherwise, return a GError from soup_http_input_stream_send*(),
    and don't stream the body.

This worked OK for gvfs, which never cared about the bodies of 4xx
responses, but was problematic for WebKitGTK, which ended up needing
three separate (but interwoven) codepaths to handle all the cases.
(And still ended up handling 407 wrong.)

New behavior:

  - If the (initial) response status code is 3xx/401/407, and the
    message is successfully restarted, then just throw away the
    initial response.

  - The body of the (final) response is always streamed to the caller.

  - A GError is only returned on transport errors, not on 4xx/5xx
    responses

(This is an API break, but SoupHTTPInputStream is not API-stable.)

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

12 years agosoup-session: fix some http-aliases/https-aliases problems
Dan Winship [Wed, 30 Nov 2011 12:34:43 +0000 (13:34 +0100)]
soup-session: fix some http-aliases/https-aliases problems

and add a test to misc-test

12 years agomisc-test: fix a bug
Dan Winship [Wed, 30 Nov 2011 17:30:26 +0000 (18:30 +0100)]
misc-test: fix a bug

misc-test would crash if it ran long enough (due to either stopping in
gdb or just adding enough new tests to the end) because of a bug in the
max_conns_test cleanup code.

12 years agoRequire glib 2.31 and update to new thread APIs
Dan Winship [Wed, 30 Nov 2011 20:59:55 +0000 (21:59 +0100)]
Require glib 2.31 and update to new thread APIs

12 years agoSoupMessage: fix setting of SOUP_MESSAGE_CERTIFICATE_TRUSTED flag
Dan Winship [Wed, 30 Nov 2011 11:31:21 +0000 (12:31 +0100)]
SoupMessage: fix setting of SOUP_MESSAGE_CERTIFICATE_TRUSTED flag

It was accidentally getting cleared at the wrong time (although the
tls-certificate and tls-errors properties were still correct).

Also add a test for this case.

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

12 years ago2.37.2 LIBSOUP_2_37_2
Dan Winship [Mon, 21 Nov 2011 23:38:30 +0000 (18:38 -0500)]
2.37.2

12 years agoFix distcheck
Dan Winship [Mon, 21 Nov 2011 23:38:25 +0000 (18:38 -0500)]
Fix distcheck

12 years agocoding-test.c: refactored and added deflate support.
Sergio Villar Senin [Fri, 21 Oct 2011 10:30:08 +0000 (12:30 +0200)]
coding-test.c: refactored and added deflate support.

Refactored the original code. A couple of utility functions perform now all
the checks.

Content compressed with deflate algorithm (with or without zlib headers) is
also supported and checked.

12 years agoAdding zlib and raw encoded versions of mbox file for the coding-test
Sergio Villar Senin [Fri, 21 Oct 2011 15:57:46 +0000 (17:57 +0200)]
Adding zlib and raw encoded versions of mbox file for the coding-test

12 years agoSoupContentDecoder: add support for deflate Content-Encoding
Sergio Villar Senin [Thu, 13 Oct 2011 16:37:24 +0000 (18:37 +0200)]
SoupContentDecoder: add support for deflate Content-Encoding

Claim that we support both gzip and deflate content encodings. Added support
to handle data compressed with deflate with and without zlib headers.

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

12 years agoSoupAuthManagerNTLM: allow non-ASCII usernames/passwords
Dan Winship [Thu, 20 Oct 2011 21:27:34 +0000 (17:27 -0400)]
SoupAuthManagerNTLM: allow non-ASCII usernames/passwords

Switch to using the Unicode-encoded form of NTLM, so that non-ASCII
usernames/passwords will work.

Also, add a "-n" option to tests/get to make it use NTLM, and make
SoupAuthManagerNTLM allow passwords-in-URLs.

Based on a patch from Joachim Breitner, sponsored by ITOMIG GmbH and
the City of Böblingen.

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

12 years agoSoupAuthBasic: allow (some) non-ASCII usernames/passwords
Dan Winship [Thu, 20 Oct 2011 21:27:34 +0000 (17:27 -0400)]
SoupAuthBasic: allow (some) non-ASCII usernames/passwords

Convert the (assumed-UTF-8) username and password into ISO-8859-1
before encoding. This is what a few other browsers do.

Based on a patch from Joachim Breitner, sponsored by ITOMIG GmbH and
the City of Böblingen.

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

12 years agoauth-test: add a test for server-closes-connection-during-auth
Dan Winship [Wed, 5 Oct 2011 20:09:44 +0000 (16:09 -0400)]
auth-test: add a test for server-closes-connection-during-auth

12 years agoauth-test: reorganize this a bit to be more like other test programs
Dan Winship [Wed, 5 Oct 2011 17:57:33 +0000 (13:57 -0400)]
auth-test: reorganize this a bit to be more like other test programs

12 years agoFix handling of connections that time out while IN_USE
Dan Winship [Sun, 13 Nov 2011 20:02:34 +0000 (15:02 -0500)]
Fix handling of connections that time out while IN_USE

To avoid looping, we only resend a request on
unexpected-connection-close if it was sent on a connection that has
previously been succesfully used. But we were only setting the
"successfully" used flag after a message *completed*, so if a message
just got restarted, and the connection got closed before the second
sending, then the connection was seen as having never been used, and
so the message wouldn't get re-sent.

Fix this by marking the connection as having been used if a message it
is sending gets restarted.

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

12 years agocontext-test: fix cleanup code to avoid a crash
Dan Winship [Sat, 12 Nov 2011 14:31:10 +0000 (09:31 -0500)]
context-test: fix cleanup code to avoid a crash

12 years agosoup-uri: %-encode non-ASCII characters when parsing URIs
Dan Winship [Sat, 12 Nov 2011 14:27:33 +0000 (09:27 -0500)]
soup-uri: %-encode non-ASCII characters when parsing URIs

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

12 years agoAdd SoupSession:use-thread-context
Dan Winship [Mon, 3 Oct 2011 18:58:06 +0000 (14:58 -0400)]
Add SoupSession:use-thread-context

Add a SoupSession flag telling it to use
g_main_context_get_thread_default() on a per-message basis, rather
than using a single GMainContext for everything. In the simple case,
this is just more glib-like API. In the more complicated case, it
allows synchronously sending one or more messages on a
SoupSessionAsync without running the main GMainLoop.

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

12 years agoSoupSession: add some API for handling redirections
Dan Winship [Thu, 13 Mar 2008 01:39:14 +0000 (21:39 -0400)]
SoupSession: add some API for handling redirections

12 years agoSoupSession: Add http-aliases and https-aliases properties
Dan Winship [Sun, 26 Jul 2009 14:43:14 +0000 (10:43 -0400)]
SoupSession: Add http-aliases and https-aliases properties

Currently SoupSession treats all URI schemes except "https" as aliases
for "http", and some apps depend on this. (Eg, iTunes sometimes
returns redirects involving "daap" URIs, which Rhythmbox needs to
treat as "http".) Unfortunately, this also means that it mishandles
redirects to, eg, ftp.

The http-aliases and https-aliases properties allow an app to
explicitly indicate which URI schemes should be considered aliases for
http and https, with other schemes considered to be unknown and
unhandled.

12 years agoSoupHTTPInputStream: fix a g_warning in error cases
Dan Winship [Mon, 31 Oct 2011 22:34:21 +0000 (18:34 -0400)]
SoupHTTPInputStream: fix a g_warning in error cases

12 years agosoup-http-input-stream: unpause the SoupMessage before cancelling it.
Sergio Villar Senin [Thu, 27 Oct 2011 13:00:31 +0000 (15:00 +0200)]
soup-http-input-stream: unpause the SoupMessage before cancelling it.

If we try to close a SoupHttpInputStream before the SoupMessage is finished
and the SoupMessage is in paused state, it will remain paused forever.
Unpause the SoupMessage before actually cancelling it.

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

12 years agosoup-directory-input-stream: return a titleless html
Sergio Villar Senin [Thu, 27 Oct 2011 15:22:39 +0000 (17:22 +0200)]
soup-directory-input-stream: return a titleless html

Do not set the title of the HTML document returned by
SoupDirectoryInputStream. Also added the file size and the last modified
date to the output.

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

12 years agoremove unnecessary libgthread references
Dan Winship [Wed, 26 Oct 2011 23:30:00 +0000 (19:30 -0400)]
remove unnecessary libgthread references

12 years ago2.37.1 LIBSOUP_2_37_1
Dan Winship [Tue, 25 Oct 2011 13:18:24 +0000 (09:18 -0400)]
2.37.1

12 years agoSoupRequestHTTP: reorganize the async code a bit
Dan Winship [Sun, 23 Oct 2011 13:17:59 +0000 (09:17 -0400)]
SoupRequestHTTP: reorganize the async code a bit

Use the same "helper" data structure for all three cases (load from
SoupHTTPInputStream, load from cache immediately, and load from cache
after validating).

12 years agoSoupRequest*, SoupHTTPInputStream: misc cleanups
Dan Winship [Sat, 22 Oct 2011 19:20:07 +0000 (15:20 -0400)]
SoupRequest*, SoupHTTPInputStream: misc cleanups

12 years agoSoupHTTPInputStream: remove GSeekable support
Dan Winship [Sat, 22 Oct 2011 19:17:57 +0000 (15:17 -0400)]
SoupHTTPInputStream: remove GSeekable support

This was needed in gvfs (where this code originally came from), but
not here.

12 years agoSoupRequestHTTP: don't cast GFileInputStreams to SoupHTTPInputStream
Dan Winship [Sat, 22 Oct 2011 14:54:29 +0000 (10:54 -0400)]
SoupRequestHTTP: don't cast GFileInputStreams to SoupHTTPInputStream

The return value of soup_cache_send_request() is not a
SoupHTTPInputStream, so don't cast it to that, because it's confusing.

12 years agoconfigure: turn some warnings into errors
Dan Winship [Fri, 21 Oct 2011 19:18:14 +0000 (15:18 -0400)]
configure: turn some warnings into errors

Use -Werror=... to turn warnings into errors for warnings that occur
in completely well-defined situations (ie, won't change with gcc
versions or optimization levels) and that couldn't be triggered by
foreign #include files.

12 years agoRemove -DG_DISABLE_DEPRECATED
Dan Winship [Fri, 21 Oct 2011 15:26:15 +0000 (11:26 -0400)]
Remove -DG_DISABLE_DEPRECATED

This causes prototypes like g_mutex_new() to disappear, causing the
prototype to be assumed incorrectly, causing crashes.

For now I still want to be able to build against either glib-2-30 or
glib master, so just remove the -DG_DISABLE_DEPRECATED.

12 years agooops, I apparently didn't run "make check" after the tls changes...
Dan Winship [Thu, 20 Oct 2011 21:56:12 +0000 (17:56 -0400)]
oops, I apparently didn't run "make check" after the tls changes...

12 years agotests: make "./tests/foo" work from the toplevel dir
Dan Winship [Thu, 20 Oct 2011 21:12:25 +0000 (17:12 -0400)]
tests: make "./tests/foo" work from the toplevel dir

12 years agoFix SoupMessage https status information to be set more reliably
Dan Winship [Thu, 20 Oct 2011 21:05:05 +0000 (17:05 -0400)]
Fix SoupMessage https status information to be set more reliably

In particular, make sure it gets set when a connection fails, so that
soup_message_get_https_status() on the message will tell you *why* it
failed.

Also, update tests/get to display the tls-certificate-errors

12 years agoSoupSession: fix some SSL problems
Dan Winship [Thu, 20 Oct 2011 21:00:35 +0000 (17:00 -0400)]
SoupSession: fix some SSL problems

Setting SSL_CA_FILE to NULL should not cause warnings. Also, fix SSL
strictness: it should only be TRUE when we have a tlsdb.

12 years agosoup-http-input-stream: use a list of SoupBuffers instead a custom buffer
Sergio Villar Senin [Fri, 16 Sep 2011 14:55:10 +0000 (16:55 +0200)]
soup-http-input-stream: use a list of SoupBuffers instead a custom buffer

We store now a list of SoupBuffers pending to be read. That would save us
several realloc() and memcpy() if the client does not read from the stream
quickly enough.

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

12 years agoAdd SoupServer:tls-certificate to go with SoupSession:tlsdb
Dan Winship [Fri, 30 Sep 2011 00:41:38 +0000 (20:41 -0400)]
Add SoupServer:tls-certificate to go with SoupSession:tlsdb

12 years agolibsoup.supp: belatedly commit some fixes
Dan Winship [Mon, 26 Sep 2011 23:23:50 +0000 (19:23 -0400)]
libsoup.supp: belatedly commit some fixes

12 years agoUse GTlsDatabase, add new SoupSession properties for it
Dan Winship [Tue, 13 Sep 2011 00:33:39 +0000 (20:33 -0400)]
Use GTlsDatabase, add new SoupSession properties for it

Now that we have GTlsFileDatabase, we can use that to validate
certificates when the caller sets SoupSession:ssl-ca-file, rather than
doing it the slow hacky way we had been.

Also, add two new properties, SoupSession:tlsdb, to set an arbitrary
GTlsDatabase on the session, and SoupSession:use-system-ca-file, to
tell it to use the default GTlsDatabase.

12 years agoredirect-test: add a test for accidental connection sharing
Dan Winship [Thu, 29 Sep 2011 14:05:59 +0000 (10:05 -0400)]
redirect-test: add a test for accidental connection sharing

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

12 years agoSoupSession: set the connection to IDLE on unqueuing SoupMessages
Sergio Villar Senin [Mon, 26 Sep 2011 17:09:31 +0000 (19:09 +0200)]
SoupSession: set the connection to IDLE on unqueuing SoupMessages

Connection should be set to IDLE state only after being 100% sure that is
not going to be reused by the current owner.

Also, fix a bug in SoupSessionSync revealed by this change.

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

12 years agoSoupSession: make pause/unpause work in any state
Dan Winship [Sun, 7 Aug 2011 22:50:14 +0000 (18:50 -0400)]
SoupSession: make pause/unpause work in any state

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

12 years agoUpdate for GStaticMutex deprecation in glib master
Dan Winship [Thu, 29 Sep 2011 13:50:21 +0000 (09:50 -0400)]
Update for GStaticMutex deprecation in glib master

Instead of using GStaticMutex directly, use the G_LOCK macros, which
use GStaticMutex on older glibs and GMutex on newer glibs.

12 years agopost-branch version bump to 2.37.0
Dan Winship [Mon, 26 Sep 2011 22:18:24 +0000 (18:18 -0400)]
post-branch version bump to 2.37.0

12 years ago2.36.0 LIBSOUP_2_36_0
Dan Winship [Mon, 26 Sep 2011 22:06:10 +0000 (18:06 -0400)]
2.36.0

12 years agoLots of gtk-doc fixes (no code changes)
Dan Winship [Thu, 22 Sep 2011 18:17:47 +0000 (14:17 -0400)]
Lots of gtk-doc fixes (no code changes)

12 years ago2.35.92 LIBSOUP_2_35_92
Dan Winship [Mon, 19 Sep 2011 22:03:56 +0000 (18:03 -0400)]
2.35.92

12 years agotests/ssl-test: belatedly commit this
Dan Winship [Mon, 19 Sep 2011 22:03:33 +0000 (18:03 -0400)]
tests/ssl-test: belatedly commit this

12 years agoSoupSession: forget about SoupHosts if not used
Sergio Villar Senin [Fri, 26 Aug 2011 17:03:30 +0000 (19:03 +0200)]
SoupSession: forget about SoupHosts if not used

Free SoupHosts with 0 connections after some time. Host IP addresses will
this way be re-resolved, protecting clients against server IP changes.

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

12 years agotests/ssl-test: add a test of https-related functionality
Dan Winship [Mon, 19 Sep 2011 19:36:09 +0000 (15:36 -0400)]
tests/ssl-test: add a test of https-related functionality

12 years agotests: update the test ssl key
Dan Winship [Mon, 19 Sep 2011 19:34:13 +0000 (15:34 -0400)]
tests: update the test ssl key

Update the test ssl key to specify "CN=127.0.0.1", so we don't get
G_TLS_CERTIFICATE_BAD_IDENTITY from it

12 years agosoup-socket: fix tls-errors property
Dan Winship [Mon, 19 Sep 2011 19:06:20 +0000 (15:06 -0400)]
soup-socket: fix tls-errors property

We were mistakenly leaving G_TLS_CERTIFICATE_UNKNOWN_CA set after
validating the certificate against the ssl_creds's CA list.

12 years agosoup-message-io: fix setting of SoupMessage TLS properties
Dan Winship [Mon, 19 Sep 2011 18:56:20 +0000 (14:56 -0400)]
soup-message-io: fix setting of SoupMessage TLS properties

Now that the TLS handshake occurs during connection, the socket
properties are set before we get to soup-message-io (and never
change), so copy them to the message right away rather than waiting
for a property notification.

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

12 years agotests: fix a few leaks, update valgrind suppressions file
Dan Winship [Sat, 17 Sep 2011 16:21:36 +0000 (12:21 -0400)]
tests: fix a few leaks, update valgrind suppressions file

12 years agosoup-http-input-stream: read data from leftover buffers in finished messages
Sergio Villar Senin [Fri, 16 Sep 2011 15:08:08 +0000 (17:08 +0200)]
soup-http-input-stream: read data from leftover buffers in finished messages

soup_http_input_stream_read(_async) allow clients to read pending data in
leftover buffers even if the SoupMessage used by the stream is finished.

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

12 years agoFix documentation to use the appropriate term for flags
Gustavo Noronha Silva [Tue, 13 Sep 2011 16:44:43 +0000 (13:44 -0300)]
Fix documentation to use the appropriate term for flags

Although checking for the existence of flags yields a boolean value,
flags can't be true, they are either set or not set.

12 years ago2.35.90 LIBSOUP_2_35_90
Dan Winship [Tue, 30 Aug 2011 16:56:12 +0000 (12:56 -0400)]
2.35.90

12 years agoDon't use the reserved keyword 'interface'
Erik van Pienbroek [Fri, 12 Aug 2011 13:58:51 +0000 (15:58 +0200)]
Don't use the reserved keyword 'interface'

On Win32 environments, the keyword 'interface' is a reserved keyword. Up
until now a hack was applied in soup-portability.h to '#undef interface'
so that various pieces of libsoup could use that keyword. However, due
to a recent change in the mingw-w64 toolchain this #undef causes more
breakage while #include'ing other Win32 headers.

As the keyword 'interface' is a reserved keyword on Win32, applications
or libraries shouldn't be messing around with that. This patch changes
various parts of libsoup where the keyword 'interface' is used as name
for variables. These variables have been renamed to 'iface'. Due to this
rename, the #undef hack can be dropped and libsoup can be compiled
cleanly against the latest mingw-w64 toolchain

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

12 years agoAdd SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies
Dan Winship [Thu, 11 Aug 2011 01:50:54 +0000 (21:50 -0400)]
Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies

Long ago, soup_message_body_set_accumulate() was made into a no-op on
request bodies, because otherwise there would be no body available to
send if the request was restarted. Add a SOUP_MESSAGE_CAN_REBUILD
flag, that indicates that the caller takes responsibility for handling
this, and properly discard chunks if that is set.

Also update chunk-test to test this, and (finally!) remove the FIXME
there, since we are now testing the !accumulate codepath again
properly.

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

12 years ago2.35.5
Dan Winship [Tue, 16 Aug 2011 01:05:11 +0000 (21:05 -0400)]
2.35.5

12 years agoFix distcheck
Dan Winship [Tue, 16 Aug 2011 01:17:54 +0000 (21:17 -0400)]
Fix distcheck

12 years agoSoupContentSniffer: don't use gio anymore
arno [Tue, 3 May 2011 05:46:07 +0000 (07:46 +0200)]
SoupContentSniffer: don't use gio anymore

This brings the content sniffing algorithm closer to the HTML5
specification.

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

12 years agoCall soup_message_clean_response() when restarting a message
Dan Winship [Mon, 8 Aug 2011 21:48:13 +0000 (17:48 -0400)]
Call soup_message_clean_response() when restarting a message

When a message got restarted, we were leaving the previous response
state in the message, which is bad for various reasons.

In particular, this caused a problem with non-keepalive redirections
of https URLs through proxies (!), because after the second CONNECT
succeeded, it would see that the message already had a status_code
set, and so it thought the message had been cancelled or something
while it was processing the CONNECT. proxy-test now has a regression
test for this case.

Based on patches and analysis from DongJae Kim and Thierry Reding.

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

12 years agoDefault to TLS for https connections, and fall back to SSLv3 on failure
Dan Winship [Sun, 7 Aug 2011 17:02:51 +0000 (13:02 -0400)]
Default to TLS for https connections, and fall back to SSLv3 on failure

Rather than always using SSLv3, try proper TLS+extensions first, and
fall back to SSLv3-without-extensions if that gives an error that
looks like it might mean "broken SSLv3-only server". Use
SoupSessionHost to record the fallback status for a host.

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

12 years agoSoupConnection: do TLS handshake at connection time
Dan Winship [Sun, 7 Aug 2011 16:10:45 +0000 (12:10 -0400)]
SoupConnection: do TLS handshake at connection time

Previously, when connecting to an https site, the TLS handshake didn't
happen until we started writing the request. Change it so that it now
happens as part of SoupConnection connecting.

12 years agoSoup-2.4.gir: add missing introspection data from Vala bindings
Evan Nemerson [Wed, 3 Aug 2011 23:27:30 +0000 (16:27 -0700)]
Soup-2.4.gir: add missing introspection data from Vala bindings

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

12 years agoSupport NTLM Single Sign On
Mandy Wu [Tue, 2 Aug 2011 13:31:10 +0000 (21:31 +0800)]
Support NTLM Single Sign On

Support NTLM Single Sign On by using Samba's 'winbind' daemon
helper /usr/bin/ntlm_auth

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

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

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

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

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

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

12 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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