platform/upstream/libsoup.git
21 years agounref the old read_tag before changing/clearing it.
Dan Winship [Mon, 23 Jun 2003 15:52:34 +0000 (15:52 +0000)]
unref the old read_tag before changing/clearing it.

        * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
        old read_tag before changing/clearing it.
        (soup_queue_write_done_cb): Likewise with the write_tag.

        * libsoup/soup-transfer.c (issue_final_callback): ref the reader
        around the stop+callback.
        (soup_transfer_write_cb): Likewise.

21 years agoadd a ref_count field. (soup_transfer_read, create_writer): Set initial
Dan Winship [Tue, 17 Jun 2003 12:24:12 +0000 (12:24 +0000)]
add a ref_count field. (soup_transfer_read, create_writer): Set initial

        * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
        ref_count field.
        (soup_transfer_read, create_writer): Set initial ref_count to 2
        (one for soup-transfer, one for the caller).
        (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
        reader
        (soup_transfer_read_stop): Clears the GIOChannel callbacks and
        drops soup-transfer's ref.
        (soup_transfer_read_cancel): Now just a stop+unref
        (soup_transfer_write_ref, soup_transfer_write_unref,
        soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.

        * libsoup/soup-message.c (soup_message_cleanup): when setting up
        the "finish reading" callbacks, unref the reader so it will be
        destroyed once it's done reading.
        (soup_message_requeue): Likewise.

        * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
        prototype change (no longer returns a SoupTransferDone).
        (soup_queue_read_chunk_cb): Likewise.

        * libsoup/soup-server.c (read_headers_cb): Likewise

21 years agoChange all functions to take a SoupReader * or SoupWriter * instead of a
Dan Winship [Wed, 11 Jun 2003 18:11:31 +0000 (18:11 +0000)]
Change all functions to take a SoupReader * or SoupWriter * instead of a

        * libsoup/soup-transfer.c: Change all functions to take a
        SoupReader * or SoupWriter * instead of a guint.

        * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
        write_tag pointers instead of guints.

21 years agoremove #include for soup-nss.h LIBSOUP_1_99_23
Chris Toshok [Mon, 2 Jun 2003 20:47:19 +0000 (20:47 +0000)]
remove #include for soup-nss.h

2003-06-02  Chris Toshok  <toshok@ximian.com>

* libsoup/soup-ssl.c: remove #include for soup-nss.h

21 years agoremove NSS_CFLAGS. (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
Chris Toshok [Mon, 2 Jun 2003 20:42:59 +0000 (20:42 +0000)]
remove NSS_CFLAGS. (libsoup_2_0_la_LIBADD): remove NSS_LIBS.

2003-06-02  Chris Toshok  <toshok@ximian.com>

* libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
(libsoup_2_0_la_LIBADD): remove NSS_LIBS.
(libsoup_2_0_la_SOURCES): remove soup-nss.[ch]

21 years agoBump version to 1.99.23.
Chris Toshok [Mon, 2 Jun 2003 20:18:55 +0000 (20:18 +0000)]
Bump version to 1.99.23.

2003-06-02  Chris Toshok  <toshok@ximian.com>

* configure.in: Bump version to 1.99.23.

21 years agoalways force a reconnect when there's an error with ssl connection. This
Chris Toshok [Mon, 2 Jun 2003 20:17:29 +0000 (20:17 +0000)]
always force a reconnect when there's an error with ssl connection. This

2003-05-30  Chris Toshok  <toshok@ximian.com>

* libsoup/soup-queue.c (soup_queue_error_cb): always force a
reconnect when there's an error with ssl connection.  This fixes
#43387, but it runs the risk of sending requests multiple times to
the exchange server, and it results in lots of shorter lived
connections and more forking (in the ssl proxy case), depending on
the length of the operation.

21 years ago1.99.22 (codename: French Onion Soup) LIBSOUP_1_99_22
Dan Winship [Wed, 21 May 2003 12:23:11 +0000 (12:23 +0000)]
1.99.22 (codename: French Onion Soup)

* configure.in: 1.99.22 (codename: French Onion Soup)

21 years agoClear the write_tag as well so we don't double-cancel it. #43395.
Dan Winship [Wed, 21 May 2003 05:01:51 +0000 (05:01 +0000)]
Clear the write_tag as well so we don't double-cancel it. #43395.

        * libsoup/soup-message.c (soup_message_requeue): Clear the
        write_tag as well so we don't double-cancel it. #43395.

        * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
        be destroyed by the end of the func, so we have to call
        soup_connection_set_used at the beginning.

        * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
        Call g_set_error() so that we don't SEGV immediately after
        returning G_IO_STATUS_ERROR.

21 years agofile soup-proxy-connection.c was initially added on branch soup-refactoring.
Dan Winship [Thu, 15 May 2003 13:27:07 +0000 (13:27 +0000)]
file soup-proxy-connection.c was initially added on branch soup-refactoring.

21 years agofile soup-proxy-connection.h was initially added on branch soup-refactoring.
Dan Winship [Thu, 15 May 2003 13:27:07 +0000 (13:27 +0000)]
file soup-proxy-connection.h was initially added on branch soup-refactoring.

21 years agoBump version to 1.99.21
Joe Shaw [Fri, 9 May 2003 16:34:44 +0000 (16:34 +0000)]
Bump version to 1.99.21

2003-05-08  Joe Shaw  <joe@ximian.com>

* configure.in: Bump version to 1.99.21

* libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
tunnelling fails, the other message which shares our same
connection will free it first, so set ours to NULL.

21 years agoIf the auth status is PENDING, return an NTLM request string. Otherwise
Dan Winship [Fri, 9 May 2003 15:25:33 +0000 (15:25 +0000)]
If the auth status is PENDING, return an NTLM request string. Otherwise

* libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
return an NTLM request string. Otherwise return the "response"
field (which should include the NTLM authenticate message)
(ntlm_init): Don't bother setting "response" to the NTLM request
string. Just leave it NULL in that case.

* libsoup/soup-message.c (authorize_handler): Never try to reuse
an NTLM auth returned from soup_auth_lookup. Only set the auth on
the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
call soup_auth_set_context() on it just like for non-NTLM auth.
The net effect of all of this is that now we record when a context
needs NTLM auth just like with non-NTLM auth, so that that info
gets preserved across connections.
(soup_message_requeue): No longer need the hackery here to
preserve the connection auth state.

* libsoup/soup-context.c (soup_connection_set_in_use): New, to
toggle the connection's in_use flag, and set up the death watch
when it's not in use.
(connection_death): This is only hooked up when the connection is
not in use now, so don't need to check that. Should fix the
infinite connection_death loop.
(soup_connection_is_new): Keep a distinct "new" flag rather than
defining "new" as "has been released at least once".
(soup_connection_set_used): Mark a connection no-longer new.
(soup_context_connect_cb): Mark the connection as new. Don't set
up the death watch since it's in_use.
(try_existing_connections): Use soup_connection_set_in_use.
(soup_connection_release): Likewise

* libsoup/soup-message.c (requeue_read_finished): Call
soup_connection_set_used so that the connection isn't still
considered new when we send the message the second time.

* libsoup/soup-queue.c (soup_queue_error_cb): Call
soup_connection_set_used (assuming we don't close the connection)
(soup_queue_read_done_cb): Likewise.

* libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
nothing, call soup_transfer_read_error_cb rather than just
cancelling, or else it will get cancelled again later.

21 years agoDon't put @OPENSSL_LIBS@ here; the library doesn't depend on them, only
Dan Winship [Wed, 7 May 2003 17:49:33 +0000 (17:49 +0000)]
Don't put @OPENSSL_LIBS@ here; the library doesn't depend on them, only

* soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
library doesn't depend on them, only the proxy does. #42473

21 years agoChange the redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
Dan Winship [Tue, 6 May 2003 13:00:52 +0000 (13:00 +0000)]
Change the redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for

* src/libsoup/soup-message.c (global_handlers): Change the
redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
for "Location" to get around the non-64-bit-clean union
initialization pointed out by Jeremy Katz <katzj@redhat.com>.
(redirect_handler): Update for that.

21 years ago1.99.20 LIBSOUP_1_99_20
Dan Winship [Tue, 29 Apr 2003 16:02:24 +0000 (16:02 +0000)]
1.99.20

        * configure.in: 1.99.20

        * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
        we always call UNIGNORE_CANCEL. Might fix #41971

21 years ago1.99.19 (the all 1s and 9s release) LIBSOUP_1_99_19
Dan Winship [Mon, 28 Apr 2003 18:50:29 +0000 (18:50 +0000)]
1.99.19 (the all 1s and 9s release)

* configure.in: 1.99.19 (the all 1s and 9s release)

21 years agoif an old connection suddenly gets an io error while reading or writing,
Dan Winship [Fri, 25 Apr 2003 17:34:08 +0000 (17:34 +0000)]
if an old connection suddenly gets an io error while reading or writing,

        * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
        suddenly gets an io error while reading or writing, assume it's a
        timeout or something, close the connection, and requeue the
        message.

21 years agoDon't set up the soup-transfer callbacks to keep reading off the
Dan Winship [Thu, 24 Apr 2003 17:59:02 +0000 (17:59 +0000)]
Don't set up the soup-transfer callbacks to keep reading off the

        * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
        soup-transfer callbacks to keep reading off the connection unless
        we're actually going to keep the connection around afterward.
        Otherwise we can just close it.

        * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
        thingy so that it's possible to cancel a read from inside a
        callback so that the above change actually works instead of just
        crashing.

21 years agoUp version to 1.99.18 Line separator after GNUTLS_CFLAGS
Rodney Dawes [Mon, 21 Apr 2003 16:06:29 +0000 (16:06 +0000)]
Up version to 1.99.18 Line separator after GNUTLS_CFLAGS

2003-04-20  Rodney Dawes  <dobey@ximian.com>

* configure.in: Up version to 1.99.18
* libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS

21 years agofile soup-proxy-auth-context.c was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:31 +0000 (13:42 +0000)]
file soup-proxy-auth-context.c was initially added on branch soup-refactoring.

21 years agofile soup-proxy-auth-context.h was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:31 +0000 (13:42 +0000)]
file soup-proxy-auth-context.h was initially added on branch soup-refactoring.

21 years agofile soup-www-auth-context.c was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:31 +0000 (13:42 +0000)]
file soup-www-auth-context.c was initially added on branch soup-refactoring.

21 years agofile soup-www-auth-context.h was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:31 +0000 (13:42 +0000)]
file soup-www-auth-context.h was initially added on branch soup-refactoring.

21 years agofile soup-auth-context.c was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:30 +0000 (13:42 +0000)]
file soup-auth-context.c was initially added on branch soup-refactoring.

21 years agofile soup-auth-context.h was initially added on branch soup-refactoring.
Dan Winship [Mon, 21 Apr 2003 13:42:30 +0000 (13:42 +0000)]
file soup-auth-context.h was initially added on branch soup-refactoring.

21 years agofile soup-server-cgi.c was initially added on branch soup-refactoring.
Dan Winship [Fri, 18 Apr 2003 20:39:10 +0000 (20:39 +0000)]
file soup-server-cgi.c was initially added on branch soup-refactoring.

21 years agofile soup-server-cgi.h was initially added on branch soup-refactoring.
Dan Winship [Fri, 18 Apr 2003 20:39:10 +0000 (20:39 +0000)]
file soup-server-cgi.h was initially added on branch soup-refactoring.

21 years agofile soup-server-tcp.c was initially added on branch soup-refactoring.
Dan Winship [Fri, 18 Apr 2003 20:39:10 +0000 (20:39 +0000)]
file soup-server-tcp.c was initially added on branch soup-refactoring.

21 years agofile soup-server-tcp.h was initially added on branch soup-refactoring.
Dan Winship [Fri, 18 Apr 2003 20:39:10 +0000 (20:39 +0000)]
file soup-server-tcp.h was initially added on branch soup-refactoring.

21 years agoNew function to close all idle connections. (Needed for #41117 or else
Dan Winship [Fri, 11 Apr 2003 17:02:29 +0000 (17:02 +0000)]
New function to close all idle connections. (Needed for #41117 or else

* libsoup/soup-context.c (soup_connection_purge_idle): New
function to close all idle connections. (Needed for #41117 or else
there's no way to force-discard NTLM authentication.)

* libsoup/soup-queue.c (soup_queue_shutdown): Use it

21 years agoproxy_https_connect_cb() might not get called if connecting to the proxy
Joe Shaw [Thu, 10 Apr 2003 21:48:37 +0000 (21:48 +0000)]
proxy_https_connect_cb() might not get called if connecting to the proxy

2003-04-10  Joe Shaw  <joe@ximian.com>

* libsoup/soup-queue.c (proxy_https_connect):
proxy_https_connect_cb() might not get called if connecting to the
proxy fails, and it causes us to double-free the connection.
Always set the message's connection to NULL before freeing it.

21 years ago*** empty log message ***
Joe Shaw [Thu, 10 Apr 2003 21:48:28 +0000 (21:48 +0000)]
*** empty log message ***

21 years ago1.99.17 LIBSOUP_1_99_17
Dan Winship [Wed, 9 Apr 2003 20:39:05 +0000 (20:39 +0000)]
1.99.17

* configure.in: 1.99.17

21 years agoRevert Joe's changes. We can't release the connection there because there
Dan Winship [Mon, 7 Apr 2003 20:55:31 +0000 (20:55 +0000)]
Revert Joe's changes. We can't release the connection there because there

        * libsoup/soup-context.c (connection_death): Revert Joe's changes.
        We can't release the connection there because there may be
        SoupMessages still pointing to it. (Needs to be revisited.)

21 years agoguard against EINTR error during waitpid
JP Rosevear [Thu, 3 Apr 2003 17:09:44 +0000 (17:09 +0000)]
guard against EINTR error during waitpid

2003-04-03  JP Rosevear  <jpr@ximian.com>

* libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against
EINTR
error during waitpid

* libsoup/soup-address.c: ditto

21 years agoOnly drop the connection if we get an error condition on the channel.
Joe Shaw [Wed, 2 Apr 2003 22:41:23 +0000 (22:41 +0000)]
Only drop the connection if we get an error condition on the channel.

2003-04-02  Joe Shaw  <joe@ximian.com>

* libsoup/soup-context.c (connection_death): Only drop the
connection if we get an error condition on the channel.  Fixes a
double-free.

21 years agoJust call soup_connection_release() from here and return whether the
Joe Shaw [Wed, 2 Apr 2003 21:22:04 +0000 (21:22 +0000)]
Just call soup_connection_release() from here and return whether the

2003-04-02  Joe Shaw  <joe@ximian.com>

* libsoup/soup-context.c (connection_death): Just call
soup_connection_release() from here and return whether the
connection is in use.

21 years ago(soup_gnutls_close): loop on gnutls_bye in
Ian Peters [Mon, 31 Mar 2003 22:32:50 +0000 (22:32 +0000)]
(soup_gnutls_close): loop on gnutls_bye in
case of EAGAIN or EINTR, since shutting down an SSL connection
requires more than just closing a socket.

21 years agoIf the new context points to a different server from the old context, call
Dan Winship [Mon, 31 Mar 2003 15:32:39 +0000 (15:32 +0000)]
If the new context points to a different server from the old context, call

* libsoup/soup-message.c (soup_message_set_context): If the new
context points to a different server from the old context, call
soup_message_cleanup. Otherwise it tries to reuse the old
connection...

21 years agoBump up to 1.99.16 LIBSOUP_1_99_16
Joe Shaw [Tue, 25 Mar 2003 17:27:57 +0000 (17:27 +0000)]
Bump up to 1.99.16

2003-03-25  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.16

21 years agoAdd SOUP_ERROR_SSL_FAILED which gives a slightly better error message on
Joe Shaw [Mon, 24 Mar 2003 15:39:02 +0000 (15:39 +0000)]
Add SOUP_ERROR_SSL_FAILED which gives a slightly better error message on

2003-03-24  Joe Shaw  <joe@ximian.com>

* soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
slightly better error message on various SSL failures than the
previous message.

* soup-queue.c (soup_queue_error_cb): Throw the
SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.

21 years agoUse non-deprecated g_main_loop_* calls throughout. (soup_server_unref):
Joe Shaw [Fri, 21 Mar 2003 22:18:09 +0000 (22:18 +0000)]
Use non-deprecated g_main_loop_* calls throughout. (soup_server_unref):

2003-03-21  Joe Shaw  <joe@ximian.com>

* soup-server.c: Use non-deprecated g_main_loop_* calls
throughout.
(soup_server_unref): Don't unref the main loop if it's NULL.
Fixes a glib warning.

21 years agocomment out NSS checks. The NSS code doesn't work and there are no current
Dan Winship [Tue, 18 Mar 2003 15:45:02 +0000 (15:45 +0000)]
comment out NSS checks. The NSS code doesn't work and there are no current

* configure.in: comment out NSS checks. The NSS code doesn't work
and there are no current plans to fix it.

* README (Features): Mention GnuTLS, remove NSS and the rest of
the "Planned Features" section.

* MAINTAINERS: remove Alex

21 years agoBump the timeout to 10 seconds (and get rid of the 3 tries) so we don't
Dan Winship [Tue, 18 Mar 2003 15:41:14 +0000 (15:41 +0000)]
Bump the timeout to 10 seconds (and get rid of the 3 tries) so we don't

* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
timeout to 10 seconds (and get rid of the 3 tries) so we don't
fail to connect just because the server is slow/far away.

21 years agoBump up to 1.99.15. LIBSOUP_1_99_15
Joe Shaw [Mon, 17 Mar 2003 19:29:43 +0000 (19:29 +0000)]
Bump up to 1.99.15.

2003-03-17  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.15.

21 years agobecause creating client credentials is
Ian Peters [Wed, 12 Mar 2003 16:03:16 +0000 (16:03 +0000)]
because creating client credentials is
expensive, keep the same one around as long as possible, only
recreating it if the ssl_ca_file changes.  Wrap
gnutls_certificate_credentials in a refcounted struct to avoid
freeing it while another established connection may potentially
need it (say, to rehandshake).

21 years agoadd ssl libs to defaults, since ssl doesn't use pkgconfig
Frank Belew (Myth) [Tue, 11 Mar 2003 20:40:49 +0000 (20:40 +0000)]
add ssl libs to defaults, since ssl doesn't use pkgconfig

* soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
use pkgconfig

21 years agoBump up to 1.99.14.
Joe Shaw [Mon, 10 Mar 2003 23:40:37 +0000 (23:40 +0000)]
Bump up to 1.99.14.

2003-03-10  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.14.

21 years agoAdd support for GnuTLS. Patch from Ian Peters.
Joe Shaw [Mon, 10 Mar 2003 22:44:02 +0000 (22:44 +0000)]
Add support for GnuTLS. Patch from Ian Peters.

2003-03-10  Joe Shaw  <joe@ximian.com>

* configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
libsoup/soup-ssl.c: Add support for GnuTLS.  Patch from Ian
Peters.

21 years agoBump up to 1.99.13.
Joe Shaw [Fri, 7 Mar 2003 23:02:26 +0000 (23:02 +0000)]
Bump up to 1.99.13.

2003-03-07  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.13.

* libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
the list of conditions to watch.  If the remote end hangs up the
connection, we'll get a successful read of 0 bytes, not a HUP.
The connection will have to be released by the point we check for
it in connection_death().

* libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
(apparently) errant resetting of the read and write tags.  I think
this might have been causing some reentrancy and crashes.

* libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
channel to NULL encoding and not buffered.

* libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
incorrect comments.

21 years agoBump up to 1.99.12.
Joe Shaw [Fri, 28 Feb 2003 18:17:23 +0000 (18:17 +0000)]
Bump up to 1.99.12.

2003-02-28  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.12.

* libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
this case we probably don't want to call the error callback, we
just want to act like our transfer was cancelled.

21 years agoTry to apply some order to the iochannel refcounting...
Joe Shaw [Thu, 27 Feb 2003 22:12:46 +0000 (22:12 +0000)]
Try to apply some order to the iochannel refcounting...

2003-02-27  Joe Shaw  <joe@ximian.com>

Try to apply some order to the iochannel refcounting...

* configure.in: Bump up to 1.99.11.

* soup-context.c (soup_connection_get_iochannel): The connections
needs to own a reference to the iochannel!  If we're using HTTPS,
release the ref we get from soup_socket_get_iochannel and replace
it with the ref we get from soup_ssl_get_iochannel().  Then,
always ref the channel that we return (ugh, but that's the soup
way).
(connection_free): Release the connection's ref to the iochannel.

* soup-ssl.c (soup_ssl_get_iochannel_real): Ref the iochannel.
The reference we pass back will be owned by the connection.
(soup_ssl_hup_waitpid): Release our ref.

21 years agoBump up to 1.99.10.
Joe Shaw [Thu, 27 Feb 2003 18:53:25 +0000 (18:53 +0000)]
Bump up to 1.99.10.

2003-02-27  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.10.

* soup-ssl.c (soup_ssl_get_iochannel_real): Ref the iochannel,
return to the status quo.  Sigh.

21 years agoBump up to 1.99.9.
Joe Shaw [Wed, 26 Feb 2003 21:03:30 +0000 (21:03 +0000)]
Bump up to 1.99.9.

2003-02-26  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.9.

* soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref, it's
causing problems with HTTPS and proxies; the iochannel refcounting
is waaaaaay horked.

21 years agoadded workaround to link ssl-proxy statically
Frank Belew (Myth) [Wed, 26 Feb 2003 13:04:24 +0000 (13:04 +0000)]
added workaround to link ssl-proxy statically

* libsoup/Makefile.am: added workaround to link ssl-proxy statically

21 years agoBump up to 1.99.8 for snaps.
Joe Shaw [Tue, 11 Feb 2003 21:29:38 +0000 (21:29 +0000)]
Bump up to 1.99.8 for snaps.

2003-02-11  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.8 for snaps.

* soup-address.c (soup_gethostbyname): Fix this for Solaris.  It
returns the address to the resulting hostent or NULL on failure,
unlike Linux which returns an error code.

21 years ago*** empty log message ***
Joe Shaw [Tue, 11 Feb 2003 21:29:31 +0000 (21:29 +0000)]
*** empty log message ***

21 years agoBump up to 1.99.7 for snaps.
Joe Shaw [Tue, 11 Feb 2003 16:59:39 +0000 (16:59 +0000)]
Bump up to 1.99.7 for snaps.

2003-02-11  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.7 for snaps.

* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
the error string from OpenSSL if we can't establish a connection.

21 years agoBump up to 1.99.6 for snaps.
Joe Shaw [Tue, 4 Feb 2003 21:00:54 +0000 (21:00 +0000)]
Bump up to 1.99.6 for snaps.

2003-02-04  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.6 for snaps.

* libsoup/soup-server.c (destroy_message): We already assigned
chan, so don't reassign it, and unref it in all cases.
(issue_bad_request): Always unref after a call to
soup_socket_get_iochannel(), because it refs it.
(conn_accept): Fix some funky GIOChannel reffing here.

* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
g_io_channel_ref() on the socket.  This is the exact opposite of
what we want to do.  Create a temporary structure containing the
parent pid and the old socket and unref the socket when our
callback is called.  This should fix GIOChannels being leaked on
SSL connections.

* libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
main loop quits.

21 years agoBump up to 1.99.5 for the snaps.
Joe Shaw [Wed, 22 Jan 2003 20:05:56 +0000 (20:05 +0000)]
Bump up to 1.99.5 for the snaps.

2003-01-22  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up to 1.99.5 for the snaps.

* libsoup/soup-address.c (soup_address_new): If we found the
address in our hash, we need to return NULL or else Soup will
think we're doing an async lookup and do some cancellation on
us.  Besides, we were returning the wrong type anyway and it
was crashing things.

21 years agoIt's not uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
Joe Shaw [Fri, 17 Jan 2003 23:20:50 +0000 (23:20 +0000)]
It's not uncommon for us to get a G_IO_ERROR_AGAIN when trying to write

2003-01-17  Joe Shaw  <joe@ximian.com>

* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
out, so keep trying until we succeed.

21 years agobump up version for snaps
Joe Shaw [Fri, 10 Jan 2003 20:09:33 +0000 (20:09 +0000)]
bump up version for snaps

21 years agoLoad some X509 and SSL error strings and print out the error when the cert
Joe Shaw [Fri, 10 Jan 2003 20:03:25 +0000 (20:03 +0000)]
Load some X509 and SSL error strings and print out the error when the cert

2003-01-10  Joe Shaw  <joe@ximian.com>

* libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
strings and print out the error when the cert can't verify.

21 years agoFix a memcpy overrun noticed by valgrind
Dan Winship [Thu, 9 Jan 2003 21:02:43 +0000 (21:02 +0000)]
Fix a memcpy overrun noticed by valgrind

* libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
overrun noticed by valgrind

21 years agoAdded. Starts a server only on the interface specified, instead of all
Joe Shaw [Fri, 20 Dec 2002 18:00:39 +0000 (18:00 +0000)]
Added. Starts a server only on the interface specified, instead of all

2002-12-20  Joe Shaw  <joe@ximian.com>

* libsoup/soup-server.c (soup_server_new_with_host): Added.
Starts a server only on the interface specified, instead of all
network interfaces.

21 years agouse $libdir instead of /usr/lib when looking for libraries
Jeremy Katz [Mon, 16 Dec 2002 16:34:17 +0000 (16:34 +0000)]
use $libdir instead of /usr/lib when looking for libraries

2002-12-16  Jeremy Katz  <katzj@redhat.com>
        * configure.in: use $libdir instead of /usr/lib when looking for
        libraries

21 years agoI am an idiot. Don't set a variable to NULL and then immediately try to
Joe Shaw [Wed, 11 Dec 2002 16:56:22 +0000 (16:56 +0000)]
I am an idiot. Don't set a variable to NULL and then immediately try to

2002-12-11  Joe Shaw  <joe@ximian.com>

* libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
Don't set a variable to NULL and then immediately try to
dereference it.

21 years agoPut a timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so we
Joe Shaw [Mon, 9 Dec 2002 22:46:03 +0000 (22:46 +0000)]
Put a timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so we

2002-12-09  Joe Shaw  <joe@ximian.com>

* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
we don't hang forever if we don't get more data.

* libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
or else we'll hang forever in SSL_connect() if the other side
hangs up.

21 years ago*** empty log message ***
Joe Shaw [Mon, 9 Dec 2002 22:45:51 +0000 (22:45 +0000)]
*** empty log message ***

21 years agoWe never want to release the connection on message free, even if the
Joe Shaw [Mon, 9 Dec 2002 18:45:58 +0000 (18:45 +0000)]
We never want to release the connection on message free, even if the

2002-12-09  Joe Shaw  <joe@ximian.com>

* libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
release the connection on message free, even if the connection was
unsuccessful.

21 years agostfu
Joe Shaw [Tue, 3 Dec 2002 19:12:52 +0000 (19:12 +0000)]
stfu

21 years agoCall g_io_channel_set_close_on_unref() on the second half of the socket
Joe Shaw [Tue, 3 Dec 2002 19:12:36 +0000 (19:12 +0000)]
Call g_io_channel_set_close_on_unref() on the second half of the socket

2002-12-03  Joe Shaw  <joe@ximian.com>

* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
g_io_channel_set_close_on_unref() on the second half of the socket
pair so we don't leak file descriptors.

21 years agolibsoup/soup-address.c: add signal.h to the list of headers to pick up SIGKILL
Frank Belew (Myth) [Tue, 3 Dec 2002 13:30:46 +0000 (13:30 +0000)]
libsoup/soup-address.c: add signal.h to the list of headers to pick up SIGKILL

21 years agoBuild the tests directory again
Joe Shaw [Mon, 25 Nov 2002 19:02:15 +0000 (19:02 +0000)]
Build the tests directory again

2002-11-25  Joe Shaw  <joe@ximian.com>

* Makefile.am: Build the tests directory again

21 years agoDon't require autoconf 2.5x, needs to work with 2.13
Rodney Dawes [Thu, 21 Nov 2002 21:55:16 +0000 (21:55 +0000)]
Don't require autoconf 2.5x, needs to work with 2.13

* configure.in: Don't require autoconf 2.5x, needs to work with 2.13

22 years agorequire autoconf 2.52 not 2.53.
Michael Meeks [Wed, 20 Nov 2002 18:51:31 +0000 (18:51 +0000)]
require autoconf 2.52 not 2.53.

2002-11-20  Michael Meeks  <michael@ximian.com>

* configure.in: require autoconf 2.52 not 2.53.

22 years agoFix spelling of SOUP_ERROR_MOVED_PERMANENTLY and its description.
Dan Winship [Mon, 18 Nov 2002 15:30:53 +0000 (15:30 +0000)]
Fix spelling of SOUP_ERROR_MOVED_PERMANENTLY and its description.

* libsoup/soup-error.c: Fix spelling of
SOUP_ERROR_MOVED_PERMANENTLY and its description.

22 years agoDon't use s6_addr32 since it's apparently non-portable. Use s6_addr
Dan Winship [Mon, 18 Nov 2002 15:26:19 +0000 (15:26 +0000)]
Don't use s6_addr32 since it's apparently non-portable. Use s6_addr

* libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
since it's apparently non-portable. Use s6_addr instead.
(soup_gethostbyaddr): fix a sometimes-uninitialized variable.

* libsoup/soup-message.c (soup_message_get_request_header, etc):
Remove long-deprecated API.

* libsoup/soup-socket.c (soup_socket_connect): remove unused
variable.

* libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
* libsoup/soup-server.c (cgi_read): Likewise
* libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
Likewise.
* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
* libsoup/soup-transfer.c (soup_transfer_read_cb,
soup_transfer_write_cb): Likewise.

22 years agoAdd "-6" to listen on the IPv6 local address instead of IPv4. (Tested on
Dan Winship [Mon, 18 Nov 2002 15:25:48 +0000 (15:25 +0000)]
Add "-6" to listen on the IPv6 local address instead of IPv4. (Tested on

* tests/timeserver.c: Add "-6" to listen on the IPv6 local address
instead of IPv4. (Tested on OS X.)

22 years agoChange old Helix Code refs to Ximian (and update copyright dates).
Dan Winship [Fri, 15 Nov 2002 16:26:43 +0000 (16:26 +0000)]
Change old Helix Code refs to Ximian (and update copyright dates).

* libsoup/*: Change old Helix Code refs to Ximian (and update
copyright dates).

22 years agotests/Makefile.am: uncomment lines to make timeserver build correctly
Frank Belew (Myth) [Fri, 15 Nov 2002 16:18:04 +0000 (16:18 +0000)]
tests/Makefile.am: uncomment lines to make timeserver build correctly

22 years agoWhen we get an address from the hash, call our address lookup callback or
Joe Shaw [Thu, 14 Nov 2002 18:56:10 +0000 (18:56 +0000)]
When we get an address from the hash, call our address lookup callback or

2002-12-14  Joe Shaw  <joe@ximian.com>

* libsoup/soup-address.c (soup_address_new): When we get an
address from the hash, call our address lookup callback or else
the connection will hang.

22 years agoOops, commit this.
Dan Winship [Wed, 13 Nov 2002 17:06:58 +0000 (17:06 +0000)]
Oops, commit this.

* tests/timeserver.c: Oops, commit this.

* tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.

22 years agoReplace the BINDIR define with LIBEXECDIR. (install-exec-hook): Install
Joe Shaw [Wed, 13 Nov 2002 16:34:02 +0000 (16:34 +0000)]
Replace the BINDIR define with LIBEXECDIR. (install-exec-hook): Install

2002-12-13  Joe Shaw  <joe@ximian.com>

* libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
(install-exec-hook): Install libsoup-ssl-proxy into libexecdir
instead of bindir.

* libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
to properly shut down the SSL connection before closing the
socket.

* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
iochannels before quitting the main loop.

* tests/Makefile.am: disable building timeserver, the source file
wasn't added.

22 years agoCheck for IPv6 support in networking headers.
Dan Winship [Tue, 12 Nov 2002 17:55:50 +0000 (17:55 +0000)]
Check for IPv6 support in networking headers.

* configure.in: Check for IPv6 support in networking headers.

* libsoup/soup-address.c: Make the internal structure of
SoupAddress entirely private, and make SoupAddress be more like a
hostent and less like a sockaddr. (Ie, make it not have a port
associated with it.) Document undocumented functions. Add
completely-untested support for IPv6.
(soup_address_new_from_sockaddr): New, to parse a sockaddr into a
SoupAddress and a port.
(soup_address_ipv4_any, soup_address_ipv6_any): Return static
addresses corresponding to the IPv6 and IPv6 "any" addresses.
(soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
(soup_address_make_sockaddr): Now constructs a new sockaddr, which
may be a sockaddr_in or sockaddr_in6.
(soup_address_gethostname, soup_address_gethostaddr): Remove
these. They aren't reliable, especially on multihomed hosts.
(soup_gethostbyname, soup_gethostbyaddr): support IPv6
(soup_address_new): Keep pending lookups in a separate hash table
from completed lookups. Fix a bug when canceling a lookup when
there was more one outstanding request for it.
(soup_address_lookup_in_cache): Removed.

* libsoup/soup-socket.c: Add a port field to SoupSocket (since
it's not in SoupAddress any more).
(soup_socket_connect): Simplify this. Don't use
soup_address_lookup_in_cache, just call soup_address_new, since we
already know the code can deal with the callback being invoked
immediately.
(soup_socket_new_sync, soup_socket_new): Take a port argument.
(soup_socket_server_new): Take a SoupAddress to use as the local
address to bind to. This lets the caller choose between the IPv4
and IPv6 "any" addresses, and also lets you bind to a single
interface of a multi-homed machine.
(soup_socket_server_accept, soup_socket_server_try_accept): Merge
the common code.

* libsoup/soup-server.c (soup_server_new): Pass
soup_address_ipv4_any() to soup_socket_server_new().

* libsoup/soup-socks.c (soup_connect_socks_proxy,
soup_socks_write): Fix up for the API changes, but it won't work
with IPv6 yet.

* tests/timeserver.c: Another really simple test, for the server
socket code.

* tests/Makefile.am: build timeserver

22 years agoMove the SoupAddress code from soup-socket.c and soup-socket-unix.c to
Dan Winship [Mon, 11 Nov 2002 22:15:29 +0000 (22:15 +0000)]
Move the SoupAddress code from soup-socket.c and soup-socket-unix.c to

* libsoup/soup-address.c: Move the SoupAddress code from
soup-socket.c and soup-socket-unix.c to here.

* libsoup/soup-socket.c: Move the remaining code from
soup-socket-unix.c here.

* libsoup/soup-socket-unix.c: Gone

* tests/get.c: really really trivial test program

* configure.in (AC_OUTPUT):
* Makefile.am (SUBDIRS): add tests/

22 years agoSplit libsoup out of soup. ChangeLog.old contains the original soup
Dan Winship [Tue, 5 Nov 2002 19:45:46 +0000 (19:45 +0000)]
Split libsoup out of soup. ChangeLog.old contains the original soup

* Split libsoup out of soup. ChangeLog.old contains the original
soup ChangeLog.

* Makefile.am, etc: Fix things up to work with the new directory
layout. Disable docs until we fix them.

* autogen.sh: Use gnome-autogen.sh

* configure.in: Require autoconf 2.53. Remove stuff that was only
needed for httpd or wsdl code. Remove glib1 support. Bump version
to 2.0.

* libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
in ${includedir}/soup-2.0

* libsoup/*: Merge soup-0-7 back onto the trunk. Remove
SOAP-specific stuff, Windows support, and other things that
weren't being maintained.

* soup-config.in, soupConf.sh: Kill these. We only support
pkg-config now.

22 years agoadd 'typedef'
Jacob Berkman [Fri, 31 May 2002 19:35:56 +0000 (19:35 +0000)]
add 'typedef'

2002-05-31  Jacob Berkman  <jacob@ximian.com>

* src/libsoup/soup-message.h (SoupHandlerFilterType): add
'typedef'

22 years agoReturn copied auth context. doh.
Alex Graveley [Mon, 8 Apr 2002 18:54:37 +0000 (18:54 +0000)]
Return copied auth context. doh.

2002-04-08  Alex Graveley  <alex@ximian.com>

* src/libsoup/soup-server.c (auth_context_copy): Return copied
auth context. doh.

22 years agoHandle forced no-content response codes 204, 205, and 304. Check
Alex Graveley [Thu, 21 Mar 2002 21:28:21 +0000 (21:28 +0000)]
Handle forced no-content response codes 204, 205, and 304. Check

2002-03-21  Alex Graveley  <alex@ximian.com>

* src/libsoup/soup-queue.c (soup_queue_read_headers_cb): Handle
forced no-content response codes 204, 205, and 304.  Check
transfer-encoding before content-length to handle broken
Traffic-Server proxies.

22 years agoReturn default handler if none exist. Unregister default handler before
Alex Graveley [Thu, 21 Mar 2002 03:57:59 +0000 (03:57 +0000)]
Return default handler if none exist. Unregister default handler before

2002-03-20  Alex Graveley  <alex@ximian.com>

* src/libsoup/soup-server.c (soup_server_get_handler): Return
default handler if none exist.  Unregister default handler before
resetting.
(soup_server_register): Break out auth copying.
(auth_context_copy): To here.

22 years agoIssue callback directly as we might not be in the request processing loop.
Alex Graveley [Thu, 21 Mar 2002 02:38:14 +0000 (02:38 +0000)]
Issue callback directly as we might not be in the request processing loop.

2002-03-20  Alex Graveley  <alex@ximian.com>

* src/libsoup/soup-queue.c (start_request): Issue callback
directly as we might not be in the request processing loop.
(proxy_connect): Ditto.
(soup_queue_connect_cb): Ditto.
(request_in_progress): Impl. Check request is in queue.
(soup_idle_handle_new_requests): Use request_in_progress before
assigning connect_tag.

22 years agoAdd stub so soup-apache modules an be run by soup-httpd.
Alex Graveley [Thu, 14 Mar 2002 01:25:23 +0000 (01:25 +0000)]
Add stub so soup-apache modules an be run by soup-httpd.

2002-03-13  Alex Graveley  <alex@ximian.com>

* src/soup-httpd/soup-httpd.c (ap_ctx_get): Add stub so
soup-apache modules an be run by soup-httpd.
(ap_get_server_port): Ditto.

* src/soup-wsdl/wsdl-soap-skels.c (wsdl_emit_soap_skels_service):
Generate the _get_server function, which returns a SoupServer
representing the protocol/port defined in the WSDL file.

* tests/stockquote2-mod-server.sh: Added.  Runs soup-httpd using
the libstockquote2.so module generated from
tests/stockquote2-mod-server.c

* tests/stockquote2-mod-server.c: Update for new API generated by
soup-wsdl.

* tests/mod-server-test.c (soup_server_init): Update for new
soup_server_register API.

22 years agoCheck for transport error.
Alex Graveley [Wed, 13 Mar 2002 11:46:43 +0000 (11:46 +0000)]
Check for transport error.

2002-03-13  Alex Graveley  <alex@ximian.com>

* tests/stockquote2-client.c (callback): Check for transport
error.

* src/libsoup/soup-env.c (soup_env_get_header): Handle fully
qualified header names in URL form.

22 years ago#if 0 out generated code to use overridden URL in requests.
Alex Graveley [Wed, 13 Mar 2002 11:15:22 +0000 (11:15 +0000)]
#if 0 out generated code to use overridden URL in requests.

2002-03-13  Alex Graveley  <alex@ximian.com>

* src/soup-wsdl/wsdl-soap-stubs.c (emit_sync_stub): #if 0 out
generated code to use overridden URL in requests.

* src/libsoup/soup-env.c (copy_header): Make static.

* src/libsoup/soup-env.h: Fix macros.

* tests/stockquote2-client.c: Update for new client API.

22 years agoUpdate for new server API.
Alex Graveley [Wed, 13 Mar 2002 10:57:25 +0000 (10:57 +0000)]
Update for new server API.

2002-03-13  Alex Graveley  <alex@ximian.com>

* tests/stockquote2-server.c: Update for new server API.

* tests/server-test.c (soup_server_init): Use auth_callback to
validate requests to /hello.

22 years agoUse soup_env_add_recv_header to add the new header to the incoming
Alex Graveley [Wed, 13 Mar 2002 10:28:53 +0000 (10:28 +0000)]
Use soup_env_add_recv_header to add the new header to the incoming

2002-03-13  Alex Graveley  <alex@ximian.com>

* src/libwsdl/wsdl-soap-parse.c (wsdl_soap_headers): Use
soup_env_add_recv_header to add the new header to the incoming
headers.

22 years agoLoop on SSL_connect for some buggy versions of OpenSSL that still return
Alex Graveley [Tue, 12 Mar 2002 06:42:40 +0000 (06:42 +0000)]
Loop on SSL_connect for some buggy versions of OpenSSL that still return

2002-03-12  Alex Graveley  <alex@ximian.com>

* src/soup-ssl-proxy/soup-openssl.c (soup_openssl_get_iochannel):
Loop on SSL_connect for some buggy versions of OpenSSL that still
return SSL_ERROR_WANT_READ/WRITE even for syncronous sockets.
Thanks to Chris Toshok for finding this.

22 years agoBlah. Cvs sucks.
Alex Graveley [Tue, 12 Mar 2002 00:47:31 +0000 (00:47 +0000)]
Blah. Cvs sucks.