Dan Winship [Thu, 1 Mar 2012 16:34:37 +0000 (11:34 -0500)]
soup-session: don't mark CONNECTING connections IDLE on cancel
When finishing up a queue item, SoupSession was always marking its
connection IDLE, even if it had previously been CONNECTING. This
created a race condition where if lots of pending connections were
cancelled at once, some of them might see connections labelled IDLE
that didn't actually have a SoupSocket (before those connections got
asynchronously cleaned up). Fix this by only marking connections IDLE
if they had previously been IN_USE.
https://bugzilla.gnome.org/show_bug.cgi?id=667245
Dan Winship [Tue, 31 Jan 2012 00:15:50 +0000 (19:15 -0500)]
requester-test: add some more tests
Make sure that chunked encoding and failed auth work correctly
Dan Winship [Sat, 25 Feb 2012 13:54:58 +0000 (08:54 -0500)]
SoupURI: fix fallback handling of soup_uri_set_path(uri, NULL)
In the old code, if you set a URI's path to NULL and then did
soup_uri_to_string(uri, FALSE), you'd get back a path of "/". Fix the
new code to behave the same way (and test it).
https://bugzilla.gnome.org/show_bug.cgi?id=670431
Dan Winship [Fri, 24 Feb 2012 19:50:52 +0000 (14:50 -0500)]
SoupAuthManagerNTLM: fix don't-fallback-to-Basic code
Sessions using NTLM should never fall back to using Basic auth to
access a resource which advertises NTLM auth. But ntlm-test wasn't
actually testing this, and it broke at some point. Fix that, and
add tests to ntlm-test.
Dan Winship [Fri, 24 Feb 2012 16:55:45 +0000 (11:55 -0500)]
SoupRequestFile: fix handling of URIs with query components
At the moment, gio mishandles file: URIs with query components,
so strip them out before passing the URI to gio.
Also remove some useless code from an earlier incarnation of
SoupRequestFile.
Priit Laes [Fri, 24 Feb 2012 10:00:20 +0000 (12:00 +0200)]
Makefile.glib: Fix locale-specific issues
When using Estonian (et_EE) locale, 'a-z' range skips 'tuv...'
https://bugzilla.gnome.org/show_bug.cgi?id=654395
Dan Winship [Wed, 22 Feb 2012 18:29:55 +0000 (13:29 -0500)]
soup-message-io: prevent a possible out-of-bounds memory access
Dan Winship [Mon, 20 Feb 2012 23:04:47 +0000 (18:04 -0500)]
2.37.90
Sergio Villar Senin [Fri, 27 Jan 2012 17:56:21 +0000 (18:56 +0100)]
SoupCache: some issues in SoupCache (3/3)
Check that cache control is not blank to prevent some criticals.
https://bugzilla.gnome.org/show_bug.cgi?id=668865
Sergio Villar Senin [Fri, 27 Jan 2012 15:24:56 +0000 (16:24 +0100)]
SoupCache: some issues in SoupCache (2/3)
Do not generate conditional requests to revalidate resources if the server
has not provided neither "Last-Modified" nor "ETag" because the conditional
request could not be properly constructed in that case, and thus, we will
end up issuing two requests for the same resource.
https://bugzilla.gnome.org/show_bug.cgi?id=668865
Sergio Villar Senin [Fri, 27 Jan 2012 13:06:41 +0000 (14:06 +0100)]
SoupCache: some issues in SoupCache (1/3)
Respect section 13.9 from specs. Resources whose URL has a query and do not
have expiration time provided by the server must not be cached.
https://bugzilla.gnome.org/show_bug.cgi?id=668865
Dan Winship [Tue, 14 Feb 2012 03:05:43 +0000 (22:05 -0500)]
SoupSessionAsync: don't queue idles from dispose()
SoupSession does a soup_session_abort() from dispose(), which had the
effect in SoupSessionAsync of queueing an idle (to check if new
messages could be sent now that old connections had been closed). This
causes problems if the session was disposed from a thread other than
the one that its GMainContext is running in, which is weird, and also
incompatible with some garbage-collected runtimes. So fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=667364
Dan Winship [Tue, 14 Feb 2012 02:38:39 +0000 (21:38 -0500)]
soup-message-server-io: fix processing of IPv6 HTTP/1.0 messages
When receiving an HTTP/1.0 message with no Host header on an IPv6
interface, SoupServer would internally generate an invalid URL and
then return 400 Bad Request. Fix, and add a test for it.
https://bugzilla.gnome.org/show_bug.cgi?id=666399
Simon McVittie [Wed, 8 Feb 2012 10:05:02 +0000 (10:05 +0000)]
soup_form_decode_multipart: check that msg really is a non-NULL message
If it wasn't, the next line would segfault anyway.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Wed, 8 Feb 2012 10:03:42 +0000 (10:03 +0000)]
soup_form_decode_multipart: allow file_control_name to be NULL as documented
This was documented as allowed, but would have crashed.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Dan Winship [Sun, 12 Feb 2012 14:21:09 +0000 (09:21 -0500)]
valgrind run...
Dan Winship [Thu, 9 Feb 2012 14:35:00 +0000 (09:35 -0500)]
soup-uri: revert some of the previously-added return-if-fails
Although it has always been documented that a SoupURI must have a
non-NULL path, nothing ever enforced this, and most methods checked
whether it was NULL before looking at it anyway. So lots of existing
code was getting this wrong, and is now breaking because of the
"g_return_if_fail (SOUP_URI_IS_VALID (uri))" checks.
So, change most of those to just g_warn_if_fail() (while adding back
the old return-if-fail !NULL checks), but also fix soup_uri_set_path()
and soup_uri_new_with_base() to handle NULL paths more sanely (after
warning). Also, allow calling the getters on invalid URIs.
Add a new test to uri-testing to make sure that URIs created with
soup_uri_new(NULL) behave as expected at each step of the way...
https://bugzilla.gnome.org/show_bug.cgi?id=667637
Dan Winship [Thu, 9 Feb 2012 22:00:52 +0000 (17:00 -0500)]
soup-uri: fix the scheme parsing to require alpha, not alphanumeric
also remove an ancient comment about running the regression tests,
since it's implied everywhere now.
Dan Winship [Wed, 8 Feb 2012 21:05:34 +0000 (16:05 -0500)]
Makefile.glib: fix for make earlier than 3.82
Dan Winship [Fri, 3 Jun 2011 22:29:59 +0000 (18:29 -0400)]
Use Makefile.glib
Test drive Makefile.glib from bug 654395 (excepted distributed with
the tarball rather than using one installed with glib).
Simon McVittie [Wed, 8 Feb 2012 10:00:58 +0000 (10:00 +0000)]
soup_form_decode_multipart: document all (out) parameters as nullable
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Robert Swain [Tue, 31 Jan 2012 12:58:56 +0000 (13:58 +0100)]
tests: sniffing: Avoid loop with uninitialised length
[This would only happen if a request was made to an unhandled path,
which this test doesn't do, but it seems reasonable to return an empty
response rather than crashing. -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
Robert Swain [Tue, 31 Jan 2012 12:52:37 +0000 (13:52 +0100)]
tests: simple-httpd: Don't leak index_path string
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
Mark Nauwelaerts [Tue, 31 Jan 2012 11:02:45 +0000 (12:02 +0100)]
Safeguard against NULL in strcmp
[In both of these cases, the situation being guarded against is:
check_password() is called, but soup_message_headers_get_one() does not find
an "Authorization" header. -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
Robert Swain [Tue, 31 Jan 2012 13:27:38 +0000 (14:27 +0100)]
form: Check file pointer before dereferencing
[It's not documented as being allowed to be NULL, but later in the
function there's a check, and GLib convention is generally that all
'out' parameters are allowed to be NULL whether it makes sense or not. -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
Dan Winship [Mon, 6 Feb 2012 22:19:26 +0000 (17:19 -0500)]
2.37.5
Simon McVittie [Tue, 10 Jan 2012 13:51:31 +0000 (13:51 +0000)]
soup_uri_new: do not allow invalid URIs to be returned, except via soup_uri_new (NULL)
Also document the possible NULL return.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Simon McVittie [Fri, 3 Feb 2012 14:13:32 +0000 (14:13 +0000)]
SoupURI: add SOUP_URI_IS_VALID() and use it for basic precondition checks
In this patch, field setters don't have precondition checks for the
validity of the URI object itself, only a non-NULL check, to avoid
breaking existing code if it calls soup_uri_new (NULL) and then sets
fields in an unexpected order:
uri = soup_uri_new (NULL); /* uri is invalid */
soup_uri_set_host (uri, "www.google.com");
soup_uri_set_query (uri, "q=badgers");
soup_uri_set_scheme (uri, "http"); /* still invalid... */
soup_uri_set_path (uri, "/search"); /* finally valid */
Also annotate nullable setter parameters as (allow-none), to justify
why they don't have a precondition check.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Simon McVittie [Fri, 3 Feb 2012 17:47:54 +0000 (17:47 +0000)]
soup_uri_copy_host: always set the path to something non-NULL
Not doing so is considered to be invalid.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Simon McVittie [Fri, 3 Feb 2012 17:47:16 +0000 (17:47 +0000)]
SoupProxyResolver: construct a valid SoupURI
path = NULL is not considered valid.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Paweł Forysiuk [Fri, 3 Feb 2012 15:50:44 +0000 (16:50 +0100)]
Try to make file:// uris work in win32 too
Simon McVittie [Fri, 3 Feb 2012 14:20:43 +0000 (14:20 +0000)]
uri-parsing test: add a case that was exercised by a protocol fuzzer
This was suspected to cause a crash via a NULL path; while it seems it
doesn't actually have that problem, it still seems worth testing.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 3 Feb 2012 14:19:28 +0000 (14:19 +0000)]
uri-parsing test: verify that URIs are split correctly
Testing the round-trip (split + reassemble) is necessary, but not
sufficient: a large proportion of SoupURI's API is in terms of the
separate parts, and this was never explicitly tested before.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 3 Feb 2012 13:51:53 +0000 (13:51 +0000)]
soup_uri_new: annotate uri_string as nullable
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Tue, 10 Jan 2012 17:03:39 +0000 (17:03 +0000)]
SoupServer: reject non-HTTP URIs and URIs with no host
This prevents a critical warning and other misbehaviour in the
simple-httpd test, when using requests like "GET http: HTTP/1.0".
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Tue, 10 Jan 2012 15:56:08 +0000 (15:56 +0000)]
Header parsing test: verify that a full URI can appear after the "GET"
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Tue, 10 Jan 2012 13:51:47 +0000 (13:51 +0000)]
soup_uri_uses_default_port: correct documentation
We now know the default for ftp, too.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Simon McVittie [Tue, 10 Jan 2012 13:20:38 +0000 (13:20 +0000)]
SoupURI: give "foo:" a non-NULL path member
SoupURI documents uri->path as being required, and got_headers in
SoupServer assumes that it's non-NULL, but in fact parsing a URI
consisting solely of a scheme ("foo:") would leave path = NULL.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=667637
Bug-NB: NB#294977
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Dan Winship [Mon, 30 Jan 2012 23:55:40 +0000 (18:55 -0500)]
requester-test: add some more tests
Make sure that content-sniffing and redirections work
Dan Winship [Fri, 27 Jan 2012 18:25:24 +0000 (13:25 -0500)]
chunk-test: add a check that wrote-body-data gives the right data
(This was already working, but not tested, on master, but it was
broken on a work branch.)
Dan Winship [Mon, 23 Jan 2012 17:34:12 +0000 (12:34 -0500)]
SoupHTTPInputStream: don't burn through GCancellable fds
SoupSession limits the number of outgoing TCP connections, but
SoupRequestHTTP/SoupHTTPInputStream were still using a file descriptor
for the GCancellable of each request that got queued, even before it
was sent. This meant that if the app queued 1000ish requests all at
once (eg, while rendering an HTML page with *lots* of images), we
would run out of file descriptors.
Fix this by just using the GCancellable::cancelled signal rather than
g_cancellable_get_fd().
https://bugzilla.gnome.org/show_bug.cgi?id=668508
Raphael Kubo da Costa [Tue, 17 Jan 2012 14:30:48 +0000 (12:30 -0200)]
SoupSession: Do not actually send a request if it was cancelled before.
soup_session_cancel_message() may have been called in a REQUEST_STARTED
callback, so it is safer to make sure that
soup_connection_send_request() is called only if that is not the case.
https://bugzilla.gnome.org/show_bug.cgi?id=668098
Dan Winship [Tue, 17 Jan 2012 19:34:41 +0000 (14:34 -0500)]
post-release version bump
Dan Winship [Tue, 17 Jan 2012 19:02:46 +0000 (14:02 -0500)]
soup-message-io: make soup_message_io_unpause() obey use-thread-context
Dan Winship [Mon, 16 Jan 2012 23:50:01 +0000 (18:50 -0500)]
2.37.4
Dan Winship [Mon, 16 Jan 2012 23:09:22 +0000 (18:09 -0500)]
Belatedly add regression test for CVE-2011-2524
https://bugzilla.gnome.org/show_bug.cgi?id=667635
Xan Lopez [Sun, 1 Jan 2012 18:12:28 +0000 (19:12 +0100)]
soup-request-http: plug leak
The content type of the request is never freed.
https://bugzilla.gnome.org/show_bug.cgi?id=667099
Dan Winship [Thu, 22 Dec 2011 20:53:36 +0000 (15:53 -0500)]
configure.ac: bump glib requirement to 2.31.7 for GSocketClientEvent
Dan Winship [Thu, 8 Dec 2011 16:34:20 +0000 (11:34 -0500)]
SoupMessage: add network-event signal
Proxy the new GSocketClient::event signal and emit it on SoupMessage,
when relevant, to allow (a) debugging, (b) status messages, (c) request
timing, (d) fiddling with sockets
Dan Winship [Wed, 7 Dec 2011 22:03:19 +0000 (17:03 -0500)]
SoupConnection: belatedly fix up unix-only code
The last-minute-check-if-the-socket-has-been-closed-by-the-server code
was written long ago to use soup_socket_get_fd() and g_poll(), and so
was unix-only, but now that SoupSocket is GSocket-based, we can use
g_socket_condition_check() instead.
Dan Winship [Wed, 7 Dec 2011 21:53:26 +0000 (16:53 -0500)]
Force some SoupMessages to use a fresh SoupConnection
Add a new SOUP_MESSAGE_NEW_CONNECTION flag, and insist on getting a
brand new SoupConnection for any message that has that flag set, or
that uses a non-idempotent method.
Add a test to misc-test for this.
https://bugzilla.gnome.org/show_bug.cgi?id=578990
Dan Winship [Wed, 21 Dec 2011 16:50:41 +0000 (11:50 -0500)]
soup-headers: misc improvements
Return an error if the headers start with '\0', ignore header lines
with zero-length header names, and convert excess CRs to spaces. All
of these could possibly occur in received headers, and were previously
hitting g_return_if_fails().
Add a bunch of test cases to header-tests to test these cases (and
some others that we already handled correctly but weren't testing).
Fix the documentation of @str on soup_headers_parse* to reflect
reality.
Based on a patch from Simon McVittie.
https://bugzilla.gnome.org/show_bug.cgi?id=666316
Dan Winship [Tue, 20 Dec 2011 01:39:40 +0000 (20:39 -0500)]
2.37.3
Dan Winship [Fri, 16 Dec 2011 14:08:13 +0000 (09:08 -0500)]
Clarify the meaning of #SoupSession:ssl-strict
and fix the Since tags on #SoupSession:ssl-use-system-ca-file
and #SoupSession:tlsdb
https://bugzilla.gnome.org/show_bug.cgi?id=666280
Dan Winship [Sun, 4 Dec 2011 13:56:01 +0000 (14:56 +0100)]
SoupContentDecoder: add another hack to the broken server hack
We were fixing up responses that mistakenly claimed "gzip"
Content-Encoding for gzipped files, but not responses that mistakenly
claimed "x-gzip" encoding.
Craig Keogh [Sat, 3 Dec 2011 10:33:59 +0000 (11:33 +0100)]
Honor aclocal flags
https://bugzilla.gnome.org/show_bug.cgi?id=641470
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
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
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
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
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.
Dan Winship [Wed, 30 Nov 2011 20:59:55 +0000 (21:59 +0100)]
Require glib 2.31 and update to new thread APIs
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
Dan Winship [Mon, 21 Nov 2011 23:38:30 +0000 (18:38 -0500)]
2.37.2
Dan Winship [Mon, 21 Nov 2011 23:38:25 +0000 (18:38 -0500)]
Fix distcheck
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.
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
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
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
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
Dan Winship [Wed, 5 Oct 2011 20:09:44 +0000 (16:09 -0400)]
auth-test: add a test for server-closes-connection-during-auth
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
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
Dan Winship [Sat, 12 Nov 2011 14:31:10 +0000 (09:31 -0500)]
context-test: fix cleanup code to avoid a crash
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
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
Dan Winship [Thu, 13 Mar 2008 01:39:14 +0000 (21:39 -0400)]
SoupSession: add some API for handling redirections
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.
Dan Winship [Mon, 31 Oct 2011 22:34:21 +0000 (18:34 -0400)]
SoupHTTPInputStream: fix a g_warning in error cases
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
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
Dan Winship [Wed, 26 Oct 2011 23:30:00 +0000 (19:30 -0400)]
remove unnecessary libgthread references
Dan Winship [Tue, 25 Oct 2011 13:18:24 +0000 (09:18 -0400)]
2.37.1
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).
Dan Winship [Sat, 22 Oct 2011 19:20:07 +0000 (15:20 -0400)]
SoupRequest*, SoupHTTPInputStream: misc cleanups
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.
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.
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.
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.
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...
Dan Winship [Thu, 20 Oct 2011 21:12:25 +0000 (17:12 -0400)]
tests: make "./tests/foo" work from the toplevel dir
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
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.
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
Dan Winship [Fri, 30 Sep 2011 00:41:38 +0000 (20:41 -0400)]
Add SoupServer:tls-certificate to go with SoupSession:tlsdb
Dan Winship [Mon, 26 Sep 2011 23:23:50 +0000 (19:23 -0400)]
libsoup.supp: belatedly commit some fixes
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.
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
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
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