platform/upstream/libsoup.git
19 years agoupdate
Dan Winship [Thu, 14 Apr 2005 20:38:23 +0000 (20:38 +0000)]
update

19 years agoRemove the various gethostbyname_r checks and just check for
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)

19 years agorequire glib-2.0 >= 2.4.0
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)

19 years agobump version to 2.3.0. bump SOUP_API_VERSION to 2.4
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/

19 years agobelatedly pull up changes from gnome-2-10 branch
Dan Winship [Mon, 11 Apr 2005 15:13:06 +0000 (15:13 +0000)]
belatedly pull up changes from gnome-2-10 branch

19 years ago** See ximian bug #70323.
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.

19 years agoupdate
Dan Winship [Wed, 6 Oct 2004 19:16:08 +0000 (19:16 +0000)]
update

19 years agooops, forgot to save after adding bug #
Dan Winship [Wed, 6 Oct 2004 17:21:46 +0000 (17:21 +0000)]
oops, forgot to save after adding bug #

19 years agoadd SOUP_SSL_ERROR_CERTIFICATE.
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.

19 years agoAdd this, with some extra initialization needed for libgcrypt 1.2 or
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().

19 years agoadd some things
Dan Winship [Tue, 31 Aug 2004 19:08:18 +0000 (19:08 +0000)]
add some things

19 years agoBump version to 2.2.0. LIBSOUP_2_2_0
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.

19 years agoUpdate this to reflect the last 2 years.
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

19 years agoadd/fix lots of gtk-doc comments
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...

19 years agobump version, libtool number LIBSOUP_2_1_13
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

19 years agoDon't use conn after emitting the "connect_result" signal, since it might
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.

19 years agoAdd flag "broken_encoding" to SoupUri.
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.

20 years agobump version, libtool number LIBSOUP_2_1_12
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

20 years agoSimplify this. If the message comes back from soup_connection_send_request
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.

20 years agoIf the connection attempt succeeded, reserve the connection before
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

20 years agosignal the "connections available" condition after the message finishes.
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

20 years agoRevert previous change for now; it breaks the build on distros with older
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.

20 years agoBasic SOAP test, using Aonaware's SOAP->DICT gateway
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'.

20 years agoif the protocol is http or https, require a hostname. For #61049
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

20 years agoupdated todo ideas
Dan Winship [Wed, 9 Jun 2004 15:25:59 +0000 (15:25 +0000)]
updated todo ideas

20 years agobump version to 2.1.11, libtool number LIBSOUP_2_1_11
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

20 years agoRedo the various IPv4/IPv6-abstracting macros to not use ?: expressions as
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

20 years agoSimple test of the dns code
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

20 years agobump version, libtool numbers LIBSOUP_2_1_10
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

20 years agodefine some GError codes and stuff
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?)

20 years agoDo this less kludgefully, using the magic of GClosure, to fix x86_64
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.

20 years agofree the elements of priv structure before freeing priv
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

20 years agoif re-sending the message, call soup_message_restarted() (send_request):
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.

20 years agoConnect to the socket's "disconnect" signal. (We were only doing this from
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.

20 years agobump version, libtool number LIBSOUP_2_1_9
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

20 years agoFix up types to kill a warning with -Wall -O2
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

20 years agobump version, libtool number LIBSOUP_2_1_8
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

20 years agoOnly loop on EINTR if bytes_read is -1, since the value of errno is
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.

20 years agoremoved not-implemented function's prototype.
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.

20 years agoUse a different variable for linking to the static version of gnutls, so
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

20 years agoPass gsize *, not guint *, to soup_socket_read/write, to make this work on
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

20 years agoupdate this a bunch libsoup-hacking-branch-base
Dan Winship [Fri, 20 Feb 2004 03:09:52 +0000 (03:09 +0000)]
update this a bunch

20 years agoFixes #54512
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.

20 years agoLikewise
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

20 years agoFix a typo. #54433, from Mariano Suarez-Alvarez.
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.

20 years agoHTTP connections require a hostname, and we also hash on the host for
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

20 years agoUse POSIX-compliant "test $foo = bar", rather than GNU-only "test $foo ==
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.

20 years agoCall read() in a do-while loop to prevent DNS errors from short reads.
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.

20 years agoBumped version number to 2.1.7 and libtool current. LIBSOUP_2_1_7
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.

20 years agoUpdate Joe's comment here with a gory explanation of exactly what's going
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.)

20 years agoAdd a workaround for SSL connections which time-out but don't close the
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.

20 years agoBump libtool numbers LIBSOUP_2_1_6
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

20 years agoRef the filter when adding it. (soup_session_remove_filter): And unref it
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().)

20 years agoDon't try to free the hostent if it's NULL. (soup_dns_entry_check_lookup):
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.

20 years agoAlways remove the WWW-Authenticate headers before returning, so the
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.

20 years agoCall soup_message_io_stop so we don't get a callback on the io after it's
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.)

20 years agoUse memmove rather than memcpy here, since the source and destination will
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.)

20 years agoCall gnutls_bye() with the GNUTLS_SHUT_WR flag (instead of RDWR) and check
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.

20 years agobumped version number to 2.1.6.
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.

20 years agonew function.
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.

20 years agoremoved 'const' from return type.
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.

20 years agoInitialize the certificate before we try to use it. Ahem.
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.

20 years agoforgot these on friday
Joe Shaw [Mon, 26 Jan 2004 16:51:39 +0000 (16:51 +0000)]
forgot these on friday

20 years agoRequire at least GnuTLS 1.0.0. LIBSOUP_2_1_5
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().

20 years agognutls_bye() doesn't close the socket itself, so we need to do it or else
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.

20 years agobuilddir != srcdir fix.
Jacob Leach [Mon, 19 Jan 2004 18:30:23 +0000 (18:30 +0000)]
builddir != srcdir fix.

20 years agoRemove the check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
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.

20 years agobump version and libtool revision LIBSOUP_2_1_4
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

20 years agoAdd a g_thread_init() so this works again.
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.

20 years agouse LIBGNUTLS_LIBS in the substitution string.
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.

20 years agoInclude the libgnutls.m4 file.
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.

20 years agoallow soup_soap_response_from_string to ignore header element if present
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

20 years agoadded code to soup_soap_response_from_string to ignore header element
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.

20 years agoRemove no-longer-relevant socklen_t check
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

20 years agobump version and libtool number LIBSOUP_2_1_3
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

20 years agoUpdate these
Dan Winship [Mon, 22 Dec 2003 18:49:49 +0000 (18:49 +0000)]
Update these

* README, TODO: Update these

20 years agoLots of thread-safety stuff, primarly so you can disconnect a socket from
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.

20 years agoIf const_path is NULL un the non-proxy case, then use the root ("/").
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 ("/").

20 years agoNew. An interface for objects that want to act on every message passing
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

20 years agoActually disconnect the socket rather than just unreffing it, since the IO
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.

20 years agocomment out some code that doesn't work currently
Dan Winship [Wed, 17 Dec 2003 21:18:09 +0000 (21:18 +0000)]
comment out some code that doesn't work currently

20 years agoinstall soup-message-queue.h with the rest
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

20 years agoremove some dead code to make this compile
Dan Winship [Wed, 17 Dec 2003 20:01:41 +0000 (20:01 +0000)]
remove some dead code to make this compile

20 years agoAdd gthread to glib check
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().

20 years agonew function.
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.

20 years agonew 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.

20 years agoOnly set up a tunnel if the destination protocol is HTTPS.
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.

20 years agos/guint/gsize/ to match the definitions in soup-socket.c. #52167.
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.

20 years agoremoved debugging of the messages here.
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.

20 years agoadded information for SOAP-ENV namespace.
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.

20 years agoif we receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
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.

20 years agoUse autoconfig to check for socklen_t ...
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.

20 years agoprint out request/response's contents, if in debug mode.
Rodrigo Moya [Tue, 9 Dec 2003 17:45:58 +0000 (17:45 +0000)]
print out request/response's contents, if in debug mode.

2003-12-09  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-message.c (soup_soap_message_persist):
(soup_soap_message_parse_response): print out request/response's
contents, if in debug mode.

20 years agoBump version LIBSOUP_2_1_2
JP Rosevear [Sun, 7 Dec 2003 18:27:48 +0000 (18:27 +0000)]
Bump version

2003-12-07  JP Rosevear  <jpr@ximian.com>

* configure.in: Bump version

20 years agonew functions to manage SoupSoapParameter's children.
Rodrigo Moya [Fri, 28 Nov 2003 11:58:04 +0000 (11:58 +0000)]
new functions to manage SoupSoapParameter's children.

2003-11-28  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.[ch]
(soup_soap_parameter_get_first_child,
soup_soap_parameter_get_first_child_by_name,
soup_soap_parameter_get_next_child,
soup_soap_parameter_get_next_child_by_name): new functions to
manage SoupSoapParameter's children.
(soup_soap_response_get_first_parameter): dont return a GList, but
a SoupSoapParameter contained in the GList.

20 years agonew function.
Rodrigo Moya [Wed, 26 Nov 2003 15:48:59 +0000 (15:48 +0000)]
new function.

2003-11-26  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.[ch]
(soup_soap_parameter_get_string_value): new function.

20 years agoadded SoupSoapParameter structure, to "hide" the usage of xmlNode's.
Rodrigo Moya [Wed, 26 Nov 2003 15:23:37 +0000 (15:23 +0000)]
added SoupSoapParameter structure, to "hide" the usage of xmlNode's.

2003-11-26  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.[ch]: added SoupSoapParameter
structure, to "hide" the usage of xmlNode's.
(soup_soap_parameter_get_name): functions to manage SOAP
response parameters.
(soup_soap_response_get_first_parameter,
soup_soap_response_get_first_parameter_by_name,
soup_soap_response_get_next_parameter,
soup_soap_response_get_next_parameter_by_name):
new functions for an easy access to the response's parameters.
(soup_soap_response_from_string): removed warnings.

20 years agofixed typo.
Rodrigo Moya [Tue, 25 Nov 2003 22:45:23 +0000 (22:45 +0000)]
fixed typo.

2003-11-25  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
fixed typo.

20 years agonew functions. (finalize): NULL out new private fields.
Rodrigo Moya [Tue, 25 Nov 2003 22:05:34 +0000 (22:05 +0000)]
new functions. (finalize): NULL out new private fields.

2003-11-25  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
soup_soap_response_set_method_name, soup_soap_message_get_parameters):
new functions.
(finalize): NULL out new private fields.
(soup_soap_response_from_string): added validation code.

20 years agonew class for managing SOAP responses.
Rodrigo Moya [Mon, 24 Nov 2003 17:50:17 +0000 (17:50 +0000)]
new class for managing SOAP responses.

2003-11-23  Rodrigo Moya <rodrigo@ximian.com>

* libsoup/soup-soap-response.[ch]: new class for managing SOAP
responses.

* libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
new function.

* libsoup/Makefile.am: added new files.