Dan Winship [Tue, 14 Jun 2005 15:34:22 +0000 (15:34 +0000)]
add/fix gtk-doc comments, make functions match prototypes, etc
* libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
prototypes, etc
* docs/reference/*: update, fix, etc
Tor Lillqvist [Tue, 14 Jun 2005 09:02:29 +0000 (09:02 +0000)]
Check also for inet_ntop(). Pre-cache knowledge that we do have
2005-06-13 Tor Lillqvist <tml@novell.com>
* configure.in: Check also for inet_ntop(). Pre-cache knowledge
that we do have inet_pton() and inet_ntop() on Windows (because we
implement them ourselves in soup-dns.c).
* libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
implementations, they were completely bogus.
(soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
Dan Winship [Wed, 8 Jun 2005 14:35:47 +0000 (14:35 +0000)]
Fix this to use just the domain name for the domain, not the whole
* libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
use just the domain name for the domain, not the whole
DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
Dan Winship [Tue, 7 Jun 2005 14:18:07 +0000 (14:18 +0000)]
lock host_lock around this, since it can be called from set_property().
* libsoup/soup-session.c (cleanup_hosts): lock host_lock around
this, since it can be called from set_property(). Possible fix for
bnc #81641.
Dan Winship [Thu, 5 May 2005 13:47:53 +0000 (13:47 +0000)]
Use --type-init-func to force g_thread_init to be called. [#302674]
* docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
--type-init-func to force g_thread_init to be called. [#302674]
Dan Winship [Mon, 2 May 2005 14:51:58 +0000 (14:51 +0000)]
ignore libsoup-zip
Tor Lillqvist [Tue, 19 Apr 2005 06:21:32 +0000 (06:21 +0000)]
Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set Automake conditional
2005-04-18 Tor Lillqvist <tml@novell.com>
* configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
Automake conditional OS_WIN32. Pre-cache information that we do
have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
wouldn't notice as they don't include the necessary headers or
link with -lws2_32. Easiest to just pre-cache it.)
* libsoup-zip.in: New file, to build zipfile-based distribution of
libsoup for Win32.
* Makefile.am (EXTRA_DIST)
* configure.in (AC_OUTPUT): Add libsoup-zip(.in).
* libsoup/Makefile.am: Use -no-undefined on Win32. Link with
WinSock library -lws2_32.
* libsoup/soup-portability.h: New file. On Unix it includes the
traditional BSD socket etc headers. On Win32 it includes
winsock2.h and ws2tcpip.h.
* libsoup/*.c
* libsoup/*.h: Correspondingly, don't include the BSD socket API
headers directly.
* libsoup/soup-address.h
* libsoup/soup-dns.h: Include soup-portability.h
* libsoup/soup-address.c (soup_address_class_init): This function
should get called before libsoup uses the WinSock API, so this is
a good place to call WSAStartup().
* libsoup/soup-auth-digest.c (get_protection_space): Use
g_strsplit() instead of the relatively unportable strtok_r().
* libsoup/soun-dns.c: Remove unused headers. Implement
inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
and WSAAddressToString().
* libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
Portability macros.
(soup_socket_class_init): Call soup_address_get_type() to make
sure WSAStartup() gets called (through soup_address_class_init()).
(update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
(soup_socket_write): Conditionalize SIGPIPE use.
* tests/get.c: mkdir() is different in Microsoft's C library.
* tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
some clash with winsock2.h (which includes windows.h). The Win32
headers pollute the namespace wildly.
Dan Winship [Fri, 15 Apr 2005 13:47:48 +0000 (13:47 +0000)]
make this work with pre-EAI_OVERFLOW glibc [#300620]
* libsoup/soup-dns.c (resolve_name): make this work with
pre-EAI_OVERFLOW glibc [#300620]
Dan Winship [Thu, 14 Apr 2005 20:38:23 +0000 (20:38 +0000)]
update
Dan Winship [Tue, 12 Apr 2005 19:18:46 +0000 (19:18 +0000)]
Remove the various gethostbyname_r checks and just check for
* configure.in: Remove the various gethostbyname_r checks and just
check for getnameinfo/getaddrinfo.
* libsoup/soup-dns.c: de-nastify. Make this use threads instead of
forking. Change the API around a bunch in the process.
* libsoup/soup-address.c: Update for soup-dns changes
* tests/dns.c: take multiple hostnames on the command line and
resolve them all at once (patch from tml)
Dan Winship [Mon, 11 Apr 2005 20:42:07 +0000 (20:42 +0000)]
require glib-2.0 >= 2.4.0
* configure.in: require glib-2.0 >= 2.4.0
* libsoup/*.c: use G_DEFINE_TYPE and
g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
* libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
SOUP_MAKE_TYPE_WITH_IFACE
* tests/revserver.c: use GThread. (patch from tml)
Dan Winship [Mon, 11 Apr 2005 15:54:17 +0000 (15:54 +0000)]
bump version to 2.3.0. bump SOUP_API_VERSION to 2.4
* configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
2.4
* libsoup.pc.in: rename from libsoup-2.2.pc.in
* Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
install the .pc file by hand, renaming it to include the
SOUP_API_VERSION
* libsoup/Makefile.am: s/2.2/2.4/
Dan Winship [Mon, 11 Apr 2005 15:13:06 +0000 (15:13 +0000)]
belatedly pull up changes from gnome-2-10 branch
Not Zed [Wed, 12 Jan 2005 04:34:16 +0000 (04:34 +0000)]
** See ximian bug #70323.
2005-01-08 Not Zed <NotZed@Ximian.com>
** See ximian bug #70323.
* libsoup/soup-connection-ntlm.c: replace all unsigned long/long
types with guint32, as the code needs 32 bit longs.
Dan Winship [Wed, 6 Oct 2004 19:16:08 +0000 (19:16 +0000)]
update
Dan Winship [Wed, 6 Oct 2004 17:21:46 +0000 (17:21 +0000)]
oops, forgot to save after adding bug #
Dan Winship [Wed, 6 Oct 2004 17:21:07 +0000 (17:21 +0000)]
add SOUP_SSL_ERROR_CERTIFICATE.
* libsoup/soup-ssl.h (SoupSocketError): add
SOUP_SSL_ERROR_CERTIFICATE.
* libsoup/soup-gnutls.c (do_handshake): Pass the GError to
verify_certificate.
(verify_certificate): Set the GError appropriately rather than
spewing g_warnings.
* libsoup/soup-socket.c (read_from_network, soup_socket_write): If
the GIOChannel operation returns an error, store it as GOBject
data on the socket (as a hack so soup-message-io.c can access it
without us needing to change SoupSocket's API).
* libsoup/soup-message-io.c (io_error): peek at the socket's
"last_error" datum and set the message's status to SSL_FAILED
(with the GError's message string) rather than IO_ERROR, if
appropriate. For 64414.
Dan Winship [Mon, 4 Oct 2004 15:17:21 +0000 (15:17 +0000)]
Add this, with some extra initialization needed for libgcrypt 1.2 or
* libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
extra initialization needed for libgcrypt 1.2 or higher. Fixes
66342.
(soup_ssl_get_client_credentials,
soup_ssl_get_server_credentials): Call soup_gnutls_init().
Dan Winship [Tue, 31 Aug 2004 19:08:18 +0000 (19:08 +0000)]
add some things
Dan Winship [Thu, 26 Aug 2004 20:28:33 +0000 (20:28 +0000)]
Bump version to 2.2.0.
* configure.in: Bump version to 2.2.0.
Dan Winship [Thu, 26 Aug 2004 17:26:04 +0000 (17:26 +0000)]
Update this to reflect the last 2 years.
* AUTHORS: Update this to reflect the last 2 years.
* NEWS: Brief summary of 1.99.x -> 2.2 changes
* README, TODO: Updates
Dan Winship [Thu, 26 Aug 2004 15:33:33 +0000 (15:33 +0000)]
add/fix lots of gtk-doc comments
* libsoup/*: add/fix lots of gtk-doc comments
* libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
Fix bug noticed while documenting. (We were using the
locale-case-insensitive functions rather than the g_ascii_ ones.)
* libsoup/soup-message.h (SoupMessageFlags): remove the (never
implemented) NO_PIPELINE and NO_COOKIE flags.
* docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
There are still problems here with gtk-doc not recognizing many of
the objects in libsoup...
JP Rosevear [Fri, 13 Aug 2004 14:45:44 +0000 (14:45 +0000)]
bump version, libtool number
2004-08-13 JP Rosevear <jpr@novell.com>
* configure.in: bump version, libtool number
Dan Winship [Tue, 10 Aug 2004 16:58:06 +0000 (16:58 +0000)]
Don't use conn after emitting the "connect_result" signal, since it might
* libsoup/soup-connection.c (soup_connection_connect_sync): Don't
use conn after emitting the "connect_result" signal, since it
might be destroyed by that. Based on a patch from hpj.
Dan Winship [Mon, 9 Aug 2004 16:58:10 +0000 (16:58 +0000)]
Add flag "broken_encoding" to SoupUri.
* libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
* libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
set, don't re-encode the URL parts. Based on a patch by
Alfred.Peng@Sun.COM.
JP Rosevear [Mon, 19 Jul 2004 20:07:18 +0000 (20:07 +0000)]
bump version, libtool number
2004-07-19 JP Rosevear <jpr@novell.com>
* configure.in: bump version, libtool number
Dan Winship [Mon, 19 Jul 2004 19:57:46 +0000 (19:57 +0000)]
Simplify this. If the message comes back from soup_connection_send_request
* libsoup/soup-session-sync.c (send_message): Simplify this. If
the message comes back from soup_connection_send_request not
FINISHED, get a new connection rather than reusing the old one.
This fixes a race condition in which a connection could end up
double-booked, and fixes the handling of messages that get
redirected to another server.
Dan Winship [Wed, 14 Jul 2004 15:21:07 +0000 (15:21 +0000)]
If the connection attempt succeeded, reserve the connection before
* libsoup/soup-session.c (connect_result): If the connection
attempt succeeded, reserve the connection before releasing
host_lock. Otherwise, another thread might find it in the
connection pool before the caller can queue a message on it.
#60693
* libsoup/soup-session-async.c (got_connection): Call
soup_connection_release(), since we don't have a specific message
in mind for the connection, so we need it to be considered idle.
* libsoup/soup-connection.c (soup_connection_release): New
function, to undo a soup_connection_reserve().
(soup_connection_send_request, soup_connection_reserve,
soup_connection_authenticate, soup_connection_reauthenticate):
Document these
Dan Winship [Mon, 12 Jul 2004 19:08:26 +0000 (19:08 +0000)]
signal the "connections available" condition after the message finishes.
* libsoup/soup-session-sync.c (send_message): signal the
"connections available" condition after the message finishes. Duh.
* libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
Dan Winship [Thu, 8 Jul 2004 20:31:15 +0000 (20:31 +0000)]
Revert previous change for now; it breaks the build on distros with older
* libsoup/soup-soap-response.c: Revert previous change for now; it
breaks the build on distros with older libxmls.
Dan Winship [Thu, 8 Jul 2004 18:15:37 +0000 (18:15 +0000)]
Basic SOAP test, using Aonaware's SOAP->DICT gateway
2004-07-08 Dan Winship <danw@novell.com>
* tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
gateway
2004-07-07 Fernando Herrera <fherrera@onirica.com>
* libsoup/soup-soap-response.c: (finalize), (init),
(soup_soap_response_from_string): Use a parse context for the
xml document, so we can safely use the option to ignore
blank spaces and '\n'.
Dan Winship [Wed, 7 Jul 2004 15:27:24 +0000 (15:27 +0000)]
if the protocol is http or https, require a hostname. For #61049
* libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
http or https, require a hostname. For #61049
* tests/uri-parsing.c (rel_tests, do_uri): Update for that
Dan Winship [Wed, 9 Jun 2004 15:25:59 +0000 (15:25 +0000)]
updated todo ideas
JP Rosevear [Thu, 3 Jun 2004 13:53:05 +0000 (13:53 +0000)]
bump version to 2.1.11, libtool number
2004-06-03 JP Rosevear <jpr@novell.com>
* configure.in: bump version to 2.1.11, libtool number
Dan Winship [Wed, 2 Jun 2004 14:07:23 +0000 (14:07 +0000)]
Redo the various IPv4/IPv6-abstracting macros to not use ?: expressions as
* libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
macros to not use ?: expressions as lvalues, since that's
apparently a GNU extension.
(soup_address_resolve_async): Use a timeout rather than an idle
handler to poll the dns result. (soup-dns really should be
rewritten to not require polling, but this is easier for now.)
#59240
* libsoup/soup-server.c (call_handler): Don't use GNU-only
non-constant structure initialization
Dan Winship [Wed, 2 Jun 2004 14:07:13 +0000 (14:07 +0000)]
Simple test of the dns code
* tests/dns.c: Simple test of the dns code
* tests/Makefile.am (noinst_PROGRAMS): build it
JP Rosevear [Wed, 19 May 2004 16:57:06 +0000 (16:57 +0000)]
bump version, libtool numbers
2004-05-19 JP Rosevear <jpr@novell.com>
* configure.in (SOUP_API_VERSION): bump version, libtool numbers
Dan Winship [Tue, 18 May 2004 21:57:50 +0000 (21:57 +0000)]
define some GError codes and stuff
* libsoup/soup-ssl.h:
* libsoup/soup-nossl.c: define some GError codes and stuff
* libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
(do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
appropriately.
* libsoup/soup-socket.c (soup_socket_write): Handle
SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
(#58434)
(read_from_network): Handle the reverse case (which would cause
hanging rather than spinning, and might be the cause of some
connector 1.5 slowness?)
Dan Winship [Tue, 11 May 2004 21:30:31 +0000 (21:30 +0000)]
Do this less kludgefully, using the magic of GClosure, to fix x86_64
* libsoup/soup-misc.c (soup_signal_connect_once): Do this less
kludgefully, using the magic of GClosure, to fix x86_64 problems
reported by snorp.
Sivaiah Nallagatla [Tue, 4 May 2004 15:02:46 +0000 (15:02 +0000)]
free the elements of priv structure before freeing priv
2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
* libsoup/soup-soap-message.c (finalize) : free
the elements of priv structure before freeing priv
Dan Winship [Tue, 20 Apr 2004 14:22:36 +0000 (14:22 +0000)]
if re-sending the message, call soup_message_restarted() (send_request):
* libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
re-sending the message, call soup_message_restarted()
(send_request): Connect to "restarted" signal, and remove the 401
handlers from there; doing it here didn't work because if the
connection was closed, the message would be re-sent on a new
connection, but would still have the handlers from the old
connection attached to it, which would make authentication fail.
* libsoup/soup-message-handlers.c (soup_message_run_handlers):
Copy the handler list before starting, to protect against handlers
that modify the handler list.
Dan Winship [Thu, 15 Apr 2004 17:33:23 +0000 (17:33 +0000)]
Connect to the socket's "disconnect" signal. (We were only doing this from
* libsoup/soup-connection.c (soup_connection_connect_sync):
Connect to the socket's "disconnect" signal. (We were only doing
this from the async version before, which meant that synchronous
SoupConnections could outlive their sockets and start causing
errors.) #57004
* libsoup/soup-connection-ntlm.c (send_request): Remove the old
Authorization header before adding a new one.
JP Rosevear [Fri, 2 Apr 2004 16:26:42 +0000 (16:26 +0000)]
bump version, libtool number
2004-04-02 JP Rosevear <jpr@ximian.com>
* configure.in: bump version, libtool number
Dan Winship [Mon, 15 Mar 2004 21:50:53 +0000 (21:50 +0000)]
Fix up types to kill a warning with -Wall -O2
* libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
types to kill a warning with -Wall -O2
JP Rosevear [Fri, 5 Mar 2004 18:34:58 +0000 (18:34 +0000)]
bump version, libtool number
2004-03-05 JP Rosevear <jpr@ximian.com>
* configure.in: bump version, libtool number
Dan Winship [Tue, 2 Mar 2004 18:26:42 +0000 (18:26 +0000)]
Only loop on EINTR if bytes_read is -1, since the value of errno is
* libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
bytes_read is -1, since the value of errno is irrelevant when
bytes_read is 0. Probably #54960.
Rodrigo Moya [Mon, 1 Mar 2004 07:41:47 +0000 (07:41 +0000)]
removed not-implemented function's prototype.
2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.h: removed not-implemented function's
prototype.
Rodney Dawes [Fri, 27 Feb 2004 16:15:01 +0000 (16:15 +0000)]
Use a different variable for linking to the static version of gnutls, so
2004-02-27 Rodney Dawes <dobey@ximian.com>
* configure.in:
* libsoup/Makefile.am: Use a different variable for linking to the
static version of gnutls, so we don't pull the .a files into the .pc
Fixes #53346
Dan Winship [Fri, 20 Feb 2004 14:54:49 +0000 (14:54 +0000)]
Pass gsize *, not guint *, to soup_socket_read/write, to make this work on
* libsoup/soup-message-io.c (read_metadata, read_body_chunk,
write_data): Pass gsize *, not guint *, to soup_socket_read/write,
to make this work on 64-bit platforms. (Grr. C type checking
sucks.) #54631
* tests/revserver.c: Likewise
Dan Winship [Fri, 20 Feb 2004 03:09:52 +0000 (03:09 +0000)]
update this a bunch
Rodrigo Moya [Wed, 18 Feb 2004 15:00:34 +0000 (15:00 +0000)]
Fixes #54512
2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
Fixes #54512
* libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
don't leak the value returned from xmlNodeGetContent().
(soup_soap_parameter_get_string_value,
soup_soap_parameter_get_property): return a g_strdup'ed
string, not the value returned by xmlNodeGetContent, so that
callers can use g_free, and not xmlFree.
* libsoup/soup-soap-response.h: made soup_parameter_get_property
not return const.
Dan Winship [Wed, 18 Feb 2004 14:19:44 +0000 (14:19 +0000)]
Likewise
* libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
Likewise
Dan Winship [Tue, 17 Feb 2004 18:09:54 +0000 (18:09 +0000)]
Fix a typo. #54433, from Mariano Suarez-Alvarez.
* libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
typo. #54433, from Mariano Suarez-Alvarez.
Rodney Dawes [Tue, 17 Feb 2004 16:51:26 +0000 (16:51 +0000)]
HTTP connections require a hostname, and we also hash on the host for
2004-02-17 Rodney Dawes <dobey@ximian.com>
* libsoup/soup-message.c (soup_message_new): HTTP connections require
a hostname, and we also hash on the host for message queueing in the
session, if the host is NULL we free the SoupUri and return NULL
Dan Winship [Sat, 14 Feb 2004 20:37:04 +0000 (20:37 +0000)]
Use POSIX-compliant "test $foo = bar", rather than GNU-only "test $foo ==
* configure.in: Use POSIX-compliant "test $foo = bar", rather than
GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
Joe Shaw [Fri, 13 Feb 2004 01:32:44 +0000 (01:32 +0000)]
Call read() in a do-while loop to prevent DNS errors from short reads.
2004-02-12 Joe Shaw <joe@ximian.com>
* libsoup/soup-dns.c (check_hostent): Call read() in a do-while
loop to prevent DNS errors from short reads.
Joe Shaw [Wed, 11 Feb 2004 16:34:32 +0000 (16:34 +0000)]
Bumped version number to 2.1.7 and libtool current.
2004-02-11 Joe Shaw <joe@ximian.com>
* configure.in: Bumped version number to 2.1.7 and libtool
current.
Dan Winship [Wed, 11 Feb 2004 15:51:54 +0000 (15:51 +0000)]
Update Joe's comment here with a gory explanation of exactly what's going
* libsoup/soup-connection.c (soup_connection_disconnect): Update
Joe's comment here with a gory explanation of exactly what's going
on. (It's not just an SSL bug either, it affects all connections.)
Joe Shaw [Tue, 10 Feb 2004 22:52:15 +0000 (22:52 +0000)]
Add a workaround for SSL connections which time-out but don't close the
2004-02-10 Joe Shaw <joe@ximian.com>
* libsoup/soup-connection.c (soup_connection_disconnect): Add a
workaround for SSL connections which time-out but don't close the
socket until we try sending data again later.
* libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
Don't free the sockaddr from soup_address_get_sockaddr(); we don't
own it, the SoupAddress does.
JP Rosevear [Mon, 9 Feb 2004 18:33:51 +0000 (18:33 +0000)]
Bump libtool numbers
2004-02-09 JP Rosevear <jpr@ximian.com>
* configure.in: Bump libtool numbers
Dan Winship [Fri, 6 Feb 2004 14:35:31 +0000 (14:35 +0000)]
Ref the filter when adding it. (soup_session_remove_filter): And unref it
* libsoup/soup-session.c (soup_session_add_filter): Ref the filter
when adding it.
(soup_session_remove_filter): And unref it here (we were already
unreffing it in dispose().)
Joe Shaw [Thu, 5 Feb 2004 22:30:38 +0000 (22:30 +0000)]
Don't try to free the hostent if it's NULL. (soup_dns_entry_check_lookup):
2004-02-05 Joe Shaw <joe@ximian.com>
* libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
hostent if it's NULL.
(soup_dns_entry_check_lookup): If the entry is resolved, but the
hostent is NULL, uncache it.
Dan Winship [Thu, 5 Feb 2004 15:31:45 +0000 (15:31 +0000)]
Always remove the WWW-Authenticate headers before returning, so the
* libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
remove the WWW-Authenticate headers before returning, so the
session won't fall back to Basic auth. Also, leave the connection
in the "authenticating" state rather than setting it to
"authenticated".
(ntlm_authorize_post): Only requeue the message if it's in the
"authenticating" state (and set it to "authenticated"). Fixes an
"unepectedly disconnected" error if authentication fails.
Dan Winship [Tue, 3 Feb 2004 21:37:22 +0000 (21:37 +0000)]
Call soup_message_io_stop so we don't get a callback on the io after it's
* libsoup/soup-message-io.c (io_cleanup): Call
soup_message_io_stop so we don't get a callback on the io after
it's been cleaned up.
* libsoup/soup-session.c (add_auth): Only remove the Authorization
header if we have another one to add. (Otherwise it messes up
SoupConnectionNTLM.)
Dan Winship [Tue, 3 Feb 2004 17:16:54 +0000 (17:16 +0000)]
Use memmove rather than memcpy here, since the source and destination will
* libsoup/soup-socket.c (read_from_buf): Use memmove rather than
memcpy here, since the source and destination will overlap if
*nread is small and read_buf->len is large. (Noticed by valgrind,
#53625.)
Joe Shaw [Mon, 2 Feb 2004 18:01:28 +0000 (18:01 +0000)]
Call gnutls_bye() with the GNUTLS_SHUT_WR flag (instead of RDWR) and check
2004-02-02 Joe Shaw <joe@ximian.com>
* libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
when there are no messages on the wire on a non-blocking socket.
This sends a SSL hangup message and then allows us to immediately
close the socket.
Rodrigo Moya [Fri, 30 Jan 2004 20:05:07 +0000 (20:05 +0000)]
bumped version number to 2.1.6.
2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
* configure.in: bumped version number to 2.1.6.
Rodrigo Moya [Thu, 29 Jan 2004 18:23:25 +0000 (18:23 +0000)]
new function.
2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
new function.
Rodrigo Moya [Thu, 29 Jan 2004 18:14:43 +0000 (18:14 +0000)]
removed 'const' from return type.
2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch]
(soup_soap_parameter_get_string_value): removed 'const' from return
type.
Joe Shaw [Thu, 29 Jan 2004 17:36:57 +0000 (17:36 +0000)]
Initialize the certificate before we try to use it. Ahem.
2004-01-29 Joe Shaw <joe@ximian.com>
* libsoup/soup-gnutls.c (verify_certificate): Initialize the
certificate before we try to use it. Ahem.
Joe Shaw [Mon, 26 Jan 2004 16:51:39 +0000 (16:51 +0000)]
forgot these on friday
Joe Shaw [Wed, 21 Jan 2004 23:10:29 +0000 (23:10 +0000)]
Require at least GnuTLS 1.0.0.
2004-01-21 Joe Shaw <joe@ximian.com>
* configure.in: Require at least GnuTLS 1.0.0.
* libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
functions.
(verify_certificate): Use gnutls_x509_crt_import() and
gnutls_x509_crt_check_hostname() instead of
gnutls_x509_check_certificates_hostname().
(init_dh_params): Use gnutls_dh_params_generate2() instead of
gnutls_dh_params_generate() and gnutls_dh_params_set().
Joe Shaw [Tue, 20 Jan 2004 21:18:52 +0000 (21:18 +0000)]
gnutls_bye() doesn't close the socket itself, so we need to do it or else
2004-01-20 Joe Shaw <joe@ximian.com>
* libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
close the socket itself, so we need to do it or else our
connections stay in CLOSE_WAIT forever.
Jacob Leach [Mon, 19 Jan 2004 18:30:23 +0000 (18:30 +0000)]
builddir != srcdir fix.
Joe Shaw [Wed, 14 Jan 2004 21:15:07 +0000 (21:15 +0000)]
Remove the check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
2004-01-14 Joe Shaw <joe@ximian.com>
* libsoup/soup-gnutls.c (verify_certificate): Remove the
check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
JP Rosevear [Mon, 12 Jan 2004 16:01:12 +0000 (16:01 +0000)]
bump version and libtool revision
2004-01-12 JP Rosevear <jpr@ximian.com>
* configure.in: bump version and libtool revision
Dan Winship [Mon, 12 Jan 2004 14:55:22 +0000 (14:55 +0000)]
Add a g_thread_init() so this works again.
* tests/simple-httpd.c (main): Add a g_thread_init() so this works
again.
Larry Ewing [Sat, 10 Jan 2004 17:14:32 +0000 (17:14 +0000)]
use LIBGNUTLS_LIBS in the substitution string.
2004-01-10 Larry Ewing <lewing@ximian.com>
* libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
string.
Joe Shaw [Fri, 9 Jan 2004 21:30:04 +0000 (21:30 +0000)]
Include the libgnutls.m4 file.
2004-01-09 Joe Shaw <joe@ximian.com>
* acinclude.m4: Include the libgnutls.m4 file.
* configure.in: Remove manual checking for libgnutls-config and
use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
version, which is 0.9.7 for now.
* libsoup/Makefile.am: Some changes for the above change.
* libsoup/soup-gnutls.c: Check for HAVE_SSL, not
HAVE_GNUTLS_GNUTLS_H.
(verify_certificate): Uncomment the SSL certificate hostname
check.
* libsoup/soup-session.c (set_property): Be smart about flushing
our SSL credentials only when the CA file is set to something
different than it was before.
Harish Krishnaswamy [Fri, 9 Jan 2004 16:14:04 +0000 (16:14 +0000)]
allow soup_soap_response_from_string to ignore header element if present
while forming response objects in soup-soap-response.c
Harish Krishnaswamy [Fri, 9 Jan 2004 16:05:57 +0000 (16:05 +0000)]
added code to soup_soap_response_from_string to ignore header element
while forming response objects, if they are present.
Dan Winship [Mon, 5 Jan 2004 16:25:54 +0000 (16:25 +0000)]
Remove no-longer-relevant socklen_t check
* configure.in: Remove no-longer-relevant socklen_t check
* libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
Marcus Clarke, #52566)
* libsoup/soup-dns.c: Likewise
JP Rosevear [Mon, 29 Dec 2003 15:23:03 +0000 (15:23 +0000)]
bump version and libtool number
2003-12-29 JP Rosevear <jpr@ximian.com>
* configure.in: bump version and libtool number
Dan Winship [Mon, 22 Dec 2003 18:49:49 +0000 (18:49 +0000)]
Update these
* README, TODO: Update these
Dan Winship [Mon, 22 Dec 2003 18:09:34 +0000 (18:09 +0000)]
Lots of thread-safety stuff, primarly so you can disconnect a socket from
* libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
you can disconnect a socket from one thread while doing I/O in
another.
* libsoup/soup-message-io.c (soup_message_io_cancel): Split into
soup_message_io_stop() and io_cleanup(), to separate out the "stop
reading/writing" and "free data" phases to allow thread-safe
synchronous cancellation.
(soup_message_io_finished): call both soup_message_io_stop() and
io_cleanup()
(io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
doesn't already have a transport error status (eg, CANCELLED).
(new_iostate): Call io_cleanup() if needed.
* libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
clearer that it's not a status.
* libsoup/soup-message.c (finalize, restarted, finished,
soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
(soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
* libsoup/soup-connection.c (send_request): Remove
soup_message_io_cancel call.
* libsoup/soup-session-sync.c (send_message): Connect to the
connection's "disconnected" signal rather than using a weak ref,
since that's what we really care about, and it's possible that the
connection may have an extra ref on it somewhere that would keep
it from being destroyed even if it was disconnected.
Joe Shaw [Sat, 20 Dec 2003 17:54:59 +0000 (17:54 +0000)]
If const_path is NULL un the non-proxy case, then use the root ("/").
2003-12-20 Joe Shaw <joe@ximian.com>
* libsoup/soup-session.c (lookup_auth): If const_path is NULL un
the non-proxy case, then use the root ("/").
Dan Winship [Fri, 19 Dec 2003 20:54:38 +0000 (20:54 +0000)]
New. An interface for objects that want to act on every message passing
* libsoup/soup-message-filter.c: New. An interface for objects
that want to act on every message passing through a session.
(Initially being used for authentication, but could also be used
for cache handling, cookie management, etc.)
* libsoup/soup-connection.c (class_init, etc): Add a message
filter property.
(send_request): If the connection has a message filter set, run
it on the message before sending it.
(soup_connection_connect_async, etc): When setting up a tunnel, if
we get back a 407 and the session tries to requeue the message,
either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
whether or not the proxy closed the connection).
(soup_connection_connect_sync): Likewise
(send_request, request_done): Ref/unref the connection
* libsoup/soup-session.c (soup_session_get_type): Implement the
SoupMessageFilter interface.
(soup_session_get_connection): Use the session as the connection's
message filter
(soup_session_add_filter, soup_session_remove_filter): Add/remove
filters from the session
(setup_message): do auth handling, and call each of the session's
filters' setup_message methods as well.
(soup_session_send_message_via): No longer needed.
(connect_result): Handle SOUP_STATUS_TRY_AGAIN.
* libsoup/soup-session-async.c (run_queue): Use
soup_connection_send_request, since soup_session_send_message_via
is gone now.
* libsoup/soup-session-sync.c (send_message): Likewise
* libsoup/soup-message.c (soup_message_is_keepalive): A successful
response to a CONNECT is always keepalive, even if it's HTTP/1.0
with no Connection header.
* libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
* libsoup/soup-types.h: Add SoupMessageFilter, and macros for
gobject interface types.
* tests/get.c (main): Add a -p flag to specify a proxy
* tests/simple-proxy.c: Fix #includes
Dan Winship [Thu, 18 Dec 2003 21:36:01 +0000 (21:36 +0000)]
Actually disconnect the socket rather than just unreffing it, since the IO
* libsoup/soup-connection.c (soup_connection_disconnect): Actually
disconnect the socket rather than just unreffing it, since the IO
code may be holding an extra ref on it.
(send_request): connect to the "restarted" signal too
(request_restarted): Deal with "Connection: close"
* libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
not go into an infinite loop if the server only supports Basic.
Dan Winship [Wed, 17 Dec 2003 21:18:09 +0000 (21:18 +0000)]
comment out some code that doesn't work currently
Rodrigo Moya [Wed, 17 Dec 2003 20:13:40 +0000 (20:13 +0000)]
install soup-message-queue.h with the rest
2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/Makefile.am: install soup-message-queue.h with the rest
Dan Winship [Wed, 17 Dec 2003 20:01:41 +0000 (20:01 +0000)]
remove some dead code to make this compile
Dan Winship [Wed, 17 Dec 2003 19:49:14 +0000 (19:49 +0000)]
Add gthread to glib check
* configure.in: Add gthread to glib check
* libsoup/soup-session.c: Make this an abstract class.
* libsoup/soup-session-async.c: A SoupSession class for
asynchronous gmain-based operation; replaces the old SoupSession.
* libsoup/soup-session-sync.c: A SoupSession class for synchronous
blocking operation for use with threaded apps.
* libsoup/soup-types.h, libsoup/soup.h: add the new session
subclasses
* libsoup/soup-connection.c (soup_connection_connect_sync): Don't
try to unref the socket if the socket creation fails.
(soup_connection_reserve): New, to explicitly mark a connection as
being in use without queueing a message on it.
* libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
"block" flag to not be reversed.
* libsoup/soup-message.c (finished): set status to FINISHED here.
(soup_message_cancel): Gone; needs to be done at the session
level.
* libsoup/soup-message-queue.c: Add a mutex and make all of the
operations thread-safe.
* libsoup/soup-socket.c (disconnect_internal): Make this
thread-safe.
(soup_socket_connect): Make the sync case work correctly.
* libsoup/Makefile.am: add the SoupSession subclasses
* tests/Makefile.am: libsoup depends on libgthread now, so
revserver doesn't need to explicitly.
* tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
soup_session_async_new().
Rodrigo Moya [Tue, 16 Dec 2003 17:42:56 +0000 (17:42 +0000)]
new function.
2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
new function.
Rodrigo Moya [Tue, 16 Dec 2003 17:42:32 +0000 (17:42 +0000)]
new function.
2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
new function.
Joe Shaw [Tue, 16 Dec 2003 17:33:00 +0000 (17:33 +0000)]
Only set up a tunnel if the destination protocol is HTTPS.
2003-12-16 Joe Shaw <joe@ximian.com>
* libsoup/soup-connection.c (socket_connect_result,
soup_connection_connect_sync): Only set up a tunnel if the
destination protocol is HTTPS.
* libsoup/soup-message.c (class_init): Add a default handler for
wrote_body.
(wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
(soup_message_cancel): Don't set the status to
SOUP_STATUS_CANCELLED and call soup_message_finished() if the
status is already SOUP_MESSAGE_STATUS_FINISHED.
* libsoup/soup-session.c (set_property): Don't cancel the session
if the proxy URI set as a property isn't different from the old
one.
(get_host_for_message): Refactor some code so that we can easily
get the right SoupSessionHost for proxies as well as from the
message.
(authenticate_auth): Take a gboolean proxy parameter. Check it to
see which URI (message URI or proxy URI) to use for
authentication. Add a long comment about lack of clarity in RFC
2617 with respect to proxies and protection spaces.
Dan Winship [Mon, 15 Dec 2003 14:04:14 +0000 (14:04 +0000)]
s/guint/gsize/ to match the definitions in soup-socket.c. #52167.
* libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
soup_socket_write): s/guint/gsize/ to match the definitions in
soup-socket.c. #52167.
Rodrigo Moya [Fri, 12 Dec 2003 15:23:04 +0000 (15:23 +0000)]
removed debugging of the messages here.
2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.c: removed debugging of the messages here.
Rodrigo Moya [Fri, 12 Dec 2003 13:54:54 +0000 (13:54 +0000)]
added information for SOAP-ENV namespace.
2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
added information for SOAP-ENV namespace.
Dan Winship [Wed, 10 Dec 2003 18:35:25 +0000 (18:35 +0000)]
if we receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
* libsoup/soup-message-client-io.c (parse_response_headers): if we
receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
message's http_version so the keep-alive handling is correct.
Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
* libsoup/soup-message.c (soup_message_restarted, etc): Add a
"restarted" signal as suggested by Joe.
* libsoup/soup-message-io.c (soup_message_io_finished): emit
either "restarted" or "finished" as appropriate
* libsoup/soup-session.c (soup_session_queue_message): Connect to
"restarted" and run the queue if a message gets restarted
* libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
like.
Tambet Ingo [Wed, 10 Dec 2003 17:45:26 +0000 (17:45 +0000)]
Use autoconfig to check for socklen_t ...
2003-12-10 Tambet Ingo <tambet@ximian.com>
* configure.in: Use autoconfig to check for socklen_t ...
* libsoup/soup-address.c: ... and remove it from here ...
* libsoup/soup-dns.c: ... and here.