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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
Dan Winship [Mon, 20 Nov 2006 21:52:58 +0000 (21:52 +0000)]
2.2.98
* configure.in: 2.2.98
* NEWS: update
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.
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
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
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
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.
Dan Winship [Sun, 5 Nov 2006 22:01:59 +0000 (22:01 +0000)]
misc minor updates
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.
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.
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.
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)
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.
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
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.
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.
Dan Winship [Fri, 3 Nov 2006 16:46:15 +0000 (16:46 +0000)]
update
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.
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.
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.
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
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.)
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
Dan Winship [Thu, 13 Jul 2006 13:44:02 +0000 (13:44 +0000)]
sync to xmlrpc changes
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
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
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.
Dan Winship [Mon, 12 Jun 2006 19:36:27 +0000 (19:36 +0000)]
2.2.94
* configure.in: 2.2.94
* NEWS: update
Dan Winship [Mon, 12 Jun 2006 19:36:14 +0000 (19:36 +0000)]
make auth-test distcheck
Dan Winship [Mon, 12 Jun 2006 19:35:45 +0000 (19:35 +0000)]
dist client-howto.xml and server-howto.xml
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
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.
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.
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.
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.
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.
Dan Winship [Mon, 29 May 2006 19:52:02 +0000 (19:52 +0000)]
2.2.93
* configure.in: 2.2.93
* NEWS: update
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)
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
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).
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.)
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.
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
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.)
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.
Dan Winship [Sun, 2 Apr 2006 21:46:18 +0000 (21:46 +0000)]
fix most signed/unsigned mismatch warnings
* libsoup/*.c: fix most signed/unsigned mismatch warnings
Dan Winship [Sun, 2 Apr 2006 21:26:27 +0000 (21:26 +0000)]
replace locale-ish strcasecmps with g_ascii_strcasecmp
* libsoup/soup-auth-digest.c:
* libsoup/soup-auth.c:
* libsoup/soup-message-client-io.c:
* libsoup/soup-message-server-io.c:
* libsoup/soup-message.c:
* libsoup/soup-method.c:
* libsoup/soup-server-auth.c:
* tests/get.c: replace locale-ish strcasecmps with
g_ascii_strcasecmp
Dan Winship [Sun, 2 Apr 2006 20:25:52 +0000 (20:25 +0000)]
Rewrite Request-Line-parsing code to not have a lame max length. #335040.
* libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
Request-Line-parsing code to not have a lame max length. #335040.
Dan Winship [Sun, 2 Apr 2006 20:23:51 +0000 (20:23 +0000)]
add errata from skrb.org/ietf/http_errata.html
Dan Winship [Sun, 2 Apr 2006 20:03:16 +0000 (20:03 +0000)]
Install the .pc file mode 644, not 755. #330878
* Makefile.am (install-data-local): Install the .pc file mode 644,
not 755. #330878
Dan Winship [Sun, 2 Apr 2006 20:02:38 +0000 (20:02 +0000)]
add some comments
Dan Winship [Fri, 3 Mar 2006 19:56:28 +0000 (19:56 +0000)]
bump version to 2.2.91.
* configure.in: bump version to 2.2.91.
* NEWS: Update
Dan Winship [Fri, 3 Mar 2006 19:32:36 +0000 (19:32 +0000)]
Take a GMainContext as well, and update the resolution code to dispatch
* libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
GMainContext as well, and update the resolution code to dispatch
each lookup result in the correct context.
* libsoup/soup-address.c (soup_address_resolve_async_full): New
method that takes a GMainContext to pass to
soup_dns_lookup_resolve_async.
* libsoup/soup-socket.c (soup_socket_connect): Use
soup_address_resolve_async_full. Fixes a problem reported by Armin
Bauer.
* configure.in: update to require glib 2.6, since apparently the
code does.
Veerapuram Varadhan [Fri, 24 Feb 2006 20:13:17 +0000 (20:13 +0000)]
add a "timeout" property, which gets passed from server to socket, and
* libsoup/soup-connection.c:
* libsoup/soup-session.c:
* libsoup/soup-socket.c: add a "timeout" property,
which gets passed from server to socket, and session to connection
to socket, allowing blocking non-responsive sync connections to
return. Combination of "EAGAIN" && "Blocking" connection is treated
as error and the connection will be terminated and the control
is returned to the caller immediately.
Tor Lillqvist [Thu, 2 Feb 2006 01:06:20 +0000 (01:06 +0000)]
Don't use getaddrinfo() etc or try to support IPv6 on Windows, as they are
2006-02-02 Tor Lillqvist <tml@novell.com>
* configure.in: Don't use getaddrinfo() etc or try to support IPv6
on Windows, as they are present by default on XP only. We do want to
support Windows 2000, too.
Dan Winship [Wed, 21 Dec 2005 16:11:39 +0000 (16:11 +0000)]
fix two bugs in the YYYYMMDD case.
* libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
the YYYYMMDD case.
* tests/date.c: add three more ISO 8601 cases, to exercise all the
code paths.
#324671, from Emmanuele Bassi
Dan Winship [Fri, 25 Nov 2005 18:46:27 +0000 (18:46 +0000)]
sync to text on wiki, and point to wiki
* README: sync to text on wiki, and point to wiki
* TODO: moved to http://live.gnome.org/LibSoup_2fToDo
Dan Winship [Thu, 17 Nov 2005 15:57:28 +0000 (15:57 +0000)]
clear priv->io_data right away, to protect against this being re-entered
* libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
right away, to protect against this being re-entered mid-cleanup
(when we unref the connection). #321208, based on a patch from
Jedy Wang.
Dan Winship [Wed, 16 Nov 2005 21:04:41 +0000 (21:04 +0000)]
add the "name" element to the struct member. #321362, patch from Sebastian
* libsoup/soup-xmlrpc-message.c
(soup_xmlrpc_message_start_member): add the "name" element to the
struct member. #321362, patch from Sebastian Bauer.
Dan Winship [Sat, 12 Nov 2005 20:55:13 +0000 (20:55 +0000)]
add a bunch of relevant RFCs
Dan Winship [Thu, 10 Nov 2005 16:52:30 +0000 (16:52 +0000)]
make this build
Dan Winship [Thu, 10 Nov 2005 16:48:42 +0000 (16:48 +0000)]
bump version to 2.2.90. This will not be officially released, but once
* configure.in: bump version to 2.2.90. This will not be
officially released, but once these patches have gotten some
testing they may be pulled up to the gnome-2-12 branch.
* libsoup/soup-connection.c:
* libsoup/soup-server.c:
* libsoup/soup-session.c:
* libsoup/soup-socket.c: add an "async-context" property,
which gets passed from server to socket, and session to connection
to socket, allowing async usage outside the main thread. Based on
patches from Armin Bauer and Jürg Billeter.
* libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
soup_add_timeout): utility routines to add watches, idles, and
timeouts to non-default GMainContexts.
* libsoup/soup-message-io.c (io_write): set the read state
appropriately after writing a "100 Continue" response
(io_read): More 100-Continue stuff. I don't think this is quite
right so it will probably change again later.
Dan Winship [Thu, 10 Nov 2005 14:47:19 +0000 (14:47 +0000)]
update
Dan Winship [Tue, 1 Nov 2005 15:46:02 +0000 (15:46 +0000)]
tell it to generate an index
* docs/reference/libsoup-docs.sgml: tell it to generate an index
* docs/reference/tmpl/*.sgml: regen with newer gtk-doc
Dan Winship [Tue, 1 Nov 2005 15:05:48 +0000 (15:05 +0000)]
Cast the argument to g_object_add/remove_weak_pointer to the wrong type,
* libsoup/soup-connection.c (set_current_request,
clear_current_request): Cast the argument to
g_object_add/remove_weak_pointer to the wrong type, to make gcc
4.1 happy, because C is stupid and "void **" means "a pointer to a
void *", not "a pointer to any kind of pointer".
* libsoup/soup-xmlrpc-response.c
(soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
Roland Illig.
Dan Winship [Fri, 28 Oct 2005 16:44:46 +0000 (16:44 +0000)]
update usage message to match reality
Dan Winship [Thu, 27 Oct 2005 19:39:51 +0000 (19:39 +0000)]
(socket_read_watch, read_from_network, socket_write_watch,
soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
events when polling, since poll() will return them whether or not
you asked for them, but glib will ignore them unless you did,
which will result in CPU suckage if such an error occurs. #319305,
patch from Jonathan Matthew.
Dan Winship [Thu, 27 Oct 2005 14:46:59 +0000 (14:46 +0000)]
unref the SoupAddress passed to soup_socket_connect to avoid a leak. Based
* libsoup/soup-socket.c (soup_socket_client_new_async,
soup_socket_client_new_sync): unref the SoupAddress passed to
soup_socket_connect to avoid a leak. Based on a patch from Wang
Xin <jedy.wang@sun.com>.
Dan Winship [Thu, 27 Oct 2005 14:01:30 +0000 (14:01 +0000)]
gr. save then commit
Dan Winship [Thu, 27 Oct 2005 14:00:03 +0000 (14:00 +0000)]
bgo #316313 / bnc #116762, and probably also bgo #318252
* libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
after releasing it, to make sure we can't accidentally release it
twice.
* libsoup/soup-connection.c (clear_current_request): Call
soup_message_io_stop() on the cleared request.
* libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
little dance here to make sure the session can't queue another
message on the connection while we're in the process of requeuing
the original one.
Dan Winship [Thu, 27 Oct 2005 13:59:24 +0000 (13:59 +0000)]
updatage
Tor Lillqvist [Tue, 30 Aug 2005 00:54:55 +0000 (00:54 +0000)]
Include documentation in developer zipfile.
2005-08-30 Tor Lillqvist <tml@novell.com>
* libsoup-zip.in: Include documentation in developer zipfile.
Dan Winship [Mon, 22 Aug 2005 16:48:54 +0000 (16:48 +0000)]
Call g_type_class_add_private.
* libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
g_type_class_add_private.
* configure.in: Bump to 2.2.6.1
* NEWS: update
Dan Winship [Mon, 22 Aug 2005 14:41:45 +0000 (14:41 +0000)]
Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for soup_server_get_socket()
* configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
soup_server_get_socket() addition.
* NEWS: update
Dan Winship [Mon, 22 Aug 2005 14:28:27 +0000 (14:28 +0000)]
Fix g_object_add/remove_weak_pointer usage to prevent a crash when
* libsoup/soup-connection.c (set_current_request,
clear_current_request): Fix g_object_add/remove_weak_pointer usage
to prevent a crash when canceling a request. From Tambet.
Dan Winship [Tue, 16 Aug 2005 14:33:42 +0000 (14:33 +0000)]
Fix a connection leak reported by Tambet.
* libsoup/soup-connection.c (send_request): rather than tracking
the message progress via signals, call
soup_message_send_request_internal() and have it call
soup_connection_release() when it's done.
(request_restarted, request_done): gone
(clear_current_request): handle disconnecting (if necessary) and
updating last_used time here.
(soup_connection_release): Call clear_current_request().
(dispose): Call clear_current_request()
* libsoup/soup-message-client-io.c
(soup_message_send_request_internal): New. Takes a SoupConnection
in addition to the other args, and passes that on to
soup-message-io.
* libsoup/soup-message-io.c (SoupMessageIOData): add a
SoupConnection field.
(io_cleanup): if io->conn is set, unref it.
(soup_message_io_stop): if io->conn is set, and we ended in a
clean state, call soup_connection_release() on it.
(soup_message_io_client): Add a SoupConnection arg, which gets
reffed and stored in io->conn.
* TODO: misc updates
Dan Winship [Mon, 15 Aug 2005 14:44:12 +0000 (14:44 +0000)]
use G_GNUC_NULL_TERMINATED.
* libsoup/soup-connection.h (soup_connection_new):
* libsoup/soup-server.h (soup_server_new):
* libsoup/soup-session-async.h (soup_session_async_new_with_options):
* libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
* libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
* libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
definition of this from glib 2.8 for use when compiling against
glib 2.6.
Tambet Ingo [Mon, 15 Aug 2005 11:25:04 +0000 (11:25 +0000)]
Fix compilation errors.
2005-08-15 Tambet Ingo <tambet@ximian.com>
* libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
errors.
* libsoup/soup-server.c (soup_server_get_listener): ditto.
Dan Winship [Fri, 12 Aug 2005 14:20:35 +0000 (14:20 +0000)]
new method to get the server's listening socket.
* libsoup/soup-server.c (soup_server_get_listener): new method to
get the server's listening socket.
* libsoup/soup-socket.c: add a new "cloexec" property, to set
FD_CLOEXEC on the socket. Update everything for that.