platform/upstream/libsoup.git
16 years ago2.23.1, bump AGE and CURRENT LIBSOUP_2_23_1
Dan Winship [Mon, 21 Apr 2008 20:18:18 +0000 (20:18 +0000)]
2.23.1, bump AGE and CURRENT

* configure.in: 2.23.1, bump AGE and CURRENT

* NEWS: update

svn path=/trunk/; revision=1138

16 years ago Fixes for GnuTLS support on Win32. #528752, patch from Marc Maurer
Dan Winship [Sun, 20 Apr 2008 23:11:54 +0000 (23:11 +0000)]
Fixes for GnuTLS support on Win32. #528752, patch from Marc Maurer

* libsoup/soup-gnutls.c (soup_ssl_wrap_iochannel): add an argument
saying whether or not the socket is non-blocking, since there's no
way to determine this from the fd in WinSock.
(do_handshake, soup_gnutls_read, soup_gnutls_write): Update for
that.

* libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Update for
that

* libsoup/soup-nossl.c (soup_ssl_wrap_iochannel): update the
declaration here too

* tests/ssl-test.c: Some updates to get this closer to working on
Windows...

svn path=/trunk/; revision=1137

16 years agoCheck that the cookie was parsed successfully before setting it
Chris Lord [Mon, 14 Apr 2008 21:15:49 +0000 (21:15 +0000)]
Check that the cookie was parsed successfully before setting it

        * libsoup/soup-cookie-jar.c (soup_cookie_jar_set_cookie):
        Check that the cookie was parsed successfully before setting it

svn path=/trunk/; revision=1136

16 years ago Initial HTTP cookie support imported from development git repo,
Dan Winship [Wed, 9 Apr 2008 02:02:02 +0000 (02:02 +0000)]
Initial HTTP cookie support imported from development git repo,
including patches from Xan Lopez.

TODO: make sure the logic in soup_cookie_jar_get_cookies() is
right. Add a test program to tests/.

* libsoup/soup-cookie.c: Code for parsing and generating HTTP
cookies.

* libsoup/soup-cookie-jar.c: Code for managing SoupCookies and
integrating cookie management with a SoupSession.

* libsoup/soup-date.c (soup_date_is_past): New, checks if a
SoupDate refers to a time in the past

* libsoup/soup-dns.c (soup_dns_is_ip_address): New, checks if a
string is a valid IP address

* libsoup/soup-headers.c (soup_header_parse_semi_param_list): New,
like soup_header_parse_param_list, but for semicolon-delimited
data.

svn path=/trunk/; revision=1135

16 years agoMake this a GObject and specifically a SoupSessionFeature. Add an
Dan Winship [Tue, 8 Apr 2008 22:13:03 +0000 (22:13 +0000)]
Make this a GObject and specifically a SoupSessionFeature. Add an

* libsoup/soup-auth-manager.c: Make this a GObject and
specifically a SoupSessionFeature. Add an "authenticate" signal,
and emit that rather than explicitly calling into the SoupSession
and telling it when to emit its own authenticate signal.

* libsoup/soup-auth-manager-ntlm.c: Make this a subclass of
SoupAuthManager, with NTLM support controllable via a property.

* libsoup/soup-session.c (soup_session_init): create an
auth_manager of type SOUP_TYPE_AUTH_MANAGER_NTLM, but defaulting
to USE_NTLM=FALSE. Connect to its "authenticate" signal, and call
soup_session_add_feature() on it.
(set_property, get_property): proxy the USE_NTLM property to the
auth manager.
(auth_manager_authenticate): signal handler for SoupAuthManager
"authenticate" signal. (Replaces soup_session_emit_authenticate(),
which is no longer needed)

svn path=/trunk/; revision=1134

16 years agoNew interface type representing a feature that can be added to a
Dan Winship [Tue, 8 Apr 2008 22:05:14 +0000 (22:05 +0000)]
New interface type representing a feature that can be added to a

* libsoup/soup-session-feature.c: New interface type representing
a feature that can be added to a SoupSession.

* libsoup/soup-session.c (soup_session_add_feature): Add a feature
to the session by prepending it to priv->features and calling
soup_session_feature_attach() on it.
(soup_session_add_feature_by_type): Add a feature to the session
by creating an object of the indicated type and passing it to
soup_session_add_feature.
(soup_session_remove_feature)
(soup_session_remove_feature_by_type): Likewise, remove features
(soup_session_class_init, set_property): register/handle
construct-time feature adding/removing properties
(dispose): cleanup features

* libsoup/soup-logger.c: port to SoupSessionFeature

* tests/test-utils.c (soup_test_session_new): Use
soup_session_add_feature rather than soup_logger_attach.

svn path=/trunk/; revision=1133

16 years agoHaving branched for gnome-2-22, bump version to 2.23.0 for the GNOME 2.23
Dan Winship [Tue, 8 Apr 2008 21:37:12 +0000 (21:37 +0000)]
Having branched for gnome-2-22, bump version to 2.23.0 for the GNOME 2.23

* configure.in: Having branched for gnome-2-22, bump version to
2.23.0 for the GNOME 2.23 series. SOUP_API_VERSION will stay at
2.4, which is confusing but seemed like the best solution at this
point.

svn path=/trunk/; revision=1132

16 years ago2.4.1. Bump AGE and CURRENT. LIBSOUP_2_4_1
Dan Winship [Mon, 7 Apr 2008 17:21:04 +0000 (17:21 +0000)]
2.4.1. Bump AGE and CURRENT.

* configure.in: 2.4.1. Bump AGE and CURRENT.

* NEWS: update

* docs/reference/libsoup-2.4-sections.txt: add new symbols

svn path=/trunk/; revision=1129

16 years agoIf pausing a message that was waiting to unpause, cancel the unpause.
Dan Winship [Mon, 7 Apr 2008 13:22:22 +0000 (13:22 +0000)]
If pausing a message that was waiting to unpause, cancel the unpause.

* libsoup/soup-message-io.c (soup_message_io_pause): If pausing a
message that was waiting to unpause, cancel the unpause.

svn path=/trunk/; revision=1128

16 years agoDon't cache negative results, even if the DNS server explicitly states
Dan Winship [Sat, 5 Apr 2008 20:27:28 +0000 (20:27 +0000)]
Don't cache negative results, even if the DNS server explicitly states

* libsoup/soup-dns.c (resolve_address, resolve_name): Don't
cache negative results, even if the DNS server explicitly states
that the host does not exist; some servers give different answers
to clients inside and outside their firewall. #523269,  Jörgen
Scheibengruber.

svn path=/trunk/; revision=1127

16 years agoNew, replaces SOUP_MESSAGE_OVERWRITE_CHUNKS, but can be set on either the
Dan Winship [Sat, 5 Apr 2008 19:35:35 +0000 (19:35 +0000)]
New, replaces SOUP_MESSAGE_OVERWRITE_CHUNKS, but can be set on either the

* libsoup/soup-message-body.c (soup_message_body_set_accumulate)
(soup_message_body_get_accumulate): New, replaces
SOUP_MESSAGE_OVERWRITE_CHUNKS, but can be set on either the
incoming or outgoing message body.
(soup_message_body_get_chunk): update to still dtrt if !accumulate
(soup_message_body_got_chunk, soup_message_body_wrote_chunk): New
methods to handle accumulating/discarding chunks.

* libsoup/soup-message-io.c (read_body_chunk): Use
soup_message_body_got_chunk.
(io_write): Use soup_message_body_wrote_chunk, to discard unneeded
chunks after writing them. Fixes most of #522146.

* libsoup/soup-message.c (soup_message_class_init): add a new
flag, "server-side", to indicate whether the message is
client-side or server-side, and update several methods to use it.
(got_body): Update for accumulate
(soup_message_set_flags): If the caller changes OVERWRITE_CHUNKS,
update the corresponding accumulate flag.

* libsoup/soup-message.h (SOUP_MESSAGE_OVERWRITE_CHUNKS):
deprecated now

* tests/chunk-test.c (do_request_test): Use
soup_message_body_set_accumulate() now, and verify that the chunks
are being discarded appropriately.
(do_response_test): Use
soup_message_body_set_accumulate() instead of OVERWRITE_CHUNKS.

* tests/pull-api.c (do_fully_async_test)
(do_synchronously_async_test): Use
soup_message_body_set_accumulate().

svn path=/trunk/; revision=1126

16 years agofix test for AI_ADDRCONFIG. Noticed while looking at #526321.
Dan Winship [Sat, 5 Apr 2008 17:11:21 +0000 (17:11 +0000)]
fix test for AI_ADDRCONFIG. Noticed while looking at #526321.

* libsoup/soup-dns.c (resolve_address): fix test for
AI_ADDRCONFIG. Noticed while looking at #526321.

svn path=/trunk/; revision=1125

16 years agoglobally ignore SIGPIPE rather than only doing it around socket write
Dan Winship [Sat, 5 Apr 2008 14:09:40 +0000 (14:09 +0000)]
globally ignore SIGPIPE rather than only doing it around socket write

* libsoup/soup-socket.c (soup_socket_class_init)
(soup_socket_write): globally ignore SIGPIPE rather than only
doing it around socket write calls, since with SSL even socket
read calls may need to write, and also because SIGPIPE is
completely moronic and no one should be using it, and the previous
"solution" wasn't thread-safe anyway. Fixes #524397, reported by
Curtis Magyar.

svn path=/trunk/; revision=1124

16 years ago Misc fixes noticed by "sparse" or by running gcc with additional
Dan Winship [Sat, 5 Apr 2008 13:56:22 +0000 (13:56 +0000)]
Misc fixes noticed by "sparse" or by running gcc with additional
-W flags

* libsoup/soup-auth-manager-ntlm.c (ntlm_authorize_post): fix a
potentially uninitialized variable. (Grumble. gcc needs
-Wdo-optimization-so-you-can-generate-code-flow-related-warnings-
but-then-emit-unoptimized-code-for-ease-of-debugging)

* libsoup/soup-gnutls.c (soup_gnutls_channel_funcs): make this
static

* libsoup/soup-uri.c (uri_decoded_copy, uri_normalized_copy): add
"static". (This doesn't change the generated code; the prototype
was already declared static and so gcc was treating the function
as static even though the main declaration *wasn't* declared
static. I'm not sure if this is a bug in gcc or an oddity of the
spec, but it's confusing, so...)

* libsoup/soup-xmlrpc.c (soup_xmlrpc_build_method_response):
s/FALSE/NULL/

* libsoup/soup-xmlrpc.h: add G_GNUC_PRINTF to
soup_xmlrpc_build_format

* tests/*.c: misc minor fixes, mostly involving missing "const"s
and "static"s to get better warnings, and then remove some unused
variables.

* tests/continue-test.c (do_message): fix a crash when the test
fails

* tests/test-utils.h (debug_printf): add G_GNUC_PRINTF to
prototype

svn path=/trunk/; revision=1123

16 years agoExplicitly assign each of the variables to NULL, because that apparently
Dan Winship [Sat, 5 Apr 2008 13:32:12 +0000 (13:32 +0000)]
Explicitly assign each of the variables to NULL, because that apparently

* libsoup/soup-method.c: Explicitly assign each of the variables
to NULL, because that apparently causes the OS X linker to treat
them differently than if they are left implicitly NULL. #522957.

svn path=/trunk/; revision=1122

16 years agoExplicitly assign each of the variables to NULL, because that apparently
Dan Winship [Sat, 5 Apr 2008 13:26:05 +0000 (13:26 +0000)]
Explicitly assign each of the variables to NULL, because that apparently

* libsoup/soup-method.c: Explicitly assign each of the variables
to NULL, because that apparently causes the OS X linker to treat
them differently than if they are left implicitly NULL. #522957.

svn path=/trunk/; revision=1121

16 years agoadd a new signal "wrote-body-data" to address the problem that
Dan Winship [Fri, 4 Apr 2008 13:20:01 +0000 (13:20 +0000)]
add a new signal "wrote-body-data" to address the problem that

* libsoup/soup-message.c: add a new signal "wrote-body-data" to
address the problem that "wrote-chunk" is not usable for progress
info (especially with non-chunked encoding). #525101, suggested by
Christian Kellner.

* libsoup/soup-message-io.c (write_data): emit wrote-body-data as
appropriate.
(io_write): update so that (a) Content-Length writes can be done
in multiple chunks (as long as the caller explicitly sets the
Content-Length header beforehand), and (b) the body data doesn't
get copied an extra time. Based on a patch from Christian.

* libsoup/soup-message-client-io.c (get_request_headers): Don't
update the Content-Length header if it's already set, even if it
doesn't match the (current) body length.

* tests/chunk-test.c: test some chunk-encoding-related behavior

svn path=/trunk/; revision=1120

16 years ago Be more aggressive about closing unused persistent connections
Dan Winship [Thu, 3 Apr 2008 23:58:38 +0000 (23:58 +0000)]
Be more aggressive about closing unused persistent connections
when needed, to avoid slow load times in WebKit.

* libsoup/soup-session-async.c (run_queue): Remove the
"try_pruning" flag from here and from all the callers, and
*always* try pruning idle connections if it would help.

* libsoup/soup-session.c (soup_session_try_prune_connection):
Rather than only closing a single connection, close all idle
connections.

svn path=/trunk/; revision=1119

16 years agode-constify msg->reason_phrase; it's no more const than any other struct
Dan Winship [Sat, 29 Mar 2008 19:51:05 +0000 (19:51 +0000)]
de-constify msg->reason_phrase; it's no more const than any other struct

* libsoup/soup-message.h (SoupMessage): de-constify
msg->reason_phrase; it's no more const than any other struct
field.

* libsoup/soup-message.c (finalize)
(soup_message_cleanup_response, soup_message_set_status)
(soup_message_set_status_full): don't need to cast reason_phase to
non-const when freeing it now

* libsoup/soup-message-client-io.c (parse_response_headers):
Likewise, remove reason-phrase non-const casts

svn path=/trunk/; revision=1118

16 years agofix the test for no-day-parsed (parse_year): likewise fix the test for
Dan Winship [Sat, 29 Mar 2008 19:43:18 +0000 (19:43 +0000)]
fix the test for no-day-parsed (parse_year): likewise fix the test for

* libsoup/soup-date.c (parse_day): fix the test for no-day-parsed
(parse_year): likewise fix the test for no-year-parsed
(parse_time): don't accept empty components here
(parse_textual_date): don't accept a comma if it wasn't preceded
by a weekday
(soup_date_weekday): Fix leap year handling here; the code this
was originally based on only had to work between 1970 and 2038, so
it didn't worry about the mod 100 and mod 400 rules...

* tests/date.c: Add date/string conversion tests (in particular,
to make sure soup_date_weekday is working). Also add test cases
with missing components and make sure they *don't* parse.

svn path=/trunk/; revision=1117

16 years agoupdate to latest
Dan Winship [Sat, 29 Mar 2008 19:43:07 +0000 (19:43 +0000)]
update to latest

svn path=/trunk/; revision=1116

16 years agodon't crash if the auth_callback returns NULL (meaning "unrecognized
Dan Winship [Tue, 25 Mar 2008 22:55:54 +0000 (22:55 +0000)]
don't crash if the auth_callback returns NULL (meaning "unrecognized

* libsoup/soup-auth-domain-digest.c (accepts): don't crash if the
auth_callback returns NULL (meaning "unrecognized user").

* tests/server-auth-test.c (do_test, do_auth_tests): Test bad
usernames as well as bad passwords.
(main): Remove erroneous local run_tests variable.

Pointed out by Curtis Magyar.

svn path=/trunk/; revision=1115

16 years agoRemove erroneous local run_tests variable. (Noted by "Curtman" on IRC.)
Dan Winship [Tue, 25 Mar 2008 21:52:08 +0000 (21:52 +0000)]
Remove erroneous local run_tests variable. (Noted by "Curtman" on IRC.)

* tests/server-auth-test.c (main): Remove erroneous local
run_tests variable. (Noted by "Curtman" on IRC.)

svn path=/trunk/; revision=1114

16 years agocompare WWW-Authenticate auth schemes case-insensitively.
Dan Winship [Wed, 19 Mar 2008 18:58:08 +0000 (18:58 +0000)]
compare WWW-Authenticate auth schemes case-insensitively.

* libsoup/soup-auth.c (soup_auth_new): compare WWW-Authenticate
auth schemes case-insensitively.

* libsoup/soup-auth-digest.c (update): allow Digest
WWW-Authenticate header with no "qop" option. (The original RFC
2069 style of Digest auth.)
(soup_auth_digest_parse_qop): this returns a bitfield, so don't
return -1 if there are no recognized values.

* tests/httpd.conf.in: use "AuthDigestQop none" in /Digest/realm3
so we test that

Fixes #498484 (Digest auth against Apple's Calendar Server).

svn path=/trunk/; revision=1113

16 years agoAdd a new property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
Dan Winship [Tue, 18 Mar 2008 23:38:00 +0000 (23:38 +0000)]
Add a new property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after

* libsoup/soup-session.c (soup_session_class_init): Add a new
property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
which idle connections should be closed.
(soup_session_get_connection): pass the idle_timeout value on to
the connection.

* libsoup/soup-connection.c (soup_connection_class_init): Add
SOUP_CONNECTION_IDLE_TIMEOUT.
(start_idle_timer, stop_idle_timer): add/remove a timeout to call
soup_connection_disconnect().
(socket_connect_result, soup_connection_connect_sync): start the
idle timer after connection is complete
(set_current_request): call stop_idle_timer() when starting a new
request
(clear_current_request): call start_idle_timer() when finishing a
request
(dispose): call stop_idle_timer() when destroying the connection

#518214, based on a patch from Jorn Baayen.

svn path=/trunk/; revision=1112

16 years agoif delaying the unpause to idle time, we need to keep track of the idle
Dan Winship [Tue, 18 Mar 2008 23:08:05 +0000 (23:08 +0000)]
if delaying the unpause to idle time, we need to keep track of the idle

* libsoup/soup-message-io.c (soup_message_io_unpause): if delaying
the unpause to idle time, we need to keep track of the idle source
(soup_message_io_stop): if the message is waiting to unpause
itself, cancel that

* libsoup/soup-server.c (soup_server_pause_message): call
soup_message_io_pause(), not soup_message_io_unpause(). Duh.

svn path=/trunk/; revision=1111

16 years agoDefine two new signals, request_queued and request_unqueued, to provided a
Dan Winship [Sun, 16 Mar 2008 02:28:36 +0000 (02:28 +0000)]
Define two new signals, request_queued and request_unqueued, to provided a

        * libsoup/soup-session.c: Define two new signals, request_queued
        and request_unqueued, to provided a clearer (and
        clearly-documented) lifecycle for messages, helping us (and other
        people) avoid bugs like #522601, SoupSession::authenticate signal
        emitted multiple times per message (reported and analyzed by Tommi
        Komulainen).

        * libsoup/soup-logger.c:
        * libsoup/soup-auth-manager.c:
        * libsoup/soup-auth-manager-ntlm.c: Use request_queued/unqueued

        * tests/auth-test.c (do_async_auth_test): add a regression test

svn path=/trunk/; revision=1110

16 years agoFix Host header syntax when the host is an IPv6 address literal. Noticed
Dan Winship [Fri, 14 Mar 2008 23:10:57 +0000 (23:10 +0000)]
Fix Host header syntax when the host is an IPv6 address literal. Noticed

* libsoup/soup-message-client-io.c (get_request_headers): Fix Host
header syntax when the host is an IPv6 address literal. Noticed
while poking at #522519.

svn path=/trunk/; revision=1109

16 years agoadd an orig_http_version field.
Dan Winship [Fri, 14 Mar 2008 23:09:43 +0000 (23:09 +0000)]
add an orig_http_version field.

* libsoup/soup-message-private.h (SoupMessagePrivate): add
an orig_http_version field.

* libsoup/soup-message.c (soup_message_init): initialize
orig_http_version.
(soup_message_set_http_version): If called before the status code
is received, set orig_http_version too.
(soup_message_cleanup_response): Restore orig_http_version, so
that we don't send an HTTP/1.0 request in response to an HTTP/1.0
redirect. #521848, Tommi Komulainen.

* libsoup/soup-message-server-io.c (get_response_headers):
actually output "HTTP/1.0", not "HTTP/1.1", if the message's http
version is 1.0.

* tests/redirect-test.c (server_callback): Add a regression test;
set http_version to 1.0 when returning a redirect, but require it
to be 1.1 when processing the following request

svn path=/trunk/; revision=1108

16 years agoFix ChangeLog
Xan Lopez [Thu, 13 Mar 2008 23:02:26 +0000 (23:02 +0000)]
Fix ChangeLog

svn path=/trunk/; revision=1107

16 years ago Use G_OBJECT_WARN_INVALID_PROPERTY_ID in all get/set_property functions.
Xan Lopez [Thu, 13 Mar 2008 23:00:41 +0000 (23:00 +0000)]
Use G_OBJECT_WARN_INVALID_PROPERTY_ID in all get/set_property functions.

Bug #522115

svn path=/trunk/; revision=1106

16 years agog_thread_init should be called before any other glib function.
Xan Lopez [Thu, 13 Mar 2008 10:35:28 +0000 (10:35 +0000)]
g_thread_init should be called before any other glib function.

svn path=/trunk/; revision=1105

16 years ago2.4.0! LIBSOUP_2_4_0
Dan Winship [Mon, 10 Mar 2008 21:49:27 +0000 (21:49 +0000)]
2.4.0!

        * configure.in: 2.4.0!

        * NEWS: update

svn path=/trunk/; revision=1103

16 years agotypo in a comment
Dan Winship [Thu, 28 Feb 2008 17:15:48 +0000 (17:15 +0000)]
typo in a comment

svn path=/trunk/; revision=1102

16 years ago (redirect_handler): PROPFIND is defined to be "safe and
Dan Winship [Thu, 28 Feb 2008 17:14:45 +0000 (17:14 +0000)]
(redirect_handler): PROPFIND is defined to be "safe and
idempotent", so allow automatic redirects of it. (Pointed out by
Christian Kellner. FIXME: need a way for apps to declare
additional safe methods). Also, treat 302 like 307, not like 303,
because that behavior is universal in the real world, despite the
spec's protests.

* tests/redirect-test.c (tests): update POST 302 behavior check

* tests/Makefile.am (TESTS): oops, add redirect-test so it gets
run by "make check"/"make distcheck"

svn path=/trunk/; revision=1101

16 years agoRe-revert the change from 2008-02-09; the problem with ssl-test.c was not
Dan Winship [Thu, 28 Feb 2008 17:08:58 +0000 (17:08 +0000)]
Re-revert the change from 2008-02-09; the problem with ssl-test.c was not

* tests/ssl-test.c: Re-revert the change from 2008-02-09; the
problem with ssl-test.c was not that soup_gnutls_init() wasn't
thread-safe, it's that the server thread doesn't do anything that
would ever cause soup_gnutls_init() to be called, and so if the
client thread doesn't start first, the server thread will run
without initializing GNUTLS.

svn path=/trunk/; revision=1100

16 years agofree priv->user_agent. #518798, Wouter Cloetens.
Dan Winship [Thu, 28 Feb 2008 17:05:31 +0000 (17:05 +0000)]
free priv->user_agent. #518798, Wouter Cloetens.

* libsoup/soup-session.c (finalize): free priv->user_agent.
#518798, Wouter Cloetens.

svn path=/trunk/; revision=1099

16 years agoensure that nread/nwrote parameters aren't NULL. They are also properly
Benjamin Otte [Wed, 27 Feb 2008 21:39:27 +0000 (21:39 +0000)]
ensure that nread/nwrote parameters aren't NULL. They are also properly

2008-02-27  Benjamin Otte  <otte@gnome.org>

* libsoup/soup-socket.c: (read_from_network), (soup_socket_read),
(soup_socket_read_until), (soup_socket_write):
ensure that nread/nwrote parameters aren't NULL. They are also
properly set on error paths now.

svn path=/trunk/; revision=1098

16 years ago2.3.4 LIBSOUP_2_3_4
Dan Winship [Mon, 25 Feb 2008 19:44:47 +0000 (19:44 +0000)]
2.3.4

* configure.in: 2.3.4

* NEWS: Update

svn path=/trunk/; revision=1096

16 years agorename from libsoup to libsoup-2.4 (TARGET_DIR): don't need to override
Dan Winship [Mon, 25 Feb 2008 19:28:31 +0000 (19:28 +0000)]
rename from libsoup to libsoup-2.4 (TARGET_DIR): don't need to override

* docs/reference/Makefile.am (DOC_MODULE): rename from libsoup to
libsoup-2.4
(TARGET_DIR): don't need to override this now

* docs/reference/libsoup-2.4.types:
* docs/reference/libsoup-2.4-docs.txt:
* docs/reference/libsoup-2.4-overrides.txt:
* docs/reference/libsoup-2.4-sections.txt: Rename these from
unversioned, to match DOC_MODULE

Fixes doc installation to work with devhelp again. #518384, Mart
Raudsepp.

svn path=/trunk/; revision=1095

16 years agoremove old .cvsignore files...
Dan Winship [Mon, 25 Feb 2008 19:14:55 +0000 (19:14 +0000)]
remove old .cvsignore files...

svn path=/trunk/; revision=1094

16 years agouse an underscore for struct definitions. Fixes bug #518317.
Benjamin Otte [Mon, 25 Feb 2008 14:02:30 +0000 (14:02 +0000)]
use an underscore for struct definitions. Fixes bug #518317.

2008-02-25  Benjamin Otte  <otte@gnome.org>

        * libsoup/soup-address.h:
* libsoup/soup-auth-domain.h:
* libsoup/soup-auth.h:
* libsoup/soup-message.h:
* libsoup/soup-server.h:
* libsoup/soup-session-async.h:
* libsoup/soup-session-sync.h:
* libsoup/soup-session.h:
* libsoup/soup-socket.h:
* libsoup/soup-types.h:
* libsoup/soup-uri.h:
use an underscore for struct definitions. Fixes bug #518317.

svn path=/trunk/; revision=1093

16 years agoAdd gobject-2.0 and gio-2.0 to Requires. Move libxml-2.0 and the SSL
Sebastian Dröge [Wed, 20 Feb 2008 14:27:55 +0000 (14:27 +0000)]
Add gobject-2.0 and gio-2.0 to Requires. Move libxml-2.0 and the SSL

* libsoup.pc.in: Add gobject-2.0 and gio-2.0 to Requires.
Move libxml-2.0 and the SSL dependency to Requires.private
as no header is including them. Fixes bug #517631.

svn path=/trunk/; revision=1092

16 years agopost-release bump to 2.3.3
Dan Winship [Tue, 12 Feb 2008 02:01:21 +0000 (02:01 +0000)]
post-release bump to 2.3.3

* configure.in: post-release bump to 2.3.3

svn path=/trunk/; revision=1090

16 years agofix a copy-and-pasto noticed by David Weinehall
Dan Winship [Mon, 11 Feb 2008 23:57:15 +0000 (23:57 +0000)]
fix a copy-and-pasto noticed by David Weinehall

svn path=/trunk/; revision=1089

16 years ago2.3.2 (SOUP_CURRENT): bump for API changes LIBSOUP_2_3_2
Dan Winship [Mon, 11 Feb 2008 21:05:32 +0000 (21:05 +0000)]
2.3.2 (SOUP_CURRENT): bump for API changes

* configure.in: 2.3.2
(SOUP_CURRENT): bump for API changes

* NEWS: update

svn path=/trunk/; revision=1087

16 years agoMisc gtk-doc fix-ups
Dan Winship [Mon, 11 Feb 2008 20:30:42 +0000 (20:30 +0000)]
Misc gtk-doc fix-ups

* Misc gtk-doc fix-ups

svn path=/trunk/; revision=1086

16 years agoMisc gtk-doc fix-ups
Dan Winship [Sun, 10 Feb 2008 02:36:40 +0000 (02:36 +0000)]
Misc gtk-doc fix-ups

       * Misc gtk-doc fix-ups

svn path=/trunk/; revision=1083

16 years ago First draft of libsoup python bindings. Not complete, not final,
Dan Winship [Sat, 9 Feb 2008 23:33:22 +0000 (23:33 +0000)]
First draft of libsoup python bindings. Not complete, not final,
etc. (And not built by default and not installed.)

svn path=/trunk/; revision=1082

16 years agoremove prototype for soup_signal_connect_once, which is only used by
Dan Winship [Sat, 9 Feb 2008 05:17:25 +0000 (05:17 +0000)]
remove prototype for soup_signal_connect_once, which is only used by

* libsoup/soup-misc.h: remove prototype for
soup_signal_connect_once, which is only used by soup-connection
now, and will go away once that code is rewritten.

* libsoup/soup-connection.c: prototype it here now (the definition
is still in soup-misc.c)

svn path=/trunk/; revision=1081

16 years agomark the DES magic number arrays const
Dan Winship [Sat, 9 Feb 2008 05:08:29 +0000 (05:08 +0000)]
mark the DES magic number arrays const

* libsoup/soup-auth-manager-ntlm.c: mark the DES magic number
arrays const

* libsoup/soup-date.c (months, days): add an extra "const" to each
of these declarations, as one "const" is apparently not enough.
(soup_date_to_time_t): remove redundant copy of days_before array.

* libsoup/soup-dns.c (soup_dns_init): use g_once_init_enter/leave

* libsoup/soup-gnutls.c (soup_ssl_supported)
(soup_gnutls_channel_funcs): Mark these const
(soup_gnutls_init, init_dh_params): Use g_once_init_enter/leave

* libsoup/soup-status.c (reason_phrases): mark this const

* tests/ssl-test.c: Remove the workaround for soup_gnutls_init()
not being thread-safe, since it is now.

svn path=/trunk/; revision=1080

16 years agoAdd an iterator type for SoupMessageHeaders.
Dan Winship [Sat, 9 Feb 2008 00:46:12 +0000 (00:46 +0000)]
Add an iterator type for SoupMessageHeaders.

* libsoup/soup-message-headers.c (SoupMessageHeadersIter)
(soup_message_headers_iter_init, soup_message_headers_iter_next):
Add an iterator type for SoupMessageHeaders.

* libsoup/soup-message-client-io.c (get_request_headers):
* libsoup/soup-message-server-io.c (get_response_headers): Use
SoupMessageHeadersIter.

* libsoup/soup-logger.c (print_request, print_response): Use
SoupMessageHeadersIter. And take advantage of the simplification
to fix the kludge where 'direction' was stored as a field in
SoupLoggerPrivate rather than being an argument to
soup_logger_print.

* tests/get.c (get_url):
* tests/header-parsing.c (check_headers):
* tests/simple-httpd.c (server_callback): Use
SoupMessageHeadersIter

svn path=/trunk/; revision=1079

16 years agoRef the auth domain when adding it.
Dan Winship [Thu, 7 Feb 2008 03:04:59 +0000 (03:04 +0000)]
Ref the auth domain when adding it.

* libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
auth domain when adding it.

* tests/continue-test.c (setup_server):
* tests/server-auth-test.c (main): Add unrefs here to avoid
leaking now

svn path=/trunk/; revision=1076

16 years agoNew method that lets the application set a callback function to use to
Dan Winship [Thu, 7 Feb 2008 02:30:00 +0000 (02:30 +0000)]
New method that lets the application set a callback function to use to

* libsoup/soup-message.c (soup_message_set_chunk_allocator): New
method that lets the application set a callback function to use to
allocate SoupBuffers for reading into, so as to avoid needing
extra copies.

* libsoup/soup-message-body.c (soup_buffer_new_with_owner): new,
to create a SoupBuffer pointing to memory owned by another object,
with a GDestroyNotify to unref/free that object when the
SoupBuffer is freed.
(soup_buffer_get_owner): Returns the owner of a buffer created
with soup_buffer_new_with_owner.
(soup_buffer_free, etc): update SoupBuffer code for owned buffers.

Suggested by Wouter Cloetens, #513810.

* tests/simple-httpd.c (do_get): Use mmap() and
soup_buffer_new_with_owner(), as a demo/test.

svn path=/trunk/; revision=1075

16 years agoclamp the result to the time_t range, and document that. Remove the #ifdef
Dan Winship [Thu, 7 Feb 2008 01:38:15 +0000 (01:38 +0000)]
clamp the result to the time_t range, and document that. Remove the #ifdef

* libsoup/soup-date.c (soup_date_to_time_t): clamp the result to
the time_t range, and document that. Remove the #ifdef HAVE_TIMEGM
branch.

* configure.in: remove check for timegm

svn path=/trunk/; revision=1074

16 years agoFix the handling of soup-enum-types.h to ensure that it gets built before
Dan Winship [Mon, 4 Feb 2008 20:34:43 +0000 (20:34 +0000)]
Fix the handling of soup-enum-types.h to ensure that it gets built before

* libsoup/Makefile.am: Fix the handling of soup-enum-types.h to
ensure that it gets built before the things that depend on it.

svn path=/trunk/; revision=1073

16 years agoupdate documentation to new API
Benjamin Otte [Sun, 3 Feb 2008 15:55:32 +0000 (15:55 +0000)]
update documentation to new API

* libsoup/soup-socket.c: update documentation to new API

svn path=/trunk/; revision=1072

16 years agofix default connections-per-host again; it was defined in two places. Add
Dan Winship [Sun, 3 Feb 2008 03:13:14 +0000 (03:13 +0000)]
fix default connections-per-host again; it was defined in two places. Add

* libsoup/soup-session.c: fix default connections-per-host again;
it was defined in two places. Add SOUP_SESSION_USER_AGENT property
(setup_message): set the User-Agent request header on the request

* libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property
(start_request): set the Server response header on the request.

* tests/get.c:
* tests/simple-httpd.c: set the User-Agent/Server headers

svn path=/trunk/; revision=1071

16 years agoif the request headers contain an unrecognized Expect: header, return
Dan Winship [Sun, 3 Feb 2008 02:17:54 +0000 (02:17 +0000)]
if the request headers contain an unrecognized Expect: header, return

* libsoup/soup-headers.c (soup_headers_parse_request): if the
request headers contain an unrecognized Expect: header, return
SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers
in HTTP/1.0 messages as required by 2616 14.10.
(soup_headers_parse_response): Likewise handle Connection headers
in HTTP/1.0 messages

* tests/header-parsing.c: test those things

svn path=/trunk/; revision=1070

16 years agoMisc fixes: don't redirect on "300 Multiple Choices", "304 Not Modified",
Dan Winship [Sun, 3 Feb 2008 01:19:59 +0000 (01:19 +0000)]
Misc fixes: don't redirect on "300 Multiple Choices", "304 Not Modified",

* libsoup/soup-session.c (redirect_handler): Misc fixes: don't
redirect on "300 Multiple Choices", "304 Not Modified", "305 Use
Proxy", or any unrecognized status code. Don't redirect unsafe
methods on 301, 302, or 307. Redirect POST to GET on 303.

* tests/redirect-test.c: test of redirection handling behavior.

svn path=/trunk/; revision=1069

16 years agoFix these so that direct comparisons against them actually *are* faster
Dan Winship [Sat, 2 Feb 2008 22:14:23 +0000 (22:14 +0000)]
Fix these so that direct comparisons against them actually *are* faster

* libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that
direct comparisons against them actually *are* faster than doing
strcmp, as the docs claim.

* libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP,
SOUP_URI_SCHEME_HTTPS): likewise

svn path=/trunk/; revision=1068

16 years agoUse GObject properties. (soup_address_new, soup_address_new_from_sockaddr)
Dan Winship [Fri, 1 Feb 2008 18:15:18 +0000 (18:15 +0000)]
Use GObject properties. (soup_address_new, soup_address_new_from_sockaddr)

* libsoup/soup-address.c: Use GObject properties.
(soup_address_new, soup_address_new_from_sockaddr)
(soup_address_new_any): Make these just wrappers around
g_object_new.

* libsoup/soup-message-body.c (soup_message_body_get_type):
* libsoup/soup-message-headers.c (soup_message_headers_get_type):
* libsoup/soup-server.c (soup_client_context_get_type):
Register these as boxed types, for language bindings.

* libsoup/soup-date.c (soup_date_get_type):
* libsoup/soup-message-body.c (soup_buffer_get_type):
* libsoup/soup-value-utils.c (soup_byte_array_get_type):
* libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest
yummiest type-registering idiom.

svn path=/trunk/; revision=1067

16 years agoReorganize this; emitting DISCONNECTED may cause the session to unref the
Dan Winship [Fri, 1 Feb 2008 17:09:56 +0000 (17:09 +0000)]
Reorganize this; emitting DISCONNECTED may cause the session to unref the

* libsoup/soup-connection.c (soup_connection_disconnect):
Reorganize this; emitting DISCONNECTED may cause the session to
unref the connection, causing it to be destroyed, so do everything
else before that. #437835 and dups. Also, call
soup_message_cleanup_response() when requeuing an IO_ERROR-ed
message, so soup_session_send_message() will requeue it rather
than treating it as failed.

svn path=/trunk/; revision=1066

16 years agooverride this to include the API version, to fix the last remaining
Dan Winship [Fri, 1 Feb 2008 15:44:19 +0000 (15:44 +0000)]
override this to include the API version, to fix the last remaining

* docs/reference/Makefile.am (TARGET_DIR): override this to
include the API version, to fix the last remaining parallel
install issue between libsoup 2.2 and 2.4. #512810, Daniel
Gryniewicz.

svn path=/trunk/; revision=1065

16 years agodon't use "stdout" as a variable name; it's allowed to be a macro (and it
Dan Winship [Fri, 1 Feb 2008 15:28:19 +0000 (15:28 +0000)]
don't use "stdout" as a variable name; it's allowed to be a macro (and it

* tests/query-test.c (do_test): don't use "stdout" as a variable
name; it's allowed to be a macro  (and it is one on Solaris).
#513602, patch from Jeff Cai.

svn path=/trunk/; revision=1064

16 years agonew
Dan Winship [Fri, 1 Feb 2008 15:23:31 +0000 (15:23 +0000)]
new

* libsoup/soup-date.c (soup_date_to_time_t): new

* libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded"
from name. (And add back-compat #define.)
(soup_form_encode): New, takes varargs parameters for each form
construction.
(soup_form_encode_hash, soup_form_encode_datalist): renamed, with
back-compat #defines
(soup_form_request_new, soup_form_request_new_from_hash)
(soup_form_request_new_from_datalist): New methods to construct a
GET or POST message with form data.

* libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes
varargs like soup_form_encode().

* libsoup/soup-value-utils.c (soup_value_hash_new_with_vals)
(soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New
routines to work with multiple value hash values at once.
(soup_value_array_new): tiny wrapper, for naming consistency
(soup_value_array_new_with_vals, soup_value_array_append_vals):
New routines to work with multiple value array values at once.

svn path=/trunk/; revision=1063

16 years agopost-release bump to 2.3.1
Dan Winship [Mon, 28 Jan 2008 21:51:43 +0000 (21:51 +0000)]
post-release bump to 2.3.1

* configure.in: post-release bump to 2.3.1

svn path=/trunk/; revision=1062

16 years agoBump version to 2.3.0.1 LIBSOUP_2_3_0_1
Dan Winship [Mon, 28 Jan 2008 21:49:39 +0000 (21:49 +0000)]
Bump version to 2.3.0.1

* configure.in: Bump version to 2.3.0.1

* NEWS: Update

* docs/reference/Makefile.am (content_files): include
porting-2.2-2.4.xml

svn path=/trunk/; revision=1060

16 years agoUse soup_message_headers_replace(), not soup_message_headers_append(),
Dan Winship [Mon, 28 Jan 2008 17:55:06 +0000 (17:55 +0000)]
Use soup_message_headers_replace(), not soup_message_headers_append(),

* libsoup/soup-message.c (soup_message_set_auth)
(soup_message_set_proxy_auth): Use soup_message_headers_replace(),
not soup_message_headers_append(), since only a single
Authorization/Proxy-Authorization header is allowed. #512517.

* libsoup/soup-auth-manager-ntlm.c (ntlm_request_started): Don't
set an NTLM Authorization header if the message already has a
Basic or Digest one.

* tests/ntlm-test.c: Add some Basic auth and mixed NTLM/Basic auth
tests

svn path=/trunk/; revision=1059

16 years agoChanged section titles so that they actually show something useful in
Wouter Bolsterlee [Mon, 28 Jan 2008 00:33:49 +0000 (00:33 +0000)]
Changed section titles so that they actually show something useful in

2008-01-28  Wouter Bolsterlee  <wbolster@svn.gnome.org>

* docs/reference/libsoup-docs.sgml:

Changed section titles so that they actually show
something useful in DevHelp.

svn path=/trunk/; revision=1058

16 years agoFix leak introduced by patch for 511980.
Dan Winship [Sun, 27 Jan 2008 19:28:10 +0000 (19:28 +0000)]
Fix leak introduced by patch for 511980.

* libsoup/soup-message-headers.c (soup_message_headers_free): Fix
leak introduced by patch for 511980.

svn path=/trunk/; revision=1057

16 years agofix mutex use to avoid a race condition
Dan Winship [Sun, 27 Jan 2008 19:21:30 +0000 (19:21 +0000)]
fix mutex use to avoid a race condition

* libsoup/soup-dns.c (resolver_thread): fix mutex use to avoid a
race condition

* libsoup/soup-xmlrpc.c (soup_xmlrpc_build_faultv):
(soup_xmlrpc_set_response, soup_xmlrpc_set_fault):
(soup_xmlrpc_parse_method_call): Fix misc server-side stuff
(soup_xmlrpc_parse_method_response): Fix fault parsing

* libsoup/soup-xmlrpc.h (SoupXMLRPCFault): add semi-standard fault
codes from
http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php

* tests/xmlrpc-server.php (sum): return a <fault> if the arguments
are wrong (so that xmlrpc-test can test that case).
(dateChange): change to take two parameters, a date and a struct,
instead of putting the date in the struct, since we weren't
previously testing multiple parameter handling.

* tests/xmlrpc-test.c (main): Add a -u flag to specify an
alternate URL.
(do_xmlrpc): Remove level 3 debug output, which is now redundant
with the SoupLogger stuff.
(test_dateChange): update for dateChange prototype change
(test_fault_malformed, test_fault_method, test_fault_args): test
handling of faults

* tests/xmlrpc-server-test.c: Test the server-side XML-RPC API (by
implementing the same methods as xmlrpc-server.php and then
using xmlrpc-test)

svn path=/trunk/; revision=1056

16 years agofix to not sometimes read beyond the end of the string.
Dan Winship [Sun, 27 Jan 2008 17:22:02 +0000 (17:22 +0000)]
fix to not sometimes read beyond the end of the string.

* libsoup/soup-headers.c (soup_header_parse_quality_list): fix to
not sometimes read beyond the end of the string.

* libsoup/soup-message-body.c (soup_message_body_append): When
appending a 0-length SOUP_MEMORY_TAKE buffer, we need to free the
passed-in buffer rather than just ignoring it.

* libsoup/soup-server.c (got_headers): fix leak when decoding path

* libsoup/soup-session.c (finalize): free ntlm_manager

* tests/libsoup.supp: update for libsoup 2.4, glib 2.14, etc

* tests/header-parsing.c (do_qvalue_tests):
* tests/uri-parsing.c (main): more cleanup

svn path=/trunk/; revision=1055

16 years agoFix session ids by using weak refs for the logger cleanup rather than
Dan Winship [Sun, 27 Jan 2008 17:08:14 +0000 (17:08 +0000)]
Fix session ids by using weak refs for the logger cleanup rather than

* libsoup/soup-logger.c (soup_logger_attach): Fix session ids by
using weak refs for the logger cleanup rather than trying to use
the same qdata for two different things.
(print_request, print_response): use full type names in the
Soup-Debug line, since SoupSessionSync and SoupSessionAsync get
numbered separately.

svn path=/trunk/; revision=1054

16 years agoDon't run the queue again if the callback destroyed the session. #511868,
Dan Winship [Sun, 27 Jan 2008 16:52:35 +0000 (16:52 +0000)]
Don't run the queue again if the callback destroyed the session. #511868,

* libsoup/soup-session-async.c (final_finished): Don't run the
queue again if the callback destroyed the session. #511868, Stef
Walter.

svn path=/trunk/; revision=1053

16 years ago** Fix for bug #511980
Srinivasa Ragavan [Sun, 27 Jan 2008 15:15:36 +0000 (15:15 +0000)]
** Fix for bug #511980

2008-01-25  Srinivasa Ragavan  <sragavan@novell.com>

** Fix for bug #511980

* libsoup/soup-message-headers.c: (soup_message_headers_clear):
Instead of destroying the hashtable, just remove the contents of the
table.

svn path=/trunk/; revision=1052

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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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