Vincent Untz [Thu, 3 Dec 2009 14:35:58 +0000 (15:35 +0100)]
Make connection-created and tunneling of SoupSession use a GObject
The connection-created and tunneling signals added to SoupSession in commit
6ff7ecdd were using SoupConnection, and this made SoupConnection
semi-public (gir-repository failed to build because it didn't know about
it, for example).
Since SoupConnection is intended to be private, use a GObject for the
signal parameter.
https://bugzilla.gnome.org/show_bug.cgi?id=603696
Dan Winship [Mon, 30 Nov 2009 23:40:32 +0000 (18:40 -0500)]
[configure] post-release bump to 2.29.4
Dan Winship [Mon, 30 Nov 2009 23:37:47 +0000 (18:37 -0500)]
2.29.3
Dan Winship [Mon, 30 Nov 2009 16:40:39 +0000 (11:40 -0500)]
[SoupAuthDomainDigest] fix nc parsing
We were parsing it as decimal rather than hex, which meant the auth
would fail and return 401 again after 10 requests.
Noted by Chris Head,
https://bugzilla.gnome.org/show_bug.cgi?id=602898
Dan Winship [Mon, 12 Oct 2009 16:36:09 +0000 (12:36 -0400)]
Don't leak session if message is cancelled during socket connection
Fix up refcounting handling so that if the session is destroyed while
a connection attempt is pending, it doesn't cause the session to be
leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=596074
Dan Winship [Sun, 22 Nov 2009 13:41:09 +0000 (08:41 -0500)]
Changes to SoupConnection and SoupSession for debugging
Specifically, to help epiphany's soup-fly extension track connection
usage.
Patch from José Millán Soto,
https://bugzilla.gnome.org/show_bug.cgi?id=598163
Dan Winship [Sat, 7 Nov 2009 19:15:08 +0000 (14:15 -0500)]
Add soup_session_prepare_for_uri
Lets the session prepare for a possible upcoming request. (Eg,
WebKitGTK will call this when the user hovers over a link.) Currently
just does DNS resolution. Will eventually do proxy resolution as well.
Based on a patch from José Millán Soto
https://bugzilla.gnome.org/show_bug.cgi?id=598948
Dan Winship [Sun, 22 Nov 2009 00:55:03 +0000 (19:55 -0500)]
[configure] bump version to 2.29.3
Dan Winship [Fri, 6 Nov 2009 17:52:14 +0000 (12:52 -0500)]
Fix Request-Line in https over proxy
Previously it was continuing to send a full URI rather than only a path
in the Request-Line after completing the CONNECT, which confused some
(broken) servers.
https://bugzilla.gnome.org/show_bug.cgi?id=598277
https://bugzilla.gnome.org/show_bug.cgi?id=600826
Dan Winship [Sat, 21 Nov 2009 15:29:00 +0000 (10:29 -0500)]
soup_multipart_new_from_message: fix to work with binary attachments
Previously we were using strstr() to find the multipart boundary, so
it would fail if the body contained '\0' bytes. Update
tests/forms-test to test this case.
https://bugzilla.gnome.org/show_bug.cgi?id=601640
Dan Winship [Sat, 21 Nov 2009 14:54:07 +0000 (09:54 -0500)]
soup_cookies_from_request: fix to not always g_warn
https://bugzilla.gnome.org/show_bug.cgi?id=602389
Dan Winship [Sat, 21 Nov 2009 14:33:20 +0000 (09:33 -0500)]
Don't crash when setting cookie for about:blank
https://bugzilla.gnome.org/show_bug.cgi?id=602498
Dan Winship [Sat, 21 Nov 2009 14:32:21 +0000 (09:32 -0500)]
SOUP_URI_VALID_FOR_HTTP: update to check uri->path too
Dan Winship [Sat, 7 Nov 2009 18:59:52 +0000 (13:59 -0500)]
[SoupAddress] make _resolve_async idempotent, document/fix thread-safety
Document that _resolve_async() can be called multiple times, but only
from the same async_context, and _resolve_sync() can be called
multiple times from different threads. Note that _get_name, etc, may
misbehave in the presence of multiple threads.
Change _resolve_async() so that multiple attempts to resolve the same
address will result in only a single GResolver call, and they will all
complete at the same time.
Part of https://bugzilla.gnome.org/show_bug.cgi?id=598948
Dan Winship [Sat, 7 Nov 2009 18:58:35 +0000 (13:58 -0500)]
[SoupAddress] Remove some cruft
Tor Lillqvist [Thu, 5 Nov 2009 20:10:21 +0000 (22:10 +0200)]
Tell GnuTLS about interesting Winsock errors
In the pull and push functions, if we get a Winsock error, tell GnuTLS
about it. Treat WSAEWOULDBLOCK and WSAETIMEDOUT as EAGAIN and WSAEINTR
as EINTR. This helps timeout-test run to finish.
Approved in bug #600749.
Tor Lillqvist [Thu, 5 Nov 2009 20:03:34 +0000 (22:03 +0200)]
Register libgcrypt thread callbacks also on Windows
Libsoup must register thread callback functions for libgcrypt also on
Windows, otherwise libgcrypt will use its fallback dummy mutex
functions which don't do any real mutexing.
Approved in bug #600748.
Tor Lillqvist [Thu, 5 Nov 2009 19:25:36 +0000 (21:25 +0200)]
Ensure WSAStartup() is called on Windows more reliably
It is apparently no longer enough to call WSAStartup() from
soup_address_class_init() and expect that to be called from
soup_address_get_type().
Furthermore, soup-address.c doesn't do any socket API calls any more
so it is more natural to do the WSAStartup() call in
soup-socket.c. Use G_DEFINE_TYPE_WITH_CODE() to make sure
soup_socket_get_type() calls once exactly a function that calls
WSAStartup(). This is what GInetAddress does too, for instance.
Ajust ssl-test.c accordingly.
Approved in bug #600689.
Dan Winship [Thu, 5 Nov 2009 16:15:38 +0000 (11:15 -0500)]
Don't change HEAD to GET on 303 redirect
https://bugzilla.gnome.org/show_bug.cgi?id=600830
Emilio Pozuelo Monfort [Thu, 22 Oct 2009 14:28:13 +0000 (16:28 +0200)]
Don't crash if the sqlite database lacks some values
Right now we strcmp() the isSecure and isHttpOnly values,
but if they are missing we will crash since strcmp() is
not NULL safe. Use g_strcmp0() instead.
Dan Winship [Mon, 19 Oct 2009 21:56:01 +0000 (17:56 -0400)]
2.28.1
Dan Winship [Sun, 18 Oct 2009 15:21:36 +0000 (11:21 -0400)]
Fix the latest round of "Connection terminated unexpectedly" errors
The fix introduced in
ef7fc058 for bug 578990 caught most cases where
we'd write a request to an already-closed connection, but not all.
Unfortunately, at some point the code path for recovering from that
case got broken, so when it did happen, we'd always end up returning
the error to the app rather than retrying the request. This is now
fixed again.
The specific recent cause of the problem was that the
multiple-pending-connections fix (
baa316ac/bug 594768) results in us
sometimes opening more connections than we need, and so some of those
connections become idle without ever having had a message sent across
them. Servers tend to have different timeouts/behaviors here than with
idle persistent connections, so we should time them out more
aggressively. So now we close a connection after 3 seconds if it
hasn't been used yet.
Dan Winship [Thu, 15 Oct 2009 21:31:55 +0000 (17:31 -0400)]
fix soup_address_get_physical and reverse-resolution
Noted by Enrico Tröger on IRC.
Dan Winship [Tue, 13 Oct 2009 16:44:39 +0000 (12:44 -0400)]
Belatedly clean up some dns/socket-related stuff
We use GResolver so we don't need to check for getaddrinfo() etc
ourselves, and we don't need to check for IPv6 support, since
GResolver/GSocket require it unconditionally.
Dan Winship [Tue, 13 Oct 2009 16:24:22 +0000 (12:24 -0400)]
[configure] import libgcrypt.m4 to m4/
Fixes both https://bugzilla.gnome.org/show_bug.cgi?id=587709 (the
current hack for letting you autogen without libgcrypt.m4 does the
wrong thing if you have gnutls-devel but not libgcrypt-devel
installed) and https://bugzilla.gnome.org/show_bug.cgi?id=592275
(older autotools don't automatically create the m4/ dir).
Dan Winship [Tue, 13 Oct 2009 16:17:09 +0000 (12:17 -0400)]
[configure] require gnutls>=2.1.7
noted by Nguyen Thai Ngoc Duy in bug 581342
Dan Winship [Sun, 11 Oct 2009 20:31:05 +0000 (16:31 -0400)]
Allow multiple pending connections to a server at once
Only allowing a single connection attempt at once really slows down
pages with lots of subresources on servers that disallow persistent
connections.
https://bugzilla.gnome.org/show_bug.cgi?id=594768
Alejandro G. Castro [Wed, 7 Oct 2009 18:55:23 +0000 (20:55 +0200)]
Fixed problem with the content sniffing.
The content sniffing loop that checks the content patterns was not
controlling the length of each pattern.
https://bugzilla.gnome.org/show_bug.cgi?id=597545
Alexander Sack [Fri, 2 Oct 2009 07:28:59 +0000 (10:28 +0300)]
Make QUERY_ALL explicit in SoupCookieJarSQLite
SELECT * is dangerous, as there seems to be at least two different
formats with different orders in the wild.
Bug #596859
Signed-off-by: Xan Lopez <xan@gnome.org>
Dan Winship [Mon, 21 Sep 2009 17:54:00 +0000 (13:54 -0400)]
2.28.0
Olivier Crête [Fri, 11 Sep 2009 23:04:10 +0000 (19:04 -0400)]
Keep reference on SoupSocket while emitting signals
The socket could have its last external referenced dropped by
soup_message_io_cleanup() during the "readable" signal and then
abort() when trying to emit the "disconnected" signal.
https://bugzilla.gnome.org/show_bug.cgi?id=594951
Dan Winship [Fri, 11 Sep 2009 15:46:45 +0000 (11:46 -0400)]
Fix leaks, including a large one in SoupContentSniffer
Fix a handful of leaks noticed by valgrind, including a leak of the
buffers being passed to SoupContentSniffer
(https://bugs.webkit.org/show_bug.cgi?id=28148).
Dan Winship [Fri, 11 Sep 2009 15:46:14 +0000 (11:46 -0400)]
Fix leaks in test programs, update libsoup.supp
Dan Winship [Tue, 8 Sep 2009 17:03:53 +0000 (13:03 -0400)]
_SOUP_ATOMIC_INTERN_STRING: cast result to (const char *)
http://bugzilla.gnome.org/show_bug.cgi?id=594508
Gustavo Noronha Silva [Tue, 8 Sep 2009 12:38:45 +0000 (09:38 -0300)]
Keep database handle open, and avoid synchronous writes
The synchronous writes behavior is the safest, but has very poor
performance, and causes UI hangs for users of soup.
Bug #584522
Dan Winship [Mon, 7 Sep 2009 22:34:49 +0000 (18:34 -0400)]
2.27.92
Dan Winship [Mon, 7 Sep 2009 13:57:26 +0000 (09:57 -0400)]
Remove SoupPasswordManager from the stable API
See http://bugzilla.gnome.org/show_bug.cgi?id=594377
Dan Winship [Mon, 7 Sep 2009 22:25:15 +0000 (18:25 -0400)]
SoupURI: an empty query is distinct from no query
http://bugzilla.gnome.org/show_bug.cgi?id=594405
Dan Winship [Mon, 7 Sep 2009 16:46:28 +0000 (12:46 -0400)]
Skip termios stuff in tests/get if building on Windows
Yeah, yeah, I should add a HAVE_TERMIOS_H test. Whatever.
http://bugzilla.gnome.org/show_bug.cgi?id=593845
Xan Lopez [Tue, 1 Sep 2009 15:46:23 +0000 (18:46 +0300)]
Reset error pointer to NULL when we are about to use it again.
Just in case sqlite expects this to be the case a la GError.
Also use NULL instead of 0 to initialize the error pointers elsewhere.
Dan Winship [Mon, 31 Aug 2009 16:15:01 +0000 (12:15 -0400)]
Set MISSING_REGRESSION_TEST_PACKAGES if built with --disable-ssl
This way "make check" will warn you that it didn't test everything
Marvin Schmidt [Sun, 30 Aug 2009 15:37:30 +0000 (17:37 +0200)]
Fix timeout-test without SSL support
http://bugzilla.gnome.org/show_bug.cgi?id=593563
Dan Winship [Tue, 25 Aug 2009 15:32:49 +0000 (11:32 -0400)]
Fix header names in build-howto.xml
Pointed out by Dominik Bylica
Dan Winship [Tue, 25 Aug 2009 15:31:02 +0000 (11:31 -0400)]
Fix some incorrect "Since" tags in SoupCookieJar docs.
Pointed out by Lucian Langa
Dan Winship [Mon, 24 Aug 2009 20:39:45 +0000 (16:39 -0400)]
post-release bump to 2.27.92
Dan Winship [Mon, 24 Aug 2009 20:33:22 +0000 (16:33 -0400)]
2.27.91
Dan Winship [Mon, 24 Aug 2009 16:30:49 +0000 (12:30 -0400)]
Fix some leaks in the error cases of soup_multipart_new_from_message()
Noticed by Xan Lopez while looking for a different leak.
Dan Winship [Sat, 22 Aug 2009 13:11:45 +0000 (09:11 -0400)]
Avoid infinite loop trying to connect to host when the network is down.
If a connection attempt to a host fails, fail all of the messages
queued for that host.
Previously we would leave them in the queue if there was already an
existing connection to the host (hoping that we'd be able to reuse
that connection for the other messages later), but this meant that if
there was a single connection to a host open, with a message running
on it, and at least one additional queued message to the same host,
and then the network went down, libsoup would get stuck in a loop
repeatedly trying and failing to open a second connection (with the
first connection never getting a chance to time out).
http://bugzilla.gnome.org/show_bug.cgi?id=592492
Dan Winship [Fri, 21 Aug 2009 23:49:42 +0000 (19:49 -0400)]
Fix SoupLogger to not crash with streamed requests
http://bugzilla.gnome.org/show_bug.cgi?id=591857
Dan Winship [Fri, 21 Aug 2009 23:03:56 +0000 (19:03 -0400)]
Re-redo not-yet-used connection handling
Previously we were taking special care to avoid closing connections
that hadn't been used yet, but this is not actually necessary;
run_queue() doesn't prune idle connections until after running through
the entire queue once, so if the new connection is still idle at that
point, it means we no longer have a message to send on it (probably
because the message already got sent on another connection), and so it
is legitimate to close it if needed.
http://bugzilla.gnome.org/show_bug.cgi?id=592084
Dan Winship [Fri, 21 Aug 2009 22:42:55 +0000 (18:42 -0400)]
Remove checks for SOUP_MESSAGE_IO_STATUS_CONNECTING, since it never gets set
The connection-management rewrite removed the code that would set it.
Since it never worked exactly the way it was supposed to anyway, let's
just get rid of it and replace it with something better.
Dan Winship [Thu, 20 Aug 2009 18:14:52 +0000 (14:14 -0400)]
Fix the definition of soup_message_is_keepalive() for HTTP/1.0
Fixes a problem where some requests would reach 100% but never "finish"
Benjamin Otte [Mon, 17 Aug 2009 17:29:17 +0000 (19:29 +0200)]
Add warning in a "can't happen" case
This is mostly to indicate that we did not forget error checking.
Dan Winship [Tue, 18 Aug 2009 14:10:45 +0000 (10:10 -0400)]
Tweak SoupConnection handling a bit wrt "not yet used" connections.
Should help to avoid the "undead" connections described in bug 592084.
Dan Winship [Tue, 18 Aug 2009 02:28:08 +0000 (22:28 -0400)]
Notice closed connections sooner
Only works on UNIX; Windows has to wait for the GSocket port.
http://bugzilla.gnome.org/show_bug.cgi?id=578990
Dan Winship [Thu, 13 Aug 2009 22:21:19 +0000 (18:21 -0400)]
Fix a crash when processing a request with no Host header
Pointed out by Andreas Henriksson on IRC
Dan Winship [Wed, 12 Aug 2009 14:23:39 +0000 (10:23 -0400)]
Add SoupPasswordManager and SoupPasswordManagerGNOME
SoupPasswordManager (and some new SoupAuth APIs) provide an interface
for saving passwords, and SoupPasswordManagerGNOME provides an
implementation of that interface using gnome-keyring.
Dan Winship [Wed, 12 Aug 2009 14:03:12 +0000 (10:03 -0400)]
post-release version bump
Dan Winship [Mon, 10 Aug 2009 21:15:15 +0000 (17:15 -0400)]
2.27.90
Dan Winship [Mon, 10 Aug 2009 21:15:01 +0000 (17:15 -0400)]
Fix up docs
Dan Winship [Sat, 27 Sep 2008 22:55:35 +0000 (18:55 -0400)]
Port SoupAddress to use GResolver, remove soup-dns
Dan Winship [Sun, 9 Aug 2009 15:23:55 +0000 (11:23 -0400)]
Fix error code when trying to https with --disable-ssl
http://bugzilla.gnome.org/show_bug.cgi?id=590464
Dan Winship [Sun, 9 Aug 2009 14:58:54 +0000 (10:58 -0400)]
Add soup_session_get_feature_for_message, remove _get_proxy_resolver
Add a cache to soup_session_get_feature(), and remove the separate
auth_manager and proxy_resolver private vars, and just use
soup_session_get_feature() as needed instead. (Partly inspired by the
fact that the cache branch adds yet another specially-tracked
feature.)
Add soup_session_get_feature_for_message() to get a feature and check
soup_message_disables_feature() on it, and use that to replace
soup_session_get_proxy_resolver().
Dan Winship [Sun, 2 Aug 2009 15:35:01 +0000 (11:35 -0400)]
Add soup_message_disable_feature()
This allows you to disable specific SoupSessionFeatures for particular
messages.
Also update tests/sniffing-test to test it out.
http://bugzilla.gnome.org/show_bug.cgi?id=574773
Dan Winship [Tue, 4 Aug 2009 23:34:30 +0000 (19:34 -0400)]
Support "OPTIONS *" in SoupServer
Update soup-message-server-io.c to allow "*" in a Request-Line, and
update SoupServer and SoupAuthDomain methods and docs to deal with it.
For backward-compatibility, requests to "*" are NOT passed to the
default handler; you must explicitly register a handler for "*".
http://bugzilla.gnome.org/show_bug.cgi?id=590751
Dan Winship [Sun, 9 Aug 2009 14:19:39 +0000 (10:19 -0400)]
another out-of-tree build fix
Andreas Rottmann [Sun, 9 Aug 2009 13:46:36 +0000 (09:46 -0400)]
Build fixes
- Add -I$(top_builddir) to documentation scanner CFLAGS (fixes "make
distcheck" run from an out-of-tree build)
Dan Winship [Sun, 9 Aug 2009 13:42:14 +0000 (09:42 -0400)]
Use an m4/ directory for aclocal files
Dan Winship [Sun, 9 Aug 2009 13:24:19 +0000 (09:24 -0400)]
Add automake 1.11 silent-rules support
Dan Winship [Sun, 9 Aug 2009 13:16:48 +0000 (09:16 -0400)]
Use guchar instead of char where the distinction is important.
Noticed by -Wextra
Dan Winship [Sun, 9 Aug 2009 13:16:31 +0000 (09:16 -0400)]
Remove a redundant check
Dan Winship [Sun, 9 Aug 2009 13:15:38 +0000 (09:15 -0400)]
Clarify that an ignored return value is intentional, to appease fortify
http://bugzilla.gnome.org/show_bug.cgi?id=591226
Dan Winship [Sun, 9 Aug 2009 12:53:50 +0000 (08:53 -0400)]
Add some g_return_if_fail()s to soup-headers.c
(partly from "cache" branch)
Xan Lopez [Wed, 5 Aug 2009 07:50:19 +0000 (10:50 +0300)]
soup-session: fix typo in documentation
Dan Winship [Sun, 2 Aug 2009 15:34:08 +0000 (11:34 -0400)]
Add missing soup-proxy-uri-resolver.h to soup.h
Benjamin Otte [Tue, 4 Aug 2009 10:11:03 +0000 (12:11 +0200)]
Mirror Mozilla behavior for when to follow Content-Length
Mozilla only honors content length on messages that use keep-alive to
work around servers that send broken Content-Length headers. This patch
mirrors that behavior.
An example for such a page is
http://sourceforge.net/apps/wordpress/sourceforge
Dan Winship [Fri, 31 Jul 2009 20:39:40 +0000 (16:39 -0400)]
Re-fix _SOUP_ATOMIC_INTERN_STRING to not cause strict-aliasing warnings
http://bugzilla.gnome.org/show_bug.cgi?id=588771
Dan Winship [Tue, 28 Jul 2009 02:39:04 +0000 (22:39 -0400)]
2.27.5
Dan Winship [Tue, 28 Jul 2009 01:27:27 +0000 (21:27 -0400)]
Don't crash when a request is redirected to an invalid/non-http URI
Make redirect_handler() reject such responses, and also make soup-uri
g_return_if_fail rather than crashing. Add a regression test.
http://bugzilla.gnome.org/show_bug.cgi?id=528882
Dan Winship [Mon, 27 Jul 2009 17:06:19 +0000 (13:06 -0400)]
Do not discard the request body after sending, even if !accumulate
We can't discard the request body until the message is completely
finished, because it may be necessary to send it a second time due to
redirect, authentication, or premature connection close.
In particular, if the request body did get discarded, then when
soup-message-io tried to send it the second time, it would see a non-0
content-length but no body chunks, and so would assume that the
application was intending to stream the body, and so would pause it
and wait for the first chunk. Since the application was not actually
intending to stream the request, this would result in the message
getting stuck forever.
http://bugzilla.gnome.org/show_bug.cgi?id=584645
Andreas Rottmann [Sun, 21 Jun 2009 01:21:49 +0000 (21:21 -0400)]
Build fixes
- Remove acinclude.m4, which just hosted a stale copy of
GTK_DOC_CHECK, which in turn broke "make distcheck" when used in
combination with the gtk-doc.make installed by newer gtkdocize.
- Fix #include in soup-path-map.h.
Patrick Ohly [Thu, 23 Jul 2009 14:03:34 +0000 (16:03 +0200)]
Allow version 1 CA certificates in clients
This is done by setting the GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT
flag while setting up the credentials and parsing the CA certificate
file. This is necessary because without it, some releases of gnutls
reject certificates that are currently in use by major sites, including
Google.
Setting the flag is safe in libsoup because the file is meant to
contain only CA certificates. The main weakness around version 1
certs is that personal certificates could be mistaken for CA certs,
which shouldn't happen if libsoup is used as intended.
Servers don't have the possibility to verify their clients, so this
problem doesn't apply to them.
http://bugzilla.gnome.org/show_bug.cgi?id=589323
Dan Winship [Mon, 13 Jul 2009 15:31:49 +0000 (11:31 -0400)]
Fix cut+pasto in win32 gnutls code
Dan Winship [Mon, 13 Jul 2009 14:21:38 +0000 (10:21 -0400)]
2.27.4
Dan Winship [Mon, 13 Jul 2009 15:04:34 +0000 (11:04 -0400)]
distcheck fixes for sniffing-test
Gustavo Noronha Silva [Mon, 13 Jul 2009 14:40:21 +0000 (15:40 +0100)]
Make gcc happy with body handling in sniffing-test
Gustavo Noronha Silva [Mon, 13 Jul 2009 14:36:10 +0000 (15:36 +0100)]
Fix HTML or feed algorithm to not go past resource_length
Dan Winship [Mon, 13 Jul 2009 00:26:43 +0000 (20:26 -0400)]
Fix SSL on Windows
The connection timeout changes had broken SSL on Windows because they
used read/write rather than recv/send.
Based on a patch from Fridrich Strba.
http://bugzilla.gnome.org/show_bug.cgi?id=587910
Mark Nauwelaerts [Mon, 13 Jul 2009 00:19:16 +0000 (20:19 -0400)]
Make SOUP_SESSION_TIMEOUT also affect async connection
http://bugzilla.gnome.org/show_bug.cgi?id=588177
Dan Winship [Sun, 12 Jul 2009 16:22:45 +0000 (12:22 -0400)]
Fix a content-sniffer crash with redirected URLs
SoupMessageHeaders was not properly cleaning up the cached
Content-Type when a request was redirected, which meant that if the
redirected-to URL had no Content-Type header, then
soup_message_headers_get_content_type() would return the Content-Type
of the original request, but
soup_message_headers_get_one("Content-Type") would return NULL,
causing the sniffer to crash.
http://bugzilla.gnome.org/show_bug.cgi?id=588335
Dan Winship [Fri, 10 Jul 2009 17:11:07 +0000 (13:11 -0400)]
Miscellaneous content-sniffing fixes
Remove the should_sniff_content flag; if there is a sniffer, we always
sniff.
Clean up soup-message-io a bit to require fewer special cases, and fix
a few potential leaks/crashes where it wasn't dealing with
IF_CANCELLED_OR_PAUSED correctly. (Although this looks like a large
patch, it actually results in a much smaller diff relative to 2.26.
Fix tests/sniffing-test to do chunked encoding correctly, make sure to
return data in chunks that are smaller than the sniffing buffer size,
and make resources/mbox larger than the sniffing buffer size so it
takes multiple reads to get enough data (when using chunked encoding).
Also add tests for empty response bodies (from Gustavo).
http://bugzilla.gnome.org/show_bug.cgi?id=587907
Gustavo Noronha Silva [Fri, 10 Jul 2009 13:29:28 +0000 (14:29 +0100)]
Actually test chunked encoding, and fix some hangs
The test was not really testing chunked encoding, because of incorrect
handling of the query string in the SoupURI, now it does. This has
exposed a couple hangs.
This change also avoids hanging on chunked encoding messages on the
sniffing test by calling soup_message_body_complete(), and by
sanitizing IO read state and read_length inconditionally when we reach
got_body, during message IO.
Dan Winship [Fri, 3 Jul 2009 01:28:53 +0000 (21:28 -0400)]
Fix the SOUP_METHOD_* and SOUP_URI_SCHEME_* defines to be threadsafe
Also fix/optimize a few other things in URI scheme canonicalization
Gustavo Noronha Silva [Wed, 17 Jun 2009 23:53:17 +0000 (20:53 -0300)]
Implement content sniffing
The implementation is based on the draft spec on Content-Type
Processing Model (draft-abarth-mime-sniff-01). It is a spinoff from
the HTML5 spec.
Soup now provides a SoupContentSniffer session feature, which hooks
into the message I/O, and delays emissions of the got-chunk signal to
be able to figure out the Content-Type of messages from the actual
content received, in some cases.
GIO is also used to sniff content, whenever the spec allows further
sniffing.
http://bugzilla.gnome.org/show_bug.cgi?id=572589
Dan Winship [Sun, 28 Jun 2009 14:00:00 +0000 (10:00 -0400)]
Require explicit --disable-ssl to build without GNUTLS support
In general, if someone is trying to build without GNUTLS installed
it's an accident, so bail out with an error.
Inspired by http://bugzilla.gnome.org/show_bug.cgi?id=584955
Dan Winship [Mon, 22 Jun 2009 21:52:39 +0000 (17:52 -0400)]
Fix POST 301 redirect behavior
We were doing POST->GET translation on 302 and 303, but we need to do
it on 301 as well to be compatible.
http://bugzilla.gnome.org/show_bug.cgi?id=586692
Dan Winship [Tue, 16 Jun 2009 15:39:22 +0000 (11:39 -0400)]
2.27.2
Dan Winship [Tue, 9 Jun 2009 17:36:12 +0000 (13:36 -0400)]
Remove -r flag from tests/get
The requirement that it imposed--that we "guess" the name of the index
file when fetching a URL that ended with "/"--is more annoying than
the usefulness of being able to test multiple downloads at once.
Dan Winship [Mon, 8 Jun 2009 13:55:15 +0000 (09:55 -0400)]
add a HACKING file with some initial notes on code style and correctness
Dan Winship [Sun, 7 Jun 2009 03:14:05 +0000 (23:14 -0400)]
Add "Content-Length: 0" to requests with a Content-Type but no body
Some servers get annoyed if a POST/PUT declares a Content-Type but
contains no body, so make sure to send a 0-length body (which is
different) instead.