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.
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.
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.
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
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.
Joe Shaw [Tue, 11 Feb 2003 21:29:31 +0000 (21:29 +0000)]
*** empty log message ***
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.
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.
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.
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.
Joe Shaw [Fri, 10 Jan 2003 20:09:33 +0000 (20:09 +0000)]
bump up version for snaps
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.
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
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.
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
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.
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.
Joe Shaw [Mon, 9 Dec 2002 22:45:51 +0000 (22:45 +0000)]
*** empty log message ***
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.
Joe Shaw [Tue, 3 Dec 2002 19:12:52 +0000 (19:12 +0000)]
stfu
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.
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
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
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
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.
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.
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.
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.)
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).
Frank Belew (Myth) [Fri, 15 Nov 2002 16:18:04 +0000 (16:18 +0000)]
tests/Makefile.am: uncomment lines to make timeserver build correctly
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.
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.
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.
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
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/
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.
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'
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Alex Graveley [Tue, 12 Mar 2002 00:47:31 +0000 (00:47 +0000)]
Blah. Cvs sucks.
Alex Graveley [Tue, 12 Mar 2002 00:39:21 +0000 (00:39 +0000)]
Bump development version to 0.7.99.
2002-03-11 Alex Graveley <alex@ximian.com>
* configure.in, src/libsoup/soup-private.h: Bump development
version to 0.7.99.
* Merge all changes from soup-0-6 branch.
Joe Shaw [Thu, 17 Jan 2002 18:30:34 +0000 (18:30 +0000)]
Add a soup_message_get_http_version() function.
2002-01-17 Joe Shaw <joe@ximian.com>
* src/libsoup/soup-message.c: Add a
soup_message_get_http_version() function.
Alex Graveley [Fri, 9 Nov 2001 01:38:52 +0000 (01:38 +0000)]
Update to call renamed SoupHandlerEvents.
2001-11-08 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-queue.c (soup_queue_read_headers_cb):
(soup_queue_read_chunk_cb):
(soup_queue_read_done_cb): Update to call renamed SoupHandlerEvents.
* src/libsoup/soup-message.[ch]: Remove
soup_message_get_request_header, soup_message_set_request_header,
soup_message_get_response_header,
soup_message_set_response_header,
soup_message_add_error_code_handler,
soup_message_add_error_class_handler,
soup_message_add_header_handler.
(redirect_handler): Update for new handler interface.
(authorize_handler): Ditto.
(timeout_handler): Impl.
(soup_message_remove_handler): Impl.
(soup_message_remove_handler_by_func): Impl.
(soup_message_remove_handler_by_func_and_data): Impl.
(soup_message_list_handlers): Impl.
Alex Graveley [Thu, 8 Nov 2001 22:07:33 +0000 (22:07 +0000)]
Bump HEAD version to 0.6.99. Ditto.
2001-11-08 Alex Graveley <alex@ximian.com>
* configure.in: Bump HEAD version to 0.6.99.
* src/libsoup/soup-private.h (VERSION): Ditto.
Alex Graveley [Thu, 8 Nov 2001 21:53:40 +0000 (21:53 +0000)]
Version 0.6.0. Ditto.
2001-11-08 Alex Graveley <alex@ximian.com>
* configure.in: Version 0.6.0.
* src/libsoup/soup-private.h (VERSION): Ditto.
Alex Graveley [Thu, 8 Nov 2001 20:00:37 +0000 (20:00 +0000)]
Set debug default to "minimum", which turns off G_ENABLE_DEBUG (and the
2001-11-08 Alex Graveley <alex@ximian.com>
* configure.in (debug_default): Set debug default to "minimum",
which turns off G_ENABLE_DEBUG (and the ptrace magic) by default.
To turn back on for a debugging environment, use --enable-debug.
* src/libsoup/soup-socket-unix.c (SOUP_PTRACE_DETACH): Wrap
SOUP_PTRACE defines in check for G_ENABLE_DEBUG.
Alex Graveley [Thu, 8 Nov 2001 10:49:20 +0000 (10:49 +0000)]
Add cleanup function to avoid leaving context/address references around.
2001-11-08 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socks.c (socks_data_free): Add cleanup function
to avoid leaving context/address references around.
(WSHORT): Use memcpy.
(soup_socks_read): Pass len as sizeof (buf).
(soup_socks_error): Add error handler just in case.
(soup_connect_socks_proxy): Unref the io channel.
(soup_lookup_dest_addr_cb): Ditto.
Dan Winship [Wed, 7 Nov 2001 13:44:57 +0000 (13:44 +0000)]
Mark the auth completed after sending the response string.
* src/libsoup/soup-auth.c (ntlm_init): Mark the auth completed
after sending the response string.
(ntlm_compare_func): A new NTLM auth doesn't invalidate an
already-completed one. (Makes it not loop forever on a wrong
password.)
Alex Graveley [Fri, 2 Nov 2001 23:32:35 +0000 (23:32 +0000)]
Add death_tag to _SoupConnection.
2001-11-02 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-private.h: Add death_tag to _SoupConnection.
* src/libsoup/soup-socks.c (soup_connect_socks_proxy): Unref proxy
context.
(soup_socks_write): Ditto.
* src/libsoup/soup-context.c (connection_free): Impl.
(soup_prune_least_used_connection): Use connection_free().
(soup_connection_release): Ditto.
(soup_prune_foreach): Simplify to not use custom data struct. Just
use a SoupConnection ** to hold state.
(connection_death): Impl. Free the connection if its not
currently in use.
(soup_context_connect_cb): Install a death handler for valid
connections, so connection death can be caught and handled when no
SoupMessage exists to handle it. Ref the context.
(soup_context_get_connection): For reused connections, ref the
connection's new context, unref the old one, and assign the
connection's context to the new one.
(soup_context_unref): Don't free connections, as there must be
none left for all the contexts to have been removed.
(soup_connection_get_context): Add a reference before returning
context.
* src/libsoup/soup-message.c (soup_message_set_context): Add
precondition checks.
(soup_message_get_context): Ditto.
Alex Graveley [Fri, 2 Nov 2001 13:04:25 +0000 (13:04 +0000)]
Add missing newlines after sections.
Alex Graveley [Fri, 2 Nov 2001 13:01:39 +0000 (13:01 +0000)]
Remove NSS-related code, as this is now moved to libsoup.
2001-11-02 Alex Graveley <alex@ximian.com>
* src/soup-ssl-proxy/soup-ssl-proxy.c: Remove NSS-related code, as
this is now moved to libsoup.
Alex Graveley [Fri, 2 Nov 2001 12:48:08 +0000 (12:48 +0000)]
Rename killme to cached in _SoupAddress.
2001-11-02 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-private.h: Rename killme to cached in _SoupAddress.
* src/libsoup/soup-socket-unix.c (soup_address_get_name_cb): Use
g_strndup instead of g_new/strncpy.
(soup_address_new_cb): Set cache status to CACHE_OK on success.
(prune_zeroref_addresses_foreach): Use ia->cached.
(soup_address_unref): Free addresses which are NOT_CACHED.
Alex Graveley [Fri, 2 Nov 2001 12:03:06 +0000 (12:03 +0000)]
Fix typo.
Alex Graveley [Fri, 2 Nov 2001 11:58:26 +0000 (11:58 +0000)]
Remove extraneous return.
Alex Graveley [Fri, 2 Nov 2001 11:52:46 +0000 (11:52 +0000)]
Remove old fixed FIXME.
2001-11-02 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-context.c (soup_try_existing_connections):
Remove old fixed FIXME.
* src/libsoup/soup-socket-unix.c
(prune_zeroref_addresses_timeout): Remove timeout if
active_address_hash is null.
(soup_address_unref): Only install timeout handler if the address
has a name, otherwise just free.
Alex Graveley [Fri, 2 Nov 2001 01:11:33 +0000 (01:11 +0000)]
Windows build fixes and warning smashes.
* Windows build fixes and warning smashes.
* Add src/libsoup/soup-error.[ch] to build/libsoup.dsp
Alex Graveley [Thu, 1 Nov 2001 19:05:06 +0000 (19:05 +0000)]
Null terminate recv_buf before copying the data pointer.
2001-11-01 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-transfer.c (issue_final_callback): Null
terminate recv_buf before copying the data pointer.
Alex Graveley [Thu, 1 Nov 2001 01:11:00 +0000 (01:11 +0000)]
Drop connection count of connect failed. (soup_context_get_connection):
2001-10-31 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-context.c (soup_context_connect_cb): Drop
connection count of connect failed.
(soup_context_get_connection): Increment connection count before
calling soup_socket_connect() to avoid connection limit being
passed by many messages queued at the same time.
* src/libsoup/soup-server.c (read_done_cb): Assign request's data
buffer to message request buffer, not response. Caught by Tim
Moloney.
* src/libsoup/soup-transfer.c (soup_transfer_read_cb): Zero
terminate alloca'd header string passed to headers_done_cb.
Dan Winship [Wed, 31 Oct 2001 23:09:27 +0000 (23:09 +0000)]
Fix the popt check so you can pass CPPFLAGS and LDFLAGS in in the
* configure.in: Fix the popt check so you can pass CPPFLAGS and
LDFLAGS in in the environment.
Alex Graveley [Tue, 30 Oct 2001 06:29:26 +0000 (06:29 +0000)]
Remove the existing SoupAuth from the from the server's valid_auths hash.
2001-10-30 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-auth.c (soup_auth_set_context): Remove the
existing SoupAuth from the from the server's valid_auths hash.
(soup_auth_new_from_header_list): Fix bug where auth header
evaluation stopped after finding the first matching scheme.
Alex Graveley [Tue, 30 Oct 2001 05:40:00 +0000 (05:40 +0000)]
Consider existing addresses with a zero refcount valid to return (with an
2001-10-30 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socket-unix.c (soup_address_new): Consider
existing addresses with a zero refcount valid to return (with an
added refcount).
(prune_zeroref_addresses_foreach): Impl.
(prune_zeroref_addresses_timeout): Impl.
(soup_address_unref): Don't free zero ref addresses, instead make
sure zeroref timeout handler is installed and install if not. Also
move to here from soup-socket.c.
* src/libsoup/soup-private.h: Add killme flag to soup_address.
* src/libsoup/soup-socket-win.c (soup_address_unref): Move here
from soup-socket.c.
Alex Graveley [Tue, 30 Oct 2001 01:51:16 +0000 (01:51 +0000)]
Call soup_auth_fn if we don't have auth data in the URI, then call
2001-10-29 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (authorize_handler): Call
soup_auth_fn if we don't have auth data in the URI, then call
soup_auth_initialize if the callback set authenticate data on the
passed uri.
* src/libsoup/soup-auth.h: Make type be SoupAuthType.
* src/libsoup/soup-auth.c (soup_auth_initialize): Impl. To be
called after SoupAuth creation to apply auth data to the
SoupAuth. This allows us to parse the Authenticate headers to
figure out which auth scheme and realm is being used, and pass
this to the auth callback.
* src/libsoup/soup-misc.c (soup_set_authorize_callback): Impl.
* src/libsoup/soup-misc.h: Add SoupAuthType enum here.
* src/libsoup/soup-server.h: Use SoupAuthType. Remove
SoupServerAuthType.
Alex Graveley [Sat, 27 Oct 2001 22:32:09 +0000 (22:32 +0000)]
Include soup-error.h
2001-10-27 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-dav.c: Include soup-error.h
* src/libsoup/soup-queue.c (soup_debug_print_headers): Use
soup_message_foreach_header.
* src/libsoup/soup-message.c (soup_message_new): Default to GET if
method not supplied.
(soup_message_add_header): Remove code to delete header if no
value is supplied.
(soup_message_foreach_remove_header): Impl.
(soup_message_remove_header): Impl.
Alex Graveley [Fri, 26 Oct 2001 10:27:19 +0000 (10:27 +0000)]
Use WUNTRACED, which should fix possible hang situation.
2001-10-26 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socket-unix.c (soup_address_new): Use WUNTRACED,
which should fix possible hang situation.
* src/libsoup/soup-transfer.c (issue_chunk_callback): Address bug
where data buffer passed to chunk callback could be invalid due to
appending a null. Just don't addend NULL for chunk callbacks.
Alex Graveley [Fri, 26 Oct 2001 07:38:34 +0000 (07:38 +0000)]
Use soup_uri_set_auth().
2001-10-26 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (redirect_handler): Use
soup_uri_set_auth().
* src/libsoup/soup-uri.c (soup_uri_free): Don't use g_assert.
(soup_uri_set_auth): Impl.
* src/libsoup/soup-server.c (read_headers_cb): Use
soup_message_set_context().
* src/libsoup/soup-message.c (soup_message_set_context): Impl.
(soup_message_get_context): Impl.
(redirect_handler): Use soup_message_set_context().
Alex Graveley [Fri, 26 Oct 2001 03:11:47 +0000 (03:11 +0000)]
Handle redirects when source uri has auth data by copying auth to new url.
2001-10-25 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (redirect_handler): Handle redirects
when source uri has auth data by copying auth to new url.
Alex Graveley [Fri, 26 Oct 2001 02:25:04 +0000 (02:25 +0000)]
Fixe bug where informational responses were treated as an unknown
2001-10-25 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-queue.c (soup_queue_read_headers_cb): Fixe bug
where informational responses were treated as an unknown encoding,
causing the actual response to be considered part of the
informational response body.
Dan Winship [Thu, 25 Oct 2001 19:31:52 +0000 (19:31 +0000)]
Fix up the networking library checks to work on Solaris. Check for
* configure.in: Fix up the networking library checks to work on
Solaris. Check for inet_pton. (Solaris doesn't have inet_aton.)
* src/libsoup/soup-socket-unix.c (soup_address_new): Use inet_pton
instead of inet_aton if available.
Joe Shaw [Mon, 22 Oct 2001 20:13:32 +0000 (20:13 +0000)]
Make sure we handle G_IO_IN before we handle G_IO_HUP so we don't lose
2001-10-22 Joe Shaw <joe@ximian.com>
* src/soup-ssl-proxy/soup-ssl-proxy.c (soup_ssl_proxy_readwrite):
Make sure we handle G_IO_IN before we handle G_IO_HUP so we don't
lose data on the pipe, as you can receive both at the same time.
Ian Peters actually found this, but I am his commit monkey.
JP Rosevear [Mon, 22 Oct 2001 04:09:56 +0000 (04:09 +0000)]
use new error api
2001-10-22 JP Rosevear <jpr@ximian.com>
* src/libsoup/soup-dav.c (soup_dav_response_new): use new error
api
* src/libsoup/soup-queue.c (soup_parse_headers): ditto
* src/libsoup/soup-message.c (soup_message_set_error_full): ditto
(soup_message_set_error): ditto
Alex Graveley [Sun, 21 Oct 2001 22:54:05 +0000 (22:54 +0000)]
Reorganize.
2001-10-21 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.h: Reorganize.
* src/libsoup/Makefile.am (libsoupinclude_HEADERS): Add soup-error.h.
(libsoup_la_SOURCES): Add soup-error.c.
* src/libsoup/soup-error.[ch]: Move SoupKnownErrorCode and
SoupErrorClass defines to here. Move soup_get_error_phrase and
soup_get_error_class here, and rename to soup_error_get_phrase and
soup_error_get_class.
Alex Graveley [Fri, 19 Oct 2001 21:57:27 +0000 (21:57 +0000)]
This is the first attempt at authentication inheritence, it still needs
2001-10-19 Alex Graveley <alex@ximian.com>
This is the first attempt at authentication inheritence, it
still needs some work. Auth headers are always sent no matter
what, auth realms are not respected, and auth data in the uri is
ignored unless an existing auth attempt fails.
* src/libsoup/soup-auth.c (digest_parse_func): Compute a1 hash
"user:realm:passwd:nonce:cnonce" here, to cut down on per-request
overhead. Accept a SoupUri from which to get auth info.
(basic_parse_func): Base64 encode user:passwd here for same
reason. Accept a SoupUri for getting auth info.
(compute_response): Get uri path from message instead of SoupAuth.
(digest_auth_func): Ditto.
(soup_auth_lookup): Impl. Given a context, lookup the SoupAuth of
the nearest parent directory.
(soup_auth_set_context): Impl. Register a SoupAuth to be used for
requests to the context's path and subdirectories.
* src/libsoup/soup-auth.h: Move define of SoupAuth here, in
preparation for making public eventually.
* src/libsoup/soup-queue.c (soup_encode_http_auth): Use
soup_auth_lookup ().
(soup_get_request_header): Don't check the request's uri for auth
info, as a parent context may have a valid registered SoupAuth.
* src/libsoup/soup-message.c (authorize_handler): Use
soup_auth_lookup() to find last (failing) SoupAuth. Use
soup_auth_set_context() to register the created SoupAuth for this
context.
* src/libsoup/soup-message.h: Explicitly define values for soup
transport-level errorcodes, just because.
* src/libsoup/soup-context.c (soup_context_unref): When freeing
the SoupHost parent of this context, free all associated
SoupAuths.
* src/libsoup/soup-private.h: Remove auth pointer from context,
add hashtable of valid auths to SoupAuth.
Alex Graveley [Thu, 18 Oct 2001 20:52:29 +0000 (20:52 +0000)]
Set encoding out param appropriately. Ditto.
2001-10-18 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-queue.c (soup_queue_read_headers_cb): Set
encoding out param appropriately.
* src/libsoup/soup-server.c (soup_httpd_read_headers_cb): Ditto.
* src/libsoup/soup-transfer.h: Add SoupTransferEncoding enum.
* src/libsoup/soup-transfer.c (soup_transfer_read_error_cb):
Handle unknown encoding by issuing the read_done callback when the
connection is closed.
(issue_chunk_callback): Pass in a cancelled arg to simplify code.
(read_unknown): Impl. Same as read_content_length () except never
return TRUE.
(soup_transfer_read_cb): Make headers_done_cb take an encoding out
parameter to avoid magic values in content_length. Switch on
encoding to see if read completed. Use issue_final_callback ().
JP Rosevear [Thu, 18 Oct 2001 14:46:01 +0000 (14:46 +0000)]
the array length assertion should be >= rather than less than.
2001-10-18 JP Rosevear <jpr@ximian.com>
* src/libsoup/soup-transfer.c (remove_block_at_index): the array
length assertion should be >= rather than less than.
Alex Graveley [Wed, 17 Oct 2001 21:54:03 +0000 (21:54 +0000)]
Don't call chunk callback if there is no new data.
2001-10-17 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-transfer.c (read_content_length): Don't call
chunk callback if there is no new data.
Alex Graveley [Wed, 17 Oct 2001 18:03:22 +0000 (18:03 +0000)]
Add some bounds checking.
2001-10-17 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-transfer.c (remove_block_at_index): Add some
bounds checking.
* src/libsoup/soup-queue.c (soup_queue_connect_cb): Handle
iochannel creation failure which can happen when using SSL.
Alex Graveley [Tue, 16 Oct 2001 18:49:59 +0000 (18:49 +0000)]
Impl. (remove_block_at_index): Impl. (decode_chunk): Simplify using
2001-10-16 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-transfer.c (decode_hex): Impl.
(remove_block_at_index): Impl.
(decode_chunk): Simplify using utility functions.
(soup_transfer_read_cb): Use remove_block_at_index.
(read_chunk): Ditto.
Joe Shaw [Tue, 16 Oct 2001 17:07:09 +0000 (17:07 +0000)]
A NULL passwd is perfectly valid, so we want to avoid crashing if that is
2001-10-16 Joe Shaw <joe@ximian.com>
* src/libsoup/soup-auth.c (compute_response): A NULL passwd is
perfectly valid, so we want to avoid crashing if that is the case.
Alex Graveley [Tue, 16 Oct 2001 12:18:40 +0000 (12:18 +0000)]
Fix nasty chunked encoding bug when the message is set to truncate chunks.
2001-10-16 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-transfer.c (decode_chunk): Fix nasty chunked
encoding bug when the message is set to truncate chunks. Code
reorg to be a lot cleaner.
* src/libsoup/soup-ntlm.c: Move alloca #define-foo to:
* src/libsoup/soup-private.h: Here.
* src/libsoup/soup-uri.c (soup_uri_to_string): Handle the case
where path does not begin with a '/'.
* src/libsoup/soup-server.c (soup_server_free): Use foreach_remove.
Alex Graveley [Tue, 9 Oct 2001 23:08:08 +0000 (23:08 +0000)]
Assign source connection correctly.
2001-10-09 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socks.c (soup_connect_socks_proxy): Assign
source connection correctly.
Alex Graveley [Tue, 9 Oct 2001 20:48:48 +0000 (20:48 +0000)]
don't call __uri_exists as __is_collection should check this.
2001-10-09 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-dav-server.c (parent_exists): don't call
__uri_exists as __is_collection should check this.
Alex Graveley [Sat, 6 Oct 2001 22:31:05 +0000 (22:31 +0000)]
Explicitly add libplc4 and libplds4 which are dependencies of libnspr4.
2001-10-06 Alex Graveley <alex@ximian.com>
* configure.in (enable_nss): Explicitly add libplc4 and libplds4
which are dependencies of libnspr4.
* src/libsoup/Makefile.am (libsoup_la_LIBADD): Link with NSS libs.
(libsoup_la_SOURCES): Add soup-nss.[ch].
* src/libsoup/soup-nss.c: Added. GIOChannel wrapper for Mozills NSS.
* src/libsoup/soup-ssl.c: Use NSS if available to avoid out of
process SSL proxy.
* src/soup-ssl-proxy/Makefile.am (soup_ssl_proxy_SOURCES): Remove
soup-nss.[ch].
(soup_ssl_proxy_LDADD): Do not link NSS libs, as these are now
linked directly into libsoup.
Alex Graveley [Fri, 5 Oct 2001 19:35:37 +0000 (19:35 +0000)]
Impl. Use instead of custom header free funcs throughout.
2001-10-05 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (soup_message_clear_headers):
Impl. Use instead of custom header free funcs throughout.
(soup_message_foreach_header): Impl.
(global_handlers): Handle redirects before authenticating.
(redirect_handler): Use soup_message_get_header.
(run_handler): Ditto.
Alex Graveley [Thu, 4 Oct 2001 18:18:05 +0000 (18:18 +0000)]
Ugg. Don't call waitpid with NOHANG. Avoid zombies. Gain friends.
2001-10-04 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socket-unix.c (soup_address_new_cb): Ugg. Don't
call waitpid with NOHANG. Avoid zombies. Gain friends.
Alex Graveley [Thu, 4 Oct 2001 17:05:09 +0000 (17:05 +0000)]
Call soup_message_get_header_list.
2001-10-04 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (authorize_handler): Call
soup_message_get_header_list.
* src/libsoup/soup-auth.c (soup_auth_new_from_header_list): Set
crypto strength for authentication types, and try to choose the
strongest when authenticating.
* src/libsoup/soup-queue.c (soup_check_used_headers): Kill warnings.
* tests/simple-test.c (list_headers): Handle multiple values for
header.
* tests/handler-test.c (list_headers): Ditto.
Alex Graveley [Thu, 4 Oct 2001 15:39:25 +0000 (15:39 +0000)]
Fix const warnings.
2001-10-04 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-server.c (read_headers_cb): Fix const warnings.
Alex Graveley [Thu, 4 Oct 2001 15:23:15 +0000 (15:23 +0000)]
Don't create response_headers. This is done in soup_message_new. Use
2001-10-04 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-server.c (read_headers_cb): Don't create
response_headers. This is done in soup_message_new. Use
soup_message_get_header throughout.
* src/libsoup/soup-queue.c (soup_check_used_headers): Write list
of headers.
(soup_parse_headers): Don't create response_headers. This is done
in soup_message_new.
(soup_debug_print_a_header): Handle multiple header vals.
(soup_check_used_headers): Ditto.
(soup_queue_remove_header): Ditto.
(soup_queue_message): Don't destroy hashtable, just clear it.
Use soup_message_get_header throughout.
Alex Graveley [Thu, 4 Oct 2001 14:43:35 +0000 (14:43 +0000)]
Handle multiple values in header hash tables. (free_header): Free the list
2001-10-04 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-message.c (soup_message_add_header): Handle
multiple values in header hash tables.
(free_header): Free the list of values.
(soup_message_new): Create request_headers and response_headers
here instead of on header insertion.
(soup_message_set_request_header): Deprecate.
(soup_message_get_request_header): Deprecate.
(soup_message_set_response_header): Deprecate.
(soup_message_get_response_header): Deprecate.
* src/libsoup/soup-dav-server.c: Update to use new header get/add
funcs.
* src/libsoup/soup-headers.c (soup_headers_parse): Store headers
as a GSList of values.
Dan Winship [Wed, 3 Oct 2001 21:31:26 +0000 (21:31 +0000)]
The @ in foo/bar@baz is part of the path, not the username/hostname
* src/libsoup/soup-uri.c (soup_uri_new): The @ in
http://foo/bar@baz is part of the path, not the username/hostname
split.
Alex Graveley [Tue, 2 Oct 2001 01:29:44 +0000 (01:29 +0000)]
Fix HAVE_OPENSSL and HAVE_NSS checks as these were always being defined.
2001-10-01 Alex Graveley <alex@ximian.com>
* configure.in: Fix HAVE_OPENSSL and HAVE_NSS checks as these were
always being defined.
Alex Graveley [Tue, 2 Oct 2001 00:52:54 +0000 (00:52 +0000)]
Add defines for SOUP_PTRACE_ATTACH and SOUP_PTRACE_DETACH to remove
2001-10-01 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-socket-unix.c (soup_address_new): Add defines
for SOUP_PTRACE_ATTACH and SOUP_PTRACE_DETACH to remove
architecture incompatibilities for ptrace() arguments.
* configure.in: Add libdl to OpenSSL LDFLAGS. Fix NSS header
paths. Define HAVE_OPENSSL and HAVE_NSS if the libraries are
found successfully.
* src/libsoup/soup-socket.h: Remove soup_gethostbyname and
soup_gethostbyaddr, and move to:
* src/libsoup/soup-private.h: here.
Alex Graveley [Sat, 29 Sep 2001 04:34:06 +0000 (04:34 +0000)]
Remove redundant alloca define.
2001-09-28 Alex Graveley <alex@ximian.com>
* src/libsoup/soup-ntlm.c: Remove redundant alloca define.
* src/libsoup/soup-socket.c (soup_socket_server_new): Use
SOUP_SOCKET_CLOSE.
* src/libsoup/soup-socket.h: Include winsock.h if windows.