platform/upstream/libsoup.git
16 years agoAllow autogening even without AM_PATH_LIBGCRYPT available
Tor Lillqvist [Thu, 24 Jan 2008 09:44:38 +0000 (09:44 +0000)]
Allow autogening even without AM_PATH_LIBGCRYPT available

2008-01-23  Tor Lillqvist  <tml@novell.com>

* configure.in: Allow autogening even without AM_PATH_LIBGCRYPT
available

* libsoup/soup-date.c (soup_date_new_from_time_t): Correct use of
gmtime().

* libsoup/soup-headers.c (soup_headers_parse_status_line): Return
FALSE if neither HTTP nor ICY. Avoids crash in
tests/header-parsing.

* libsoup/soup-socket.c: On Windows SHUT_RDWR is called SD_BOTH.
(set_nonblocking): Fix typo.

* tests/continue-test.c: Seems to build fine without <pthread.h>,
so drop that.

svn path=/trunk/; revision=1051

16 years agotest SOUP_AUTH_DOMAIN_REMOVE_PATH
Dan Winship [Fri, 18 Jan 2008 15:21:43 +0000 (15:21 +0000)]
test SOUP_AUTH_DOMAIN_REMOVE_PATH

* tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH

svn path=/trunk/; revision=1050

16 years agorequire glib 2.15.3, not 2.15.0, since AM_PATH_GLIB_2_0 didn't know about
Dan Winship [Fri, 18 Jan 2008 14:55:31 +0000 (14:55 +0000)]
require glib 2.15.3, not 2.15.0, since AM_PATH_GLIB_2_0 didn't know about

* configure.in: require glib 2.15.3, not 2.15.0, since
AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
out by Matthew Barnes, #510216.

svn path=/trunk/; revision=1049

16 years agoadd a new generic auth callback that can be used with any subclass to do
Dan Winship [Fri, 18 Jan 2008 14:53:35 +0000 (14:53 +0000)]
add a new generic auth callback that can be used with any subclass to do

* libsoup/soup-auth-domain.c
(soup_auth_domain_set_generic_auth_callback):
(soup_auth_domain_check_password): add a new generic auth callback
that can be used with any subclass to do cleartext password
checking against messages. Suggested by Mathias Hasselmann.

* libsoup/soup-auth-domain-basic.c: Implement generic auth

* libsoup/soup-auth-domain-digest.c: Implement generic auth.
(soup_auth_domain_digest_evil_check_password): Gone, use the
generic version now.

svn path=/trunk/; revision=1048

16 years agocast the second arg to g_checksum_update to (guchar *) to avoid warnings
Dan Winship [Thu, 17 Jan 2008 17:06:47 +0000 (17:06 +0000)]
cast the second arg to g_checksum_update to (guchar *) to avoid warnings

* libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
(soup_auth_digest_compute_hex_a1)
(soup_auth_digest_compute_response): cast the second arg to
g_checksum_update to (guchar *) to avoid warnings

svn path=/trunk/; revision=1047

16 years agoDeal with Shoutcast servers, which return "ICY 200 OK", but are otherwise
Dan Winship [Wed, 16 Jan 2008 22:00:32 +0000 (22:00 +0000)]
Deal with Shoutcast servers, which return "ICY 200 OK", but are otherwise

* libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
with Shoutcast servers, which return "ICY 200 OK", but are
otherwise straight HTTP/1.0. #502325, Wouter Cloetens.

* tests/header-parsing.c (resptests): add a test for it

svn path=/trunk/; revision=1046

16 years agoAllow the session authenticate signal to be handled asynchronously, by
Dan Winship [Wed, 16 Jan 2008 21:49:54 +0000 (21:49 +0000)]
Allow the session authenticate signal to be handled asynchronously, by

* libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
session authenticate signal to be handled asynchronously, by
pausing the message and then authenticating the auth later.
(auth_type_compare_func): make this work. oops.
(extract_challenge): plug leak

* libsoup/soup-auth-manager-ntlm.c: Make this work async too.

* libsoup/soup-headers.c (soup_header_parse_list):
(soup_header_parse_param_list): plug leaks

* tests/auth-test.c (do_async_auth_test): test async auth

* docs/reference/client-howto.xml (Handling Authentication):
mention async auth

svn path=/trunk/; revision=1045

16 years agoBomb out if glib 2.15.0 isn't found. (AM_PATH_GLIB_2_0 doesn't do this
Dan Winship [Wed, 16 Jan 2008 19:16:51 +0000 (19:16 +0000)]
Bomb out if glib 2.15.0 isn't found. (AM_PATH_GLIB_2_0 doesn't do this

* configure.in: Bomb out if glib 2.15.0 isn't found.
(AM_PATH_GLIB_2_0 doesn't do this itself.)

svn path=/trunk/; revision=1044

16 years agoReplaces SoupConnectionNTLM; now works as a SoupSession::request_started
Dan Winship [Tue, 15 Jan 2008 22:52:36 +0000 (22:52 +0000)]
Replaces SoupConnectionNTLM; now works as a SoupSession::request_started

* libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
now works as a SoupSession::request_started watcher.

* libsoup/soup-connection.c: remove the no-longer-needed
"authenticate" signal

* libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
set. Remove connection-authenticate-signal references.

svn path=/trunk/; revision=1043

16 years agoMerge libsoup-2.4 branch to trunk
Dan Winship [Tue, 15 Jan 2008 17:40:47 +0000 (17:40 +0000)]
Merge libsoup-2.4 branch to trunk

* Merge libsoup-2.4 branch to trunk

svn path=/trunk/; revision=1041

16 years agoclarify docs for new-connetion signal.
Benjamin Otte [Wed, 9 Jan 2008 21:28:48 +0000 (21:28 +0000)]
clarify docs for new-connetion signal.

* libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for new-connetion signal.

svn path=/trunk/; revision=1024

16 years agowait for apache to exit, to avoid spurious test failures
Dan Winship [Mon, 26 Nov 2007 22:33:58 +0000 (22:33 +0000)]
wait for apache to exit, to avoid spurious test failures

svn path=/trunk/; revision=959

16 years ago2.2.104
Dan Winship [Mon, 26 Nov 2007 22:19:02 +0000 (22:19 +0000)]
2.2.104

* configure.in: 2.2.104

* NEWS: update

svn path=/trunk/; revision=958

16 years agofix docs
Dan Winship [Mon, 26 Nov 2007 16:59:21 +0000 (16:59 +0000)]
fix docs

svn path=/trunk/; revision=957

17 years agomake this non-static.
Dan Winship [Wed, 21 Nov 2007 16:23:26 +0000 (16:23 +0000)]
make this non-static.

* libsoup/soup-message-io.c (soup_message_io_cleanup): make this
non-static.

* libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
rather than soup_message_io_stop(), to avoid leaks when finalizing
an unfinished message. (Another part of #498509, Wouter Cloetens.)

svn path=/trunk/; revision=956

17 years agoadd bug reference to previous commit:
Dan Winship [Wed, 21 Nov 2007 04:17:54 +0000 (04:17 +0000)]
add bug reference to previous commit:
Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens

svn path=/trunk/; revision=955

17 years agodon't leak the async_context
Dan Winship [Wed, 21 Nov 2007 04:15:53 +0000 (04:15 +0000)]
don't leak the async_context

* libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
the async_context

* libsoup/soup-server.c (soup_server_quit): disconnect the
"new_connection" handler.
(soup_server_get_async_context): Convenience method to return the
server's async_context.

* libsoup/soup-server-message.c: don't circularly ref the server,
there's no need anyway.

* libsoup/soup-session.c (soup_session_get_async_context):
Convenience method to return the session's async_context.

* libsoup/soup-session-async.c (queue_message): call run_queue in
the session's async_context, not the main context.
(send_message): don't leak the async_context

* libsoup/soup-session-sync.c (queue_message_thread): don't leak
the async_context

* tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
and doesn't leak

svn path=/trunk/; revision=954

17 years agodon't leak the SoupAddress.
Dan Winship [Wed, 21 Nov 2007 03:51:24 +0000 (03:51 +0000)]
don't leak the SoupAddress.

* libsoup/soup-connection.c (soup_connection_connect_async): don't
leak the SoupAddress.

* libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
when re-looking up an address

* libsoup/soup-session.c (soup_session_abort): close all
connections in addition to cancelling messages (needed because
connections currently end up holding a ref on their session,
preventing them from being destroyed).

* tests/auth-test.c:
* tests/ntlm-test.c:
* tests/proxy-test.c:
* tests/pull-api.c:
* tests/ssl-test.c:
* tests/xmlrpc-test.c: clean up more memory on exit, to help find
leaks in the library

* tests/libsoup.supp: add a zillion new suppressions so we
can use --leak-resolution=med

svn path=/trunk/; revision=953

17 years agoFix the guards around the got_chunk emission so that it doesn't get messed
Dan Winship [Mon, 19 Nov 2007 17:51:42 +0000 (17:51 +0000)]
Fix the guards around the got_chunk emission so that it doesn't get messed

* libsoup/soup-message-io.c (read_body_chunk): Fix the guards
around the got_chunk emission so that it doesn't get messed up if
you pause the I/O from the got_chunk handler. (#452280, Marco
Barisione).
(soup_message_io_pause, soup_message_io_unpause): Update docs
again; these are now allowed with client-side I/O as well. Fix
unpause() to unpause asynchronously on async sockets.

* libsoup/soup-session-async.c (send_message): Iterate session's
async_context, not the default main context.

* tests/pull-api.c: Test/sample of creating a pull-style API using
SoupSessionAsync.

* tests/index.txt: new file to act as DirectoryIndex for the
tests. (In particular, pull-api wants this to be largeish.)

svn path=/trunk/; revision=952

17 years ago2.2.103 LIBSOUP_2_2_103
Dan Winship [Sun, 28 Oct 2007 17:50:14 +0000 (17:50 +0000)]
2.2.103

* configure.in: 2.2.103

* NEWS: update

svn path=/trunk/; revision=949

17 years agoremove the g_return_if_fail()s from the last patch so I don't end up breaking
Dan Winship [Sun, 28 Oct 2007 17:29:47 +0000 (17:29 +0000)]
remove the g_return_if_fail()s from the last patch so I don't end up breaking
anything that worked before...

svn path=/trunk/; revision=948

17 years agoref the socket around the processing of the message, since otherwise it
Dan Winship [Sun, 28 Oct 2007 17:23:38 +0000 (17:23 +0000)]
ref the socket around the processing of the message, since otherwise it

* libsoup/soup-server.c (start_request, request_finished): ref the
socket around the processing of the message, since otherwise it
might already be freed when request_finished runs. #459896.

* libsoup/soup-message-io.c (soup_message_io_pause)
(soup_message_io_unpause): Clarify the docs here; this is for
server-side use only. Inspired by #452280.

* docs/reference/server-howto.xml: You need to watch the
"finished" signal on the message if using soup_message_io_pause()
or chunked encoding, because the client might disconnect while
you're paused. Clarification inspired by #471385.

* tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
server-howto.xml points to it as an example of what to do.

svn path=/trunk/; revision=947

17 years agofree proxy-related stuff
Dan Winship [Sun, 28 Oct 2007 16:11:02 +0000 (16:11 +0000)]
free proxy-related stuff

* libsoup/soup-session.c (finalize): free proxy-related stuff

* libsoup/soup-session-async.c (idle_run_queue): clean up the weak
pointer

* tests/*.c: fix leaks

svn path=/trunk/; revision=946

17 years agoMake these less verbose by default (to make it easier to see what failed
Dan Winship [Sun, 28 Oct 2007 15:57:55 +0000 (15:57 +0000)]
Make these less verbose by default (to make it easier to see what failed

* tests/auth-test.c:
* tests/date.c:
* tests/header-parsing.c:
* tests/ntlm-test.c:
* tests/proxy-test.c:
* tests/uri-parsing.c:
* tests/xmlrpc-test.c: Make these less verbose by default (to make
it easier to see what failed when a "make check" fails).

svn path=/trunk/; revision=945

17 years ago2.2.102 LIBSOUP_2_2_102
Dan Winship [Mon, 15 Oct 2007 14:41:30 +0000 (14:41 +0000)]
2.2.102

* configure.in: 2.2.102

* NEWS: update

svn path=/trunk/; revision=942

17 years agoupdate
Dan Winship [Mon, 15 Oct 2007 14:40:58 +0000 (14:40 +0000)]
update

svn path=/trunk/; revision=941

17 years agoUpdate for current soup-ssl.h prototypes
Dan Winship [Tue, 9 Oct 2007 20:55:22 +0000 (20:55 +0000)]
Update for current soup-ssl.h prototypes

* libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes

* tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL

svn path=/trunk/; revision=940

17 years agosrcdir != builddir fixes LIBSOUP_2_2_101
Dan Winship [Fri, 5 Oct 2007 16:34:32 +0000 (16:34 +0000)]
srcdir != builddir fixes

* tests/httpd.conf.in:
* tests/Makefile.am:
* tests/ssl-test.c: srcdir != builddir fixes

svn path=/trunk/; revision=937

17 years ago2.2.101
Dan Winship [Fri, 5 Oct 2007 15:54:32 +0000 (15:54 +0000)]
2.2.101

* configure.in: 2.2.101

* NEWS: update

svn path=/trunk/; revision=936

17 years agoDon't crash if the authenticate callback returns a username and no
Dan Winship [Fri, 5 Oct 2007 15:51:27 +0000 (15:51 +0000)]
Don't crash if the authenticate callback returns a username and no

* libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
if the authenticate callback returns a username and no password
(even though it's not supposed to do that). #480987

svn path=/trunk/; revision=935

17 years agoadd "realm" field to the struct. (SoupAuthClass) remove "get_realm"
Dan Winship [Tue, 25 Sep 2007 03:11:18 +0000 (03:11 +0000)]
add "realm" field to the struct. (SoupAuthClass) remove "get_realm"

* libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
(SoupAuthClass) remove "get_realm" virtual method.

* libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
WWW-Authenticate/Proxy-Authenticate header here, set realm, and
pass the params hash to the construct method.
(soup_auth_get_info): Return an identifier for the auth:
"SCHEME:REALM"

* libsoup/soup-auth-basic.c:
* libsoup/soup-auth-digest.c: update

* libsoup/soup-session.c (invalidate_auth, update_auth_internal):
use soup_auth_get_info().

svn path=/trunk/; revision=934

17 years agominor rfc850-date parsing improvement suggested by RFC2616 19.3.
Dan Winship [Tue, 25 Sep 2007 00:23:17 +0000 (00:23 +0000)]
minor rfc850-date parsing improvement suggested by RFC2616 19.3.

* libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
improvement suggested by RFC2616 19.3.

* libsoup/soup-headers.c (soup_headers_parse_request): allow
erroneous trailing whitespace after HTTP version. #475169

* libsoup/soup-message-server-io.c (parse_request_headers): fix
the parsing of the Host header to assume it already includes the
port (which it should; the only reason this ever worked is because
SoupUri ignores the second port number when parse_request_headers
generates a URL like "http://localhost:9999:9999/").

* tests/header-parsing.c (reqtests): add a test for #475169

svn path=/trunk/; revision=933

17 years agoremove a mysterious partial sentence in the ::wrote-chunk docstring.
Dan Winship [Mon, 24 Sep 2007 01:00:04 +0000 (01:00 +0000)]
remove a mysterious partial sentence in the ::wrote-chunk docstring.

* libsoup/soup-message.c (soup_message_class_init): remove a
mysterious partial sentence in the ::wrote-chunk docstring.
#458116

* docs/reference/libsoup-sections.txt: Remove documentation of MD5
methods, which are not public. #440092

svn path=/trunk/; revision=932

17 years agoupdate
Dan Winship [Mon, 24 Sep 2007 00:53:31 +0000 (00:53 +0000)]
update

svn path=/trunk/; revision=931

17 years agoOnly remove the Authorization / Proxy-Authorization header from the
Dan Winship [Mon, 24 Sep 2007 00:53:00 +0000 (00:53 +0000)]
Only remove the Authorization / Proxy-Authorization header from the

* libsoup/soup-message.c (soup_message_set_auth)
(soup_message_set_proxy_auth): Only remove the Authorization /
Proxy-Authorization header from the message if it was previously
set by soup_message_set_auth(). (Eg, not if it was added by
SoupConnectionNTLM.) #471389

* libsoup/soup-connection-ntlm.h: fix a search-and-replace-o

* tests/ntlm-test.c: Simple NTLM regression test; doesn't really
test the crypto/encoding bits, just that the right headers are
being sent at the right times.

svn path=/trunk/; revision=930

17 years ago Make "make check" pass on Fedora 7:
Dan Winship [Fri, 14 Sep 2007 19:50:23 +0000 (19:50 +0000)]
Make "make check" pass on Fedora 7:

* configure.in: update apache/php tests with additional filenames

* tests/httpd.conf.in: updates for configure.in changes and
slightly-more-recent apache

* tests/ssl-test.c (start_writing): fix uninitialized struct field
(main): start server after setting up client since otherwise
there's a race condition since soup_gnutls_init() isn't actually
thread-safe. (FIXME)

* tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
(which only exists if register_globals is set)

svn path=/trunk/; revision=929

17 years agoupdate for new maintainers format (and remove old email address)
Dan Winship [Thu, 9 Aug 2007 14:45:43 +0000 (14:45 +0000)]
update for new maintainers format (and remove old email address)

svn path=/trunk/; revision=927

17 years agofix. noted by "cascardo" on libsoup-list.
Dan Winship [Fri, 1 Jun 2007 20:46:15 +0000 (20:46 +0000)]
fix. noted by "cascardo" on libsoup-list.

* libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
fix. noted by "cascardo" on libsoup-list.

svn path=/trunk/; revision=926

17 years agoadd G_BEGIN_DECLS / G_END_DECLS to all installed headers so that libsoup
Jonathon Jongsma [Fri, 1 Jun 2007 20:41:47 +0000 (20:41 +0000)]
add G_BEGIN_DECLS / G_END_DECLS to all installed headers so that libsoup

2007-05-16  Jonathon Jongsma  <jjongsma@gnome.org>

* libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
headers so that libsoup can be used from C++ programs. #438776

svn path=/trunk/; revision=925

17 years agoMake a real SoupSSLCredentials type rather than just using gpointer
Dan Winship [Mon, 16 Apr 2007 17:40:25 +0000 (17:40 +0000)]
Make a real SoupSSLCredentials type rather than just using gpointer

* libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
than just using gpointer

* libsoup/soup-server.c (SoupServerPrivate): use it

* libsoup/soup-session.c (SoupSessionPrivate): use it

* libsoup/soup-gnutls.c: Use it, and consistently use "creds"
rather than "cred" as the abbreviation for "credentials".

* docs/reference/libsoup-sections.txt:
* docs/reference/tmpl/soup-misc.sgml:
* docs/reference/tmpl/soup-ssl.sgml: update

svn path=/trunk/; revision=924

17 years agoImplement this by sending the message (synchronously) in another thread
Dan Winship [Fri, 30 Mar 2007 14:58:54 +0000 (14:58 +0000)]
Implement this by sending the message (synchronously) in another thread

* libsoup/soup-session-sync.c (queue_message): Implement this by
sending the message (synchronously) in another thread and then
queueing the callback back in the main thread.

* libsoup/soup-session.c (soup_session_queue_message): update docs
to be more explicit about what thread the callback occurs in

svn path=/trunk/; revision=923

17 years agoget/set auth/proxy_auth info for a message.
Dan Winship [Sat, 17 Mar 2007 18:51:28 +0000 (18:51 +0000)]
get/set auth/proxy_auth info for a message.

* libsoup/soup-message.c (soup_message_set_auth)
(soup_message_get_auth, soup_message_set_proxy_auth)
(soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
message.

* libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
soup_message_set_proxy_auth.
(update_auth_internal): Call soup_message_get_auth or
soup_message_get_proxy_auth to determine the message's prior auth,
rather than calling lookup_auth() again, since it isn't guaranteed
to return the same thing now as it did when the message was
originally sent. Fixes erroneous 401s when queuing multiple
messages at once to an as-yet-unauthenticated-to server. #271540

* libsoup/soup-session-async.c (queue_message): don't run the
queue right away, do it at idle time. Otherwise in some cases
(especially errors), the message callbacks could be invoked before
queue_message returns.

* tests/auth-test.c: add a regression test for #271540.

svn path=/trunk/; revision=922

17 years agorequire glib 2.12. check for timegm().
Dan Winship [Sat, 17 Mar 2007 17:55:30 +0000 (17:55 +0000)]
require glib 2.12. check for timegm().

* configure.in: require glib 2.12. check for timegm().

* libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
(soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
patch from Emmanuele Bassi.

* libsoup/soup-types.h: remove local copy of
G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
glib.

* libsoup/soup-misc.c (soup_base64_encode_close)
(soup_base64_encode_step, soup_base64_encode)
(soup_base64_decode_step): Make these just be wrappers around the
glib base64 methods. (For now; eventually they'll just go away.)

* libsoup/soup-auth-basic.c (authenticate):
* libsoup/soup-auth-digest.c (authenticate):
* libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
(soup_ntlm_response):
* libsoup/soup-server-auth.c (soup_server_auth_new):
* libsoup/soup-soap-message.c (soup_soap_message_write_base64):
* libsoup/soup-xmlrpc-message.c
(soup_xmlrpc_message_write_base64):
* libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
Use glib base64 methods

svn path=/trunk/; revision=921

17 years agoupdate the handling of CONNECT: it has no response body by default, but
Dan Winship [Fri, 16 Mar 2007 21:02:17 +0000 (21:02 +0000)]
update the handling of CONNECT: it has no response body by default, but

* libsoup/soup-message.c (soup_message_get_response_encoding):
update the handling of CONNECT: it has no response body by
default, but does have a body if its headers say so.

* tests/proxy-test.c: test libsoup's behavior when talking to
proxies.

* tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
sections configuring them, for proxy-test

* configure.in: update the apache-module-dir-finding code to deal
with the fact that some modules (eg, mod_ssl) might only be in the
mpm-specific module dir, while others (eg, mod_php5) might only be
in the generic module dir.

svn path=/trunk/; revision=920

17 years agoadd <sys/socket.h> for solaris. #418919, from Wang Xin
Dan Winship [Fri, 16 Mar 2007 18:07:57 +0000 (18:07 +0000)]
add <sys/socket.h> for solaris. #418919, from Wang Xin

svn path=/trunk/; revision=919

17 years agoadd $(LIBGNUTLS_CFLAGS) for ssl-test. #417617, patch from Elijah Newren.
Dan Winship [Tue, 13 Mar 2007 01:00:54 +0000 (01:00 +0000)]
add $(LIBGNUTLS_CFLAGS) for ssl-test. #417617, patch from Elijah Newren.

* tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
ssl-test. #417617, patch from Elijah Newren.

svn path=/trunk/; revision=917

17 years agoif soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then try
Dan Winship [Tue, 13 Mar 2007 00:58:28 +0000 (00:58 +0000)]
if soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then try

* libsoup/soup-session-sync.c (wait_for_connection): if
soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
where-the-proxy-closes-the-connection-when-returning-407. (Reported
by Varadhan.)

* tests/get.c: Rewrite to use soup_session_send_message rather
than soup_session_queue_message, and add a "-s" flag to use
SoupSessionSync rather than SoupSessionAsync (so we can test bugs
in the sync code paths).

svn path=/trunk/; revision=916

17 years agodon't return G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep
Dan Winship [Thu, 8 Mar 2007 21:11:00 +0000 (21:11 +0000)]
don't return G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep

* libsoup/soup-gnutls.c (do_handshake): don't return
G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
until the handshake is complete.
(soup_gnutls_read, soup_gnutls_write): if we get
GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
returning G_IO_STATUS_AGAIN; if the socket is blocking then
G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.

#415402, based on a patch from Jacob Berkman.

* tests/ssl-test.c: basic ssl test. In particular, tests that
rehandshake requests are handled correctly during both synchronous
and asynchronous I/O. Might eventually test other stuff too...

* configure.in:
* tests/Makefile.am: updates for ssl-test

svn path=/trunk/; revision=914

17 years agoGet gcrypt libs/cflags.
Dan Winship [Mon, 19 Feb 2007 23:31:38 +0000 (23:31 +0000)]
Get gcrypt libs/cflags.

* configure.in: Get gcrypt libs/cflags.

* libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498

svn path=/trunk/; revision=913

17 years agoFixed soup_headers_parse_status_line() so WebDAV response parsing will LIBSOUP_2_2_100 SOUP_2_2_100
Dan Winship [Mon, 12 Feb 2007 15:35:04 +0000 (15:35 +0000)]
Fixed soup_headers_parse_status_line() so WebDAV response parsing will

* Fixed soup_headers_parse_status_line() so WebDAV response
          parsing will work again. [406997]

* Fixed a bug in the header-parsing regression test that
          caused the test to fail sometimes, even though the actual
          header-parsing code was fine.

svn path=/trunk/; revision=910

17 years agoFix this to handle "\0"-terminated status lines (eg, from WebDAV
Dan Winship [Mon, 12 Feb 2007 15:14:08 +0000 (15:14 +0000)]
Fix this to handle "\0"-terminated status lines (eg, from WebDAV

* libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
this to handle "\0"-terminated status lines (eg, from WebDAV
responses), like the docs say it does. #406997
(soup_headers_parse): Balance that out by rejecting internal "\0"s
here.
(soup_headers_parse_request, soup_headers_parse_response): Update
docs to warn that @dest may be modified even on error. (This was
always true, it just wasn't documented.)

svn path=/trunk/; revision=909

17 years agoinitialize "errors" to 0. duh. Pointed out by Michael Wolf.
Dan Winship [Tue, 16 Jan 2007 20:54:02 +0000 (20:54 +0000)]
initialize "errors" to 0. duh. Pointed out by Michael Wolf.

* tests/header-parsing.c (do_request_tests, do_response_tests):
initialize "errors" to 0. duh. Pointed out by Michael Wolf.

svn path=/trunk/; revision=908

17 years ago2.2.99 LIBSOUP_2_2_99
Dan Winship [Mon, 8 Jan 2007 21:20:07 +0000 (21:20 +0000)]
2.2.99

        * configure.in: 2.2.99

        * NEWS: update

svn path=/trunk/; revision=906

17 years agoRewrite this to be easier to understand and more correct, and make the
Dan Winship [Sat, 6 Jan 2007 19:24:44 +0000 (19:24 +0000)]
Rewrite this to be easier to understand and more correct, and make the

* libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
easier to understand and more correct, and make the "str" param
const rather than overwriting it during parsing.
(soup_headers_parse_request, soup_headers_parse_response):
Likewise, make "str" param const. Fix the doc comment to describe
the correct constraint on str. Make the parsing slightly more
lenient as per sections 4.1 and 19.3 of RFC 2616.

* tests/header-parsing.c: new regression test, for Request-Line,
Status-Line, and message-header parsing.

Inspired by #391970 (crash in SoupServer when certain invalid
requests are received).

svn path=/trunk/; revision=905

17 years agoFree ssl_creds. Pointed out by Chris Austin.
Dan Winship [Tue, 5 Dec 2006 19:03:27 +0000 (19:03 +0000)]
Free ssl_creds. Pointed out by Chris Austin.

* libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
by Chris Austin.

17 years agoRemove the calls to soup_message_io_stop() here; the corresponding calls
Dan Winship [Tue, 5 Dec 2006 18:37:16 +0000 (18:37 +0000)]
Remove the calls to soup_message_io_stop() here; the corresponding calls

* libsoup/soup-message.c (soup_message_set_uri): Remove the calls
to soup_message_io_stop() here; the corresponding calls were
needed back in the SoupContext days, but they are wrong now and
cause async-redirects-to-other-hosts to fail. #382251. Also
clarify docs with respect to soup_session_requeue_message().

* libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs

18 years ago2.2.98 LIBSOUP_2_2_98
Dan Winship [Mon, 20 Nov 2006 21:52:58 +0000 (21:52 +0000)]
2.2.98

* configure.in: 2.2.98

* NEWS: update

18 years ago Patch from Andrew W. Nosenko:
Dan Winship [Mon, 20 Nov 2006 21:47:04 +0000 (21:47 +0000)]
Patch from Andrew W. Nosenko:

* libsoup/soup-message-client-io.c (parse_response_headers): Avoid
memory leak when parse_response_headers() is called on a message
that has a 'reason_phrase' already for some reason.

* libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
hostname was not freed.
(soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
'chan' was not freed in case of initialization error. Avoid double
close of the "real" (plain, non-ssl) channel FD.

* libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
memory leak: the "real" (plain, non-ssl) GIOChannel was never
"finally" unreffed (one more *_ref() than *_unref()) in case of
ssl-wrapping.

18 years agoAdd some missing "static"s. Patch from Matthias Clasen, #376387
Dan Winship [Mon, 20 Nov 2006 21:38:18 +0000 (21:38 +0000)]
Add some missing "static"s. Patch from Matthias Clasen, #376387

* libsoup/soup-connection-ntlm.c (send_request):
* libsoup/soup-session-sync.c (queue_message):
* libsoup/soup-status.c (reason_phrases): Add some missing
"static"s. Patch from Matthias Clasen, #376387

18 years ago<value>foo</value> should mean the same thing as
Dan Winship [Mon, 20 Nov 2006 21:34:53 +0000 (21:34 +0000)]
<value>foo</value> should mean the same thing as

* libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
(soup_xmlrpc_value_get_string): <value>foo</value> should mean the
same thing as <value><string>foo</string></value>. Pointed out by
Todd Kulesza. #364490

18 years agoBump version to 2.2.97. Bump AGE and CURRENT for addition of LIBSOUP_2_2_97
Dan Winship [Mon, 6 Nov 2006 20:55:24 +0000 (20:55 +0000)]
Bump version to 2.2.97. Bump AGE and CURRENT for addition of

* configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
addition of soup_xml_real_node.

* NEWS: update

18 years agonew method to find a "real" (ie, not comment or whitespace) xml node
Dan Winship [Mon, 6 Nov 2006 20:35:28 +0000 (20:35 +0000)]
new method to find a "real" (ie, not comment or whitespace) xml node

* libsoup/soup-misc.c (soup_xml_real_node): new method to find a
"real" (ie, not comment or whitespace) xml node

* libsoup/soup-soap-response.c (parse_parameters)
(soup_soap_response_from_string)
(soup_soap_parameter_get_first_child)
(soup_soap_parameter_get_next_child): Use soup_xml_real_node.
Based on a patch from Andrew W. Nosenko.

* libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
don't call xmlKeepBlanksDefault, which changes libxml's behavior
globally! Instead, use soup_xml_real_node() when traversing the
xml tree.

* libsoup/soup-xmlrpc-response.c
(soup_xmlrpc_response_from_string): don't call
xmlKeepBlanksDefault.
(exactly_one_child): rewrite in terms of soup_xml_real_node()
(which means it handles comments now as well)
(soup_xmlrpc_value_get_struct)
(soup_xmlrpc_value_array_get_iterator)
(soup_xmlrpc_value_array_iterator_prev)
(soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.

18 years agomisc minor updates
Dan Winship [Sun, 5 Nov 2006 22:01:59 +0000 (22:01 +0000)]
misc minor updates

18 years agodocument this (in particular, point out that str+len must point to exactly
Dan Winship [Sun, 5 Nov 2006 22:01:27 +0000 (22:01 +0000)]
document this (in particular, point out that str+len must point to exactly

* libsoup/soup-headers.c (soup_headers_parse_request): document
this (in particular, point out that str+len must point to exactly
the right place). Allow req_method and req_path to be NULL.
(soup_headers_parse_status_line, soup_headers_parse_response):
document. Also, change "status_phrase" argument to "reason_phrase"
to match the spec. Inspired by #339889.

18 years agoFix an off by one pointed out by Andrew W. Nosenko.
Dan Winship [Fri, 3 Nov 2006 18:32:16 +0000 (18:32 +0000)]
Fix an off by one pointed out by Andrew W. Nosenko.

* libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
pointed out by Andrew W. Nosenko.

18 years agofix lots of warnings. Partially from patches from Andrew W. Nosenko, and
Dan Winship [Fri, 3 Nov 2006 18:31:08 +0000 (18:31 +0000)]
fix lots of warnings. Partially from patches from Andrew W. Nosenko, and

* libsoup/*.c: fix lots of warnings. Partially from patches from
Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.

18 years agoremove gnutls stuff (we're using pkg-config now)
Dan Winship [Fri, 3 Nov 2006 18:12:15 +0000 (18:12 +0000)]
remove gnutls stuff (we're using pkg-config now)

* acinclude.m4: remove gnutls stuff (we're using pkg-config now)

18 years agouninstall the pkgconfig file. Based on #356809 from Matthew Barnes.
Dan Winship [Fri, 3 Nov 2006 17:58:33 +0000 (17:58 +0000)]
uninstall the pkgconfig file. Based on #356809 from Matthew Barnes.

* Makefile.am (uninstall-local): uninstall the pkgconfig file.
Based on #356809 from Matthew Barnes.

18 years agoFix leaks pointed out by Paolo Borelli. #351500
Dan Winship [Fri, 3 Nov 2006 17:54:02 +0000 (17:54 +0000)]
Fix leaks pointed out by Paolo Borelli. #351500

* libsoup/soup-server.c (get_property): Fix leaks pointed out by
Paolo Borelli. #351500

18 years agoUse pkgconfig to find gnutls. Remove old static linking stuff that was
Dan Winship [Fri, 3 Nov 2006 17:36:23 +0000 (17:36 +0000)]
Use pkgconfig to find gnutls. Remove old static linking stuff that was

* configure.in: Use pkgconfig to find gnutls. Remove old static
linking stuff that was only needed for rcd.

* libsoup.pc.in: Use Requires rather than putting xml/ssl
dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
#343340.

18 years agofix build on cygwin. From "Cygwin Ports maintainer", #321827.
Dan Winship [Fri, 3 Nov 2006 16:46:38 +0000 (16:46 +0000)]
fix build on cygwin. From "Cygwin Ports maintainer", #321827.

* libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
cygwin. From "Cygwin Ports maintainer", #321827.

18 years agoupdate
Dan Winship [Fri, 3 Nov 2006 16:46:15 +0000 (16:46 +0000)]
update

18 years ago2.2.96. bump AGE and CURRENT for new API LIBSOUP_2_2_96
Dan Winship [Mon, 24 Jul 2006 22:14:56 +0000 (22:14 +0000)]
2.2.96. bump AGE and CURRENT for new API

* configure.in: 2.2.96. bump AGE and CURRENT for new API

* NEWS: update

* libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
New, from Fernando Herrera, bug 348532.

18 years agoNew, from Fernando Herrera, bug 348532.
Dan Winship [Mon, 24 Jul 2006 22:05:57 +0000 (22:05 +0000)]
New, from Fernando Herrera, bug 348532.

* libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
New, from Fernando Herrera, bug 348532.

18 years agoif the constructed auth doesn't have a realm, it's invalid, as per RFC
Dan Winship [Fri, 21 Jul 2006 18:55:46 +0000 (18:55 +0000)]
if the constructed auth doesn't have a realm, it's invalid, as per RFC

* libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
constructed auth doesn't have a realm, it's invalid, as per RFC
2617. Based on a patch from Nate Nielsen on libsoup-list.
(soup_auth_get_realm): remove "if available" from docs; all auths
always have a realm.

18 years agoupdate to mention mailing list and bugzilla
Dan Winship [Fri, 21 Jul 2006 18:06:47 +0000 (18:06 +0000)]
update to mention mailing list and bugzilla

* README: update to mention mailing list and bugzilla

* HACKING: kill this since there's nothing here that isn't either
obvious, or redundant with the README

18 years agoIf the server handler set a Content-Length header on the message, don't
Dan Winship [Fri, 21 Jul 2006 18:05:53 +0000 (18:05 +0000)]
If the server handler set a Content-Length header on the message, don't

* libsoup/soup-message-server-io.c (get_response_headers): If the
server handler set a Content-Length header on the message, don't
add a second one. (Preserves compatibility with an old hacky way
that people might have been handling HEAD from SoupServer.)

18 years agoinitialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
Dan Winship [Fri, 21 Jul 2006 16:36:56 +0000 (16:36 +0000)]
initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than

* libsoup/soup-server-message.c (soup_server_message_init):
initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
actually worked here, and so there was an undocumented requirement
that you manually set the encoding on every response
(which SoupServer itself was not doing on internal errors).
Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
(soup_server_message_set_encoding): reject the new
SoupTransferEncoding values, for compatibility

* libsoup/soup-message.h (SoupTransferEncoding): Clarify that
SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
public API, it always has been, due to bugs. Add some new values,
currently just for internal use: SOUP_TRANSFER_NONE (for cases
like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
actually implemented yet).

* libsoup/soup-message.c (soup_message_get_request_encoding,
soup_message_get_response_encoding): figure out the body encoding
being used by the request/response, including all the tricky
cases like HEAD/1xx/etc.
(soup_message_is_keepalive): if the response encoding is
SOUP_TRANSFER_EOF, then the message isn't keepalive.

* libsoup/soup-message-client-io.c (parse_response_headers): use
soup_message_get_response_encoding.

* libsoup/soup-message-server-io.c (parse_request_headers): use
soup_message_get_request_encoding.
(get_response_headers): use both soup_server_message_get_encoding
and soup_message_get_response_encoding, to properly distinguish
between the wire encoding and the alleged-by-headers encoding
(which differ for HEAD, etc).

* libsoup/soup-message-io.c (io_error, read_body_chunk):
s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
(io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
SOUP_MESSAGE_IO_STATE_FINISHING.

* libsoup/soup-server.c (request_finished): Check
soup_socket_is_connected() *before* soup_message_is_keepalive(),
since the message will be invalid if the client unexpectedly
dropped the connection.

* tests/simple-httpd.c (server_callback): handle HEAD requests.
Remove no-longer-necessary soup_server_message_set_encoding()
call.

* tests/get.c: add -d (debug) flag to print headers, and -h flag
to do a HEAD rather than GET

18 years agosync to xmlrpc changes
Dan Winship [Thu, 13 Jul 2006 13:44:02 +0000 (13:44 +0000)]
sync to xmlrpc changes

18 years ago2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this time. Pointed out by Daniel LIBSOUP_2_2_95_1
Dan Winship [Mon, 10 Jul 2006 16:26:20 +0000 (16:26 +0000)]
2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this time. Pointed out by Daniel

* configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
time. Pointed out by Daniel Holbach.

* configure.in: 2.2.95

* NEWS: update

18 years agodon't build xmlrpc-test unless we have apache/php/xmlrpc-epi. Fixes the
Dan Winship [Mon, 19 Jun 2006 20:23:12 +0000 (20:23 +0000)]
don't build xmlrpc-test unless we have apache/php/xmlrpc-epi. Fixes the

* tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
unless we have apache/php/xmlrpc-epi. Fixes the build. #345342

* configure.in: fix some quoting

18 years agoadd tests for apache mod_php5 and xmlrpc-epi-php
Dan Winship [Mon, 19 Jun 2006 16:57:47 +0000 (16:57 +0000)]
add tests for apache mod_php5 and xmlrpc-epi-php

        * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php

        * tests/xmlrpc-test.c: XML-RPC regression test

        * tests/xmlrpc-server.php: PHP server for xmlrpc-test

        * tests/httpd.conf.in: add php stuff

        * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
        rather than "stop", so that it stops listening on the socket
        before exiting, so that we can immediately start another apache
        (eg, in "make check").

        * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
        counting.

        * libsoup/soup-xmlrpc-message.c
        (soup_xmlrpc_message_write_datetime): rename from
        "..._write_time", to make it consistent with the XML-RPC type name
        and the corresponding SoupXmlrpcResponse method. Also, fix it to
        use the same ISO 8601 format as the spec, and use the right value
        for the seconds field.
        (soup_xmlrpc_message_write_base64): Change the buf arg to a
        gconstpointer rather than a const char *.

        * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
        Return a GByteArray containing the decoded data, rather than
        the base64-encoded string.
        (soup_xmlrpc_value_dump_internal): Update for that (and don't
        leak it).
        (soup_xmlrpc_value_array_get_iterator,
        soup_xmlrpc_value_array_iterator_get_value): Make these actually
        work.

18 years ago2.2.94 LIBSOUP_2_2_94
Dan Winship [Mon, 12 Jun 2006 19:36:27 +0000 (19:36 +0000)]
2.2.94

        * configure.in: 2.2.94

        * NEWS: update

18 years agomake auth-test distcheck
Dan Winship [Mon, 12 Jun 2006 19:36:14 +0000 (19:36 +0000)]
make auth-test distcheck

18 years agodist client-howto.xml and server-howto.xml
Dan Winship [Mon, 12 Jun 2006 19:35:45 +0000 (19:35 +0000)]
dist client-howto.xml and server-howto.xml

18 years agos/SOAP/XMLRPC/ in one place where it was missed long ago
Dan Winship [Mon, 12 Jun 2006 19:35:12 +0000 (19:35 +0000)]
s/SOAP/XMLRPC/ in one place where it was missed long ago

18 years agoNew client and server API tutorials.
Dan Winship [Mon, 12 Jun 2006 19:19:19 +0000 (19:19 +0000)]
New client and server API tutorials.

* docs/reference/client-howto.xml:
* docs/reference/server-howto.xml: New client and server API
tutorials.

* docs/reference/*: reorganize, regenerate, fill in some missing
pieces, etc

* libsoup/soup-connection.c (soup_connection_new): document the
varargs param

* libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.

* libsoup/soup-headers.c (soup_headers_parse_response): fix typo
in doc.

18 years agoFurther fixes from Brent Smith. #344458. (soup_xmlrpc_value_get_boolean):
Dan Winship [Mon, 12 Jun 2006 15:19:29 +0000 (15:19 +0000)]
Further fixes from Brent Smith. #344458. (soup_xmlrpc_value_get_boolean):

* libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
#344458.
(soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
the output parameter and make the return value match the other
get_* methods.

18 years agoAdd tests for apache, output tests/httpd.conf
Dan Winship [Fri, 9 Jun 2006 16:28:13 +0000 (16:28 +0000)]
Add tests for apache, output tests/httpd.conf

* configure.in: Add tests for apache, output tests/httpd.conf

* tests/htdigest:
* tests/htpasswd:
* tests/httpd.conf.in: Apache 2.2 config files for auth-test

* tests/apache-wrapper.c (apache_init, apache_cleanup): functions
to start/stop apache

* tests/auth-test.c: Use apache-wrapper functions to start a local
apache process to test authentication against, since the auth-test
tree at developer.ximian.com went missing a long time ago. #311825

* tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
(TESTS): include auth-test if HAVE_APACHE.

* libsoup/soup-session.c (lookup_auth): Fix this in the case of a
URI pointing to a directory rather than a file.

18 years agoCheck return value of strtol/g_ascii_strtod correctly. #344222, patch from
Dan Winship [Thu, 8 Jun 2006 12:40:19 +0000 (12:40 +0000)]
Check return value of strtol/g_ascii_strtod correctly. #344222, patch from

* libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
Check return value of strtol/g_ascii_strtod correctly. #344222,
patch from Brent Smith.

18 years agorecord whether or not the response was a fault.
Dan Winship [Wed, 7 Jun 2006 19:42:21 +0000 (19:42 +0000)]
record whether or not the response was a fault.

* libsoup/soup-xmlrpc-response.c
 (soup_xmlrpc_response_from_string): record whether or not the
 response was a fault.
 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
 Brent Smith.

18 years ago2.2.93 LIBSOUP_2_2_93
Dan Winship [Mon, 29 May 2006 19:52:02 +0000 (19:52 +0000)]
2.2.93

* configure.in: 2.2.93

* NEWS: update

18 years agoadd a new state "FINISHING" which means "done I/O, but not yet done
Dan Winship [Mon, 29 May 2006 19:41:14 +0000 (19:41 +0000)]
add a new state "FINISHING" which means "done I/O, but not yet done

* libsoup/soup-message-io.c (SoupMessageIOState): add a new state
"FINISHING" which means "done I/O, but not yet done processing and
cleanup" before "DONE" (which now always means "completely done").
(soup_message_io_stop): disconnect the socket if the read state is
"< FINISHING", not "!= DONE".
(io_error): on an EOF-that-signals-end-of-data, set state to
FINISHING and run io_read().
(io_read, io_write): remove the g_return_if_fails from before.
s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
listening for the readable/writable signal (eg, so we don't end up
reading a following pipelined request), and set the state to DONE.
(soup_message_io_unpause): Only reconnect the readable/writable
signals if the io state isn't DONE. Guard the calls to
io_read/io_write better so that it's safe to call this even after
they are both DONE, since it may be easier for us to test that
than for the caller to.

Fixes 334469, 342640, and another bug caused by the earlier
workaround to 334469. Based on patches and analysis from William
Jon McCann and Armin Bauer.

* tests/simple-proxy.c (main): add g_thread_init (NULL) to make
this work again. (Pointed out by Alex Larsson)

18 years ago#include <sys/time.h> for struct timeval. #342048
Dan Winship [Fri, 26 May 2006 21:24:58 +0000 (21:24 +0000)]
#include <sys/time.h> for struct timeval. #342048

* libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
#342048

18 years agoStart SSL after CONNECTing! Doh. Part of bnc #174255.
Dan Winship [Fri, 26 May 2006 18:14:37 +0000 (18:14 +0000)]
Start SSL after CONNECTing! Doh. Part of bnc #174255.

* libsoup/soup-connection.c (soup_connection_connect_sync): Start
SSL after CONNECTing! Doh. Part of bnc #174255.
(SoupConnectionMode): new enum for the three types of
SoupConnection (direct, proxy, tunnel).
(set_property): set priv->mode according to proxy_uri and
conn_uri.
(socket_connect_result, soup_connection_connect_sync): use
priv->mode to decide whether or not to tunnel.
(send_request): Only pass TRUE for is_proxy to
soup_message_send_request if mode is PROXY, not if it's TUNNEL.
(Also part of bnc #174255).

18 years agotests if IO is currently in progress on a message.
Dan Winship [Fri, 26 May 2006 14:40:11 +0000 (14:40 +0000)]
tests if IO is currently in progress on a message.

* libsoup/soup-message-io.c (soup_message_io_in_progress): tests
if IO is currently in progress on a message.

* libsoup/soup-session-async.c (run_queue): don't process messages
that are io_in_progress. #342545, fix based on analysis from Wang
Xin. (In the future we may want to re-fix this by adding a
REQUEUED message status separate from QUEUED.)

18 years agoDon't free the hosts while holding host_lock; that's not allowed and can
Dan Winship [Mon, 22 May 2006 14:47:30 +0000 (14:47 +0000)]
Don't free the hosts while holding host_lock; that's not allowed and can

        * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
        while holding host_lock; that's not allowed and can cause
        deadlock. #309867. Based on a patch from Veerapuram Varadhan for
        part of bnc #174255.

18 years agobump version to 2.2.92 LIBSOUP_2_2_92
Dan Winship [Mon, 10 Apr 2006 18:09:59 +0000 (18:09 +0000)]
bump version to 2.2.92

* configure.in: bump version to 2.2.92

* NEWS: update

18 years agog_return_if_fail if these get called after the IO is done. This isn't
Dan Winship [Mon, 10 Apr 2006 18:09:01 +0000 (18:09 +0000)]
g_return_if_fail if these get called after the IO is done. This isn't

        * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
        if these get called after the IO is done. This isn't supposed to
        happen, but apparently does. Workaround for #334469.

        * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
        NULL-terminate these so we don't crash when trying to parse an
        invalid value. (Flip side of the previous #328615 patch.)

18 years agoWrite out correct digest algorithm value. #328615.
Dan Winship [Mon, 3 Apr 2006 02:58:02 +0000 (02:58 +0000)]
Write out correct digest algorithm value. #328615.

        * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
        Write out correct digest algorithm value. #328615.