platform/upstream/libsoup.git
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

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 years agoFix parsing/generation of URI queries that aren't HTML forms
Dan Winship [Tue, 9 Nov 2010 17:23:10 +0000 (12:23 -0500)]
Fix parsing/generation of URI queries that aren't HTML forms

soup_form_decode() used to accept strings that weren't "name=value"
pairs, but soup_form_encode_hash() would crash if you passed the
resulting GHashTable to it. Fix both sides: now soup_form_decode()
ignores non-"name=value" elements, and soup_form_encode_hash()
g_return_if_fail()s rather than crashing.

Also fix use of deprecated soup-form.h method names in soup-uri.c and
soup-server.c

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

14 years agoSoupURI: never return NULL from soup_uri_decode/soup_uri_normalize
Dan Winship [Fri, 24 Sep 2010 18:07:59 +0000 (14:07 -0400)]
SoupURI: never return NULL from soup_uri_decode/soup_uri_normalize

Normally you just want to DTRT, and soup_uri_new() already behaved this
way anyway.

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

14 years agoSoupContentDecoder: fix an unlikely leak
Dan Winship [Tue, 9 Nov 2010 14:57:55 +0000 (09:57 -0500)]
SoupContentDecoder: fix an unlikely leak

In particular, this can happen if you accidentally install two content
decoders on the same session. Pointed out a long time ago in email by
Christophe Gillette.

14 years agoRemove old experimental python bindings
Dan Winship [Thu, 28 Oct 2010 14:42:12 +0000 (10:42 -0400)]
Remove old experimental python bindings

They don't compile any more, and gobject-introspection works now

14 years agoAppease some gcc 4.5 warnings
Dan Winship [Thu, 14 Oct 2010 20:00:05 +0000 (16:00 -0400)]
Appease some gcc 4.5 warnings

14 years agoSoupCookieJarText: fix a bug when deleting a cookie
Dan Winship [Thu, 14 Oct 2010 19:30:45 +0000 (15:30 -0400)]
SoupCookieJarText: fix a bug when deleting a cookie

based on a patch from MichaƂ Kazior

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

14 years ago2.32.0 LIBSOUP_2_32_0
Dan Winship [Tue, 28 Sep 2010 00:34:07 +0000 (20:34 -0400)]
2.32.0

14 years ago2.31.92 LIBSOUP_2_31_92
Dan Winship [Mon, 13 Sep 2010 19:49:06 +0000 (15:49 -0400)]
2.31.92

14 years agoFix a crash when resolving URIs with both spaces and non-UTF8 chars
Dan Winship [Mon, 13 Sep 2010 14:31:02 +0000 (10:31 -0400)]
Fix a crash when resolving URIs with both spaces and non-UTF8 chars

When using "%.*s" in a UTF-8 locale, in at least some cases, glibc
requires that the string not end in something that looks like a
partial UTF-8 character. This seems wrong according to the c99 spec to
me, but regardless, we need to work around it.

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

14 years agoFix introspection scanning: don't scan uninstalled .h files
Dan Winship [Thu, 2 Sep 2010 02:28:56 +0000 (22:28 -0400)]
Fix introspection scanning: don't scan uninstalled .h files

14 years agoFixes and additions for new introspection scanner
Dan Winship [Thu, 2 Sep 2010 02:02:04 +0000 (22:02 -0400)]
Fixes and additions for new introspection scanner

14 years agoRemove use of --warn-all with g-ir-scanner
Dan Winship [Mon, 13 Sep 2010 19:36:31 +0000 (15:36 -0400)]
Remove use of --warn-all with g-ir-scanner

Since it's not possible to fix some of the warnings yet

14 years agointrospection: Replace usage of --strip-prefix
Colin Walters [Thu, 9 Sep 2010 13:33:07 +0000 (09:33 -0400)]
introspection: Replace usage of --strip-prefix

Update to use --identifier-prefix.  Also add --warn-all.

Bump required introspection version.

14 years agoDo not uppercase percent-encoded triplets when normalizing URIs
Sergio Villar Senin [Fri, 3 Sep 2010 19:07:30 +0000 (21:07 +0200)]
Do not uppercase percent-encoded triplets when normalizing URIs

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

14 years agoadd a few missing introspection annotations
Dan Winship [Sun, 22 Nov 2009 21:10:48 +0000 (16:10 -0500)]
add a few missing introspection annotations

14 years ago2.31.90 LIBSOUP_2_31_90
Dan Winship [Tue, 17 Aug 2010 12:28:33 +0000 (08:28 -0400)]
2.31.90

14 years agoTry all IP addrs associated with a hostname if the first fails
Dan Winship [Sun, 15 Nov 2009 17:05:16 +0000 (12:05 -0500)]
Try all IP addrs associated with a hostname if the first fails

Make SoupAddress keep track of multiple IP addresses and implement
GSocketConnectable, and make SoupSocket use GSocketClient (and thus
GSocketAddressEnumerator) to connect, so that it tries all addresses
associated with the SoupAddress.

In particular, this fixes the bug where if a host has both IPv4 and
IPv6 addresses, and glibc thinks you have IPv6 connectivity, but you
don't really, that libsoup can't connect to that host.

(Using GSocketClient rather than using GSocketAddressEnumerator
directly is a bit heavyweight for SoupSocket, since we don't actually
want to have a GSocket or GSocketConnection. But eventually, we will
be porting SoupSocket to use GSocket, and this code is a stepping
stone to that. Also, letting GSocketClient do the looping over the
addresses simplifies SoupSocket.)

(This change also silently breaks connection timeouts unless you have
the very latest git glib.)

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

14 years agoFix auto-Accept-Language in locales that use "," for decimals
Dan Winship [Wed, 11 Aug 2010 15:54:05 +0000 (11:54 -0400)]
Fix auto-Accept-Language in locales that use "," for decimals

noticed in related epiphany code in bug 602547

14 years ago2.31.6 LIBSOUP_2_31_6
Dan Winship [Mon, 2 Aug 2010 21:38:15 +0000 (17:38 -0400)]
2.31.6

14 years agosoup-message-io: fix wrong-Content-Length logic
Dan Winship [Sat, 31 Jul 2010 08:32:51 +0000 (10:32 +0200)]
soup-message-io: fix wrong-Content-Length logic

Previously we just ignored Content-Length if the server specified
"Connection: close", which does the right thing if the specified
Content-Length is too large, but fails if the Content-Length is
correct but the server "forgets" to close the connection. Fix this so
that we always stop reading once we get to the expected
Content-Length, but we also cope with the connection closing before
that point.

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

14 years agoDo not dist gir_DATA
Yaakov Selkowitz [Wed, 16 Jun 2010 04:10:13 +0000 (23:10 -0500)]
Do not dist gir_DATA

GIR files contain a shared-library attribute which varies per platform,
and therefore must not be disted; see bug 621611 for rationale.

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

14 years agoPut the hostname into the reason_phrase with network errors
Dan Winship [Fri, 30 Jul 2010 12:50:36 +0000 (14:50 +0200)]
Put the hostname into the reason_phrase with network errors

eg, "Cannot resolve hostname (sadfasdfasdfasdf.com)"

This can be useful for debugging.

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

14 years agoSoupProxyResolverStatic: port to newer SoupProxyURIResolver API
Dan Winship [Fri, 30 Jul 2010 14:28:30 +0000 (16:28 +0200)]
SoupProxyResolverStatic: port to newer SoupProxyURIResolver API

14 years agoSoupSessionAsync: don't stall on proxy resolution error
Dan Winship [Fri, 30 Jul 2010 12:56:00 +0000 (14:56 +0200)]
SoupSessionAsync: don't stall on proxy resolution error

14 years agoSoupSessionAsync: make soup_session_cancel_message behave stupidly again
Dan Winship [Wed, 28 Jul 2010 12:51:06 +0000 (14:51 +0200)]
SoupSessionAsync: make soup_session_cancel_message behave stupidly again

The session rewrites changed cancellation in async sessions to happen
asynchronously. This makes more sense than the old behavior, but can
cause problems with code that previously assumed it could
cancel-and-forget (and it wasn't actually an intentional change
anyway). So revert that.

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

14 years agoDisable TLS 1.2 in addition to 1.0 and 1.1
Dan Winship [Tue, 29 Jun 2010 13:43:20 +0000 (09:43 -0400)]
Disable TLS 1.2 in addition to 1.0 and 1.1

Due to bug 581342 we want to only negotiate SSL 3.0. Previously we
were telling gnutls to not do TLS1.0 or TLS1.1, but that means with
newer versions of gnutls that support TLS1.2 it would try to negotiate
that instead and generally fail. Fix that by disabling TLS1.2 too
(which works fine even with gnutls versions that don't support TLS1.2
yet).

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

14 years agoFix redirects-to-different-hosts to not reuse the same connection
Dan Winship [Sat, 12 Jun 2010 00:26:23 +0000 (20:26 -0400)]
Fix redirects-to-different-hosts to not reuse the same connection

We were mistakenly reusing the same SoupConnection for a queue item
even if the message got redirected to a different host. Fix that. The
particular fix here (always force it to re-run
soup_session_get_connection() after a redirect) is a bit
over-aggressive, but this will get rewritten when we eventually fix
connection pooling in the proxy case.

Also, add a test to tests/redirect-test for this.

14 years agoAllow calling soup_test_server_new() multiple times in test programs
Dan Winship [Fri, 11 Jun 2010 19:26:53 +0000 (15:26 -0400)]
Allow calling soup_test_server_new() multiple times in test programs

14 years agosoup_date_new_from_string: fix an out-of-bounds memory access
Dan Winship [Thu, 10 Jun 2010 00:06:51 +0000 (20:06 -0400)]
soup_date_new_from_string: fix an out-of-bounds memory access

soup_date_new_from_string() would sometimes read off the end of the
string, but tests/date didn't catch this even under valgrind, because
all of the strings were compile-time constants and they got laid out
in a way that never triggered a read of invalid memory. So tweak the
test to g_strdup each string before parsing it, which will let
valgrind notice if we read outside its bounds in the future.

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

14 years agoFix connection states so in-use connections don't get pruned
Dan Winship [Wed, 9 Jun 2010 18:34:50 +0000 (14:34 -0400)]
Fix connection states so in-use connections don't get pruned

Since connections are assigned to messages before they're connected
now, they should go to IN_USE after connecting, not IDLE. Otherwise
the idle-connection-closing code might close connections that existing
queue items were planning to use.

14 years agoSoupSession: tweak cancellation again
Dan Winship [Wed, 9 Jun 2010 17:33:10 +0000 (13:33 -0400)]
SoupSession: tweak cancellation again

After the too-many-redirects merge, redirect-test was leaking a queue
item, because cancelling a message at the point it does resulted in
the completion_cb never running. Fix soup_session_cancel_message()
(again) to not have this problem.

14 years agoFix a signal-handler leak in the too-many-redirects patch
Dan Winship [Wed, 9 Jun 2010 17:27:03 +0000 (13:27 -0400)]
Fix a signal-handler leak in the too-many-redirects patch

14 years agoSoupSession: continue reorg, remove remaining signal-based flow control
Dan Winship [Thu, 3 Jun 2010 19:23:22 +0000 (21:23 +0200)]
SoupSession: continue reorg, remove remaining signal-based flow control

Make the sessions more state-machiney and fix up
soup_session_cancel_message() by having it set the message to the
(new) FINISHING state and letting the session implementation pick it
up from there. Remove the remaining "finished" and "restarted" signal
handlers; move the base session's "finished" handler to
"soup_session_unqueue_item" and call that from the right places in the
subclasses.

14 years agoSoupSession: bind connections to messages sooner, improve conn failure case
Dan Winship [Wed, 2 Jun 2010 10:05:46 +0000 (12:05 +0200)]
SoupSession: bind connections to messages sooner, improve conn failure case

Rather than having connections be independent until a message is
actually sent on them, assign them to queue items when they're created
for them. This means that, eg, if another connection frees up while
we're waiting for the first connection to connect, that we can't take
advantage of that. But it simplifies a ton of other things.

Also, if a new connection fails, don't fail every other message on
that host; let them succeed or fail independently. When doing a
CONNECT though, keep track of the queue item that necessitated it so
we can error that out if the CONNECT fails, just like we would if the
actual soup_connection_connect() had failed.

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

14 years agoAdd SoupMessageQueueItemState, remove SoupMessageIOStatus
Dan Winship [Sat, 29 May 2010 14:37:34 +0000 (16:37 +0200)]
Add SoupMessageQueueItemState, remove SoupMessageIOStatus

SoupMessageIOStatus was always really more about the session than the
message. (SoupServer I/O didn't use it at all.) Replace it with a new
SoupMessageQueueItemState, on the queue item rather than the message.

14 years agosoup-message-io: use SoupMessageQueueItems and add SoupMessageCompletionFn
Dan Winship [Sat, 29 May 2010 13:24:51 +0000 (15:24 +0200)]
soup-message-io: use SoupMessageQueueItems and add SoupMessageCompletionFn

push SoupMessageQueueItem down into soup-message-io, and end the I/O
process by calling a completion callback rather than emitting the
SoupMessage signals directly, which gives the session greater control.

14 years agoMisc SoupConnection API improvements
Dan Winship [Sat, 29 May 2010 13:05:55 +0000 (15:05 +0200)]
Misc SoupConnection API improvements

Use GCancellables in connect_async/connect_sync (plus updates needed
for behavior changes caused by that). Make
soup_connection_disconnect() always emit the signal if the connection
state wasn't already DISCONNECTED, even if it wasn't yet connected
before. Remove some dead code in clear_current_request. Remove some
more-or-less redundant arguments in soup_message_send_request().

14 years agoMake SoupConnection warn if disposed "incorrectly"
Dan Winship [Sat, 29 May 2010 11:43:34 +0000 (13:43 +0200)]
Make SoupConnection warn if disposed "incorrectly"

Connections should always be disconnected and message-less by the time
they are disposed. Likewise, their SoupSockets should be disconnected
and not in the middle of an async connect when they're freed (though
we can't make the sockets warn unconditionally, since other SoupSocket
users external to libsoup may still be doing it "wrong", since that has
historically been a supported part of the API)

Fix some problems revealed by these warnings. Also, remove some weak
refs and replace others by hard refs as needed. Remove unnecessary
SoupSessionAsyncTunnelData type.