1 2007-11-20 Dan Winship <danw@gnome.org>
3 * libsoup/soup-connection.c (soup_connection_connect_async): don't
6 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
7 when re-looking up an address
9 * libsoup/soup-session.c (soup_session_abort): close all
10 connections in addition to cancelling messages (needed because
11 connections currently end up holding a ref on their session,
12 preventing them from being destroyed).
19 * tests/xmlrpc-test.c: clean up more memory on exit, to help find
22 * tests/libsoup.supp: add a zillion new suppressions so we
23 can use --leak-resolution=med
25 2007-11-16 Dan Winship <danw@gnome.org>
27 * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
28 around the got_chunk emission so that it doesn't get messed up if
29 you pause the I/O from the got_chunk handler. (#452280, Marco
31 (soup_message_io_pause, soup_message_io_unpause): Update docs
32 again; these are now allowed with client-side I/O as well. Fix
33 unpause() to unpause asynchronously on async sockets.
35 * libsoup/soup-session-async.c (send_message): Iterate session's
36 async_context, not the default main context.
38 * tests/pull-api.c: Test/sample of creating a pull-style API using
41 * tests/index.txt: new file to act as DirectoryIndex for the
42 tests. (In particular, pull-api wants this to be largeish.)
44 2007-10-28 Dan Winship <danw@gnome.org>
46 * configure.in: 2.2.103
50 2007-10-28 Dan Winship <danw@gnome.org>
52 * libsoup/soup-server.c (start_request, request_finished): ref the
53 socket around the processing of the message, since otherwise it
54 might already be freed when request_finished runs. #459896.
56 * libsoup/soup-message-io.c (soup_message_io_pause)
57 (soup_message_io_unpause): Clarify the docs here; this is for
58 server-side use only. Inspired by #452280.
60 * docs/reference/server-howto.xml: You need to watch the
61 "finished" signal on the message if using soup_message_io_pause()
62 or chunked encoding, because the client might disconnect while
63 you're paused. Clarification inspired by #471385.
65 * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
66 server-howto.xml points to it as an example of what to do.
68 2007-10-28 Dan Winship <danw@gnome.org>
70 * libsoup/soup-session.c (finalize): free proxy-related stuff
72 * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
73 pointer. (From the dev repo, but identical to a patch from Rob
76 * tests/*.c: fix leaks
78 2007-10-28 Dan Winship <danw@gnome.org>
82 * tests/header-parsing.c:
85 * tests/uri-parsing.c:
86 * tests/xmlrpc-test.c: Make these less verbose by default (to make
87 it easier to see what failed when a "make check" fails).
89 2007-10-15 Dan Winship <danw@gnome.org>
91 * configure.in: 2.2.102
95 2007-10-08 Dan Winship <danw@gnome.org>
97 * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
99 * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
101 2007-10-05 Dan Winship <danw@gnome.org>
103 * configure.in: 2.2.101
107 * tests/httpd.conf.in:
109 * tests/ssl-test.c: srcdir != builddir fixes
111 2007-10-05 Dan Winship <danw@gnome.org>
113 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
114 if the authenticate callback returns a username and no password
115 (even though it's not supposed to do that). #480987
117 2007-09-24 Dan Winship <danw@gnome.org>
119 * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
120 (SoupAuthClass) remove "get_realm" virtual method.
122 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
123 WWW-Authenticate/Proxy-Authenticate header here, set realm, and
124 pass the params hash to the construct method.
125 (soup_auth_get_info): Return an identifier for the auth:
128 * libsoup/soup-auth-basic.c:
129 * libsoup/soup-auth-digest.c: update
131 * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
132 use soup_auth_get_info().
134 2007-09-24 Dan Winship <danw@gnome.org>
136 * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
137 improvement suggested by RFC2616 19.3.
139 * libsoup/soup-headers.c (soup_headers_parse_request): allow
140 erroneous trailing whitespace after HTTP version. #475169
142 * libsoup/soup-message-server-io.c (parse_request_headers): fix
143 the parsing of the Host header to assume it already includes the
144 port (which it should; the only reason this ever worked is because
145 SoupUri ignores the second port number when parse_request_headers
146 generates a URL like "http://localhost:9999:9999/").
148 * tests/header-parsing.c (reqtests): add a test for #475169
150 2007-09-23 Dan Winship <danw@gnome.org>
152 * libsoup/soup-message.c (soup_message_class_init): remove a
153 mysterious partial sentence in the ::wrote-chunk docstring.
156 * docs/reference/libsoup-sections.txt: Remove documentation of MD5
157 methods, which are not public. #440092
159 2007-09-23 Dan Winship <danw@gnome.org>
161 * libsoup/soup-message.c (soup_message_set_auth)
162 (soup_message_set_proxy_auth): Only remove the Authorization /
163 Proxy-Authorization header from the message if it was previously
164 set by soup_message_set_auth(). (Eg, not if it was added by
165 SoupConnectionNTLM.) #471389
167 * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
169 * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
170 test the crypto/encoding bits, just that the right headers are
171 being sent at the right times.
173 2007-09-14 Dan Winship <danw@gnome.org>
175 Make "make check" pass on Fedora 7:
177 * configure.in: update apache/php tests with additional filenames
179 * tests/httpd.conf.in: updates for configure.in changes and
180 slightly-more-recent apache
182 * tests/ssl-test.c (start_writing): fix uninitialized struct field
183 (main): start server after setting up client since otherwise
184 there's a race condition since soup_gnutls_init() isn't actually
187 * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
188 (which only exists if register_globals is set)
190 2007-06-01 Dan Winship <danw@novell.com>
192 * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
193 fix. noted by "cascardo" on libsoup-list.
195 2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
197 * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
198 headers so that libsoup can be used from C++ programs. #438776
200 2007-04-16 Dan Winship <danw@novell.com>
202 * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
203 than just using gpointer
205 * libsoup/soup-server.c (SoupServerPrivate): use it
207 * libsoup/soup-session.c (SoupSessionPrivate): use it
209 * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
210 rather than "cred" as the abbreviation for "credentials".
212 * docs/reference/libsoup-sections.txt:
213 * docs/reference/tmpl/soup-misc.sgml:
214 * docs/reference/tmpl/soup-ssl.sgml: update
216 2007-03-29 Dan Winship <danw@novell.com>
218 * libsoup/soup-session-sync.c (queue_message): Implement this by
219 sending the message (synchronously) in another thread and then
220 queueing the callback back in the main thread.
222 * libsoup/soup-session.c (soup_session_queue_message): update docs
223 to be more explicit about what thread the callback occurs in
225 2007-03-17 Dan Winship <danw@novell.com>
227 * libsoup/soup-message.c (soup_message_set_auth)
228 (soup_message_get_auth, soup_message_set_proxy_auth)
229 (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
232 * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
233 soup_message_set_proxy_auth.
234 (update_auth_internal): Call soup_message_get_auth or
235 soup_message_get_proxy_auth to determine the message's prior auth,
236 rather than calling lookup_auth() again, since it isn't guaranteed
237 to return the same thing now as it did when the message was
238 originally sent. Fixes erroneous 401s when queuing multiple
239 messages at once to an as-yet-unauthenticated-to server. #271540
241 * libsoup/soup-session-async.c (queue_message): don't run the
242 queue right away, do it at idle time. Otherwise in some cases
243 (especially errors), the message callbacks could be invoked before
244 queue_message returns.
246 * tests/auth-test.c: add a regression test for #271540.
248 2007-03-17 Dan Winship <danw@novell.com>
250 * configure.in: require glib 2.12. check for timegm().
252 * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
253 (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
254 patch from Emmanuele Bassi.
256 * libsoup/soup-types.h: remove local copy of
257 G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
260 * libsoup/soup-misc.c (soup_base64_encode_close)
261 (soup_base64_encode_step, soup_base64_encode)
262 (soup_base64_decode_step): Make these just be wrappers around the
263 glib base64 methods. (For now; eventually they'll just go away.)
265 * libsoup/soup-auth-basic.c (authenticate):
266 * libsoup/soup-auth-digest.c (authenticate):
267 * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
268 (soup_ntlm_response):
269 * libsoup/soup-server-auth.c (soup_server_auth_new):
270 * libsoup/soup-soap-message.c (soup_soap_message_write_base64):
271 * libsoup/soup-xmlrpc-message.c
272 (soup_xmlrpc_message_write_base64):
273 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
274 Use glib base64 methods
276 2007-03-16 Dan Winship <danw@novell.com>
278 * libsoup/soup-message.c (soup_message_get_response_encoding):
279 update the handling of CONNECT: it has no response body by
280 default, but does have a body if its headers say so.
282 * tests/proxy-test.c: test libsoup's behavior when talking to
285 * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
286 sections configuring them, for proxy-test
288 * configure.in: update the apache-module-dir-finding code to deal
289 with the fact that some modules (eg, mod_ssl) might only be in the
290 mpm-specific module dir, while others (eg, mod_php5) might only be
291 in the generic module dir.
293 2007-03-12 Dan Winship <danw@novell.com>
295 * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
296 ssl-test. #417617, patch from Elijah Newren.
298 2007-03-12 Dan Winship <danw@novell.com>
300 * libsoup/soup-session-sync.c (wait_for_connection): if
301 soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
302 try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
303 where-the-proxy-closes-the-connection-when-returning-407. (Reported
306 * tests/get.c: Rewrite to use soup_session_send_message rather
307 than soup_session_queue_message, and add a "-s" flag to use
308 SoupSessionSync rather than SoupSessionAsync (so we can test bugs
309 in the sync code paths).
311 2007-03-08 Dan Winship <danw@novell.com>
313 * libsoup/soup-gnutls.c (do_handshake): don't return
314 G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
315 until the handshake is complete.
316 (soup_gnutls_read, soup_gnutls_write): if we get
317 GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
318 returning G_IO_STATUS_AGAIN; if the socket is blocking then
319 G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
320 might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
321 or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
323 #415402, based on a patch from Jacob Berkman.
325 * tests/ssl-test.c: basic ssl test. In particular, tests that
326 rehandshake requests are handled correctly during both synchronous
327 and asynchronous I/O. Might eventually test other stuff too...
330 * tests/Makefile.am: updates for ssl-test
332 2007-02-19 Dan Winship <danw@novell.com>
334 * configure.in: Get gcrypt libs/cflags.
336 * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
337 gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
339 2007-02-12 Dan Winship <danw@novell.com>
341 * configure.in: 2.2.100
343 2007-02-12 Dan Winship <danw@novell.com>
345 * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
346 this to handle "\0"-terminated status lines (eg, from WebDAV
347 responses), like the docs say it does. #406997
348 (soup_headers_parse): Balance that out by rejecting internal "\0"s
350 (soup_headers_parse_request, soup_headers_parse_response): Update
351 docs to warn that @dest may be modified even on error. (This was
352 always true, it just wasn't documented.)
354 2007-01-16 Dan Winship <danw@novell.com>
356 * tests/header-parsing.c (do_request_tests, do_response_tests):
357 initialize "errors" to 0. duh. Pointed out by Michael Wolf.
359 2007-01-08 Dan Winship <danw@novell.com>
361 * configure.in: 2.2.99
365 2007-01-06 Dan Winship <danw@novell.com>
367 * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
368 easier to understand and more correct, and make the "str" param
369 const rather than overwriting it during parsing.
370 (soup_headers_parse_request, soup_headers_parse_response):
371 Likewise, make "str" param const. Fix the doc comment to describe
372 the correct constraint on str. Make the parsing slightly more
373 lenient as per sections 4.1 and 19.3 of RFC 2616.
375 * tests/header-parsing.c: new regression test, for Request-Line,
376 Status-Line, and message-header parsing.
378 Inspired by #391970 (crash in SoupServer when certain invalid
379 requests are received).
381 2006-12-05 Dan Winship <danw@novell.com>
383 * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
384 to soup_message_io_stop() here; the corresponding calls were
385 needed back in the SoupContext days, but they are wrong now and
386 cause async-redirects-to-other-hosts to fail. #382251. Also
387 clarify docs with respect to soup_session_requeue_message().
389 * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
391 * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
394 2006-11-20 Dan Winship <danw@novell.com>
396 * configure.in: 2.2.98
400 2006-11-20 Dan Winship <danw@novell.com>
402 Patch from Andrew W. Nosenko:
404 * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
405 memory leak when parse_response_headers() is called on a message
406 that has a 'reason_phrase' already for some reason.
408 * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
409 hostname was not freed.
410 (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
411 'chan' was not freed in case of initialization error. Avoid double
412 close of the "real" (plain, non-ssl) channel FD.
414 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
415 memory leak: the "real" (plain, non-ssl) GIOChannel was never
416 "finally" unreffed (one more *_ref() than *_unref()) in case of
419 2006-11-20 Dan Winship <danw@novell.com>
421 * libsoup/soup-connection-ntlm.c (send_request):
422 * libsoup/soup-session-sync.c (queue_message):
423 * libsoup/soup-status.c (reason_phrases): Add some missing
424 "static"s. Patch from Matthias Clasen, #376387
426 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
427 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
428 same thing as <value><string>foo</string></value>. Pointed out by
429 Todd Kulesza. #364490
431 2006-11-06 Dan Winship <danw@novell.com>
433 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
434 addition of soup_xml_real_node.
438 2006-11-06 Dan Winship <danw@novell.com>
440 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
441 "real" (ie, not comment or whitespace) xml node
443 * libsoup/soup-soap-response.c (parse_parameters)
444 (soup_soap_response_from_string)
445 (soup_soap_parameter_get_first_child)
446 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
447 Based on a patch from Andrew W. Nosenko.
449 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
450 don't call xmlKeepBlanksDefault, which changes libxml's behavior
451 globally! Instead, use soup_xml_real_node() when traversing the
454 * libsoup/soup-xmlrpc-response.c
455 (soup_xmlrpc_response_from_string): don't call
456 xmlKeepBlanksDefault.
457 (exactly_one_child): rewrite in terms of soup_xml_real_node()
458 (which means it handles comments now as well)
459 (soup_xmlrpc_value_get_struct)
460 (soup_xmlrpc_value_array_get_iterator)
461 (soup_xmlrpc_value_array_iterator_prev)
462 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
464 2006-11-05 Dan Winship <danw@novell.com>
466 * libsoup/soup-headers.c (soup_headers_parse_request): document
467 this (in particular, point out that str+len must point to exactly
468 the right place). Allow req_method and req_path to be NULL.
469 (soup_headers_parse_status_line, soup_headers_parse_response):
470 document. Also, change "status_phrase" argument to "reason_phrase"
471 to match the spec. Inspired by #339889.
473 2006-11-03 Dan Winship <danw@novell.com>
475 * libsoup/*.c: fix lots of warnings. Partially from patches from
476 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
478 2006-11-03 Dan Winship <danw@novell.com>
480 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
481 Based on #356809 from Matthew Barnes.
483 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
484 Paolo Borelli. #351500
486 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
487 pointed out by Andrew W. Nosenko.
489 * configure.in: Use pkgconfig to find gnutls. Remove old static
490 linking stuff that was only needed for rcd.
492 * acinclude.m4: remove gnutls stuff
494 * libsoup.pc.in: Use Requires rather than putting xml/ssl
495 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
498 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
499 cygwin. From "Cygwin Ports maintainer", #321827.
501 2006-07-24 Dan Winship <danw@novell.com>
503 * configure.in: 2.2.96. bump AGE and CURRENT for new API
507 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
508 New, from Fernando Herrera, bug 348532.
510 2006-07-21 Dan Winship <danw@novell.com>
512 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
513 constructed auth doesn't have a realm, it's invalid, as per RFC
514 2617. Based on a patch from Nate Nielsen on libsoup-list.
515 (soup_auth_get_realm): remove "if available" from docs; all auths
518 * libsoup/soup-message-server-io.c (get_response_headers): If the
519 server handler set a Content-Length header on the message, don't
520 add a second one. (Preserves compatibility with an old hacky way
521 that people might have been handling HEAD from SoupServer.)
523 * README: update to mention mailing list and bugzilla
525 * HACKING: kill this since there's nothing here that isn't either
526 obvious, or redundant with the README
528 2006-07-21 Dan Winship <danw@novell.com>
530 * libsoup/soup-server-message.c (soup_server_message_init):
531 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
532 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
533 actually worked here, and so there was an undocumented requirement
534 that you manually set the encoding on every response
535 (which SoupServer itself was not doing on internal errors).
536 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
537 (soup_server_message_set_encoding): reject the new
538 SoupTransferEncoding values, for compatibility
540 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
541 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
542 public API, it always has been, due to bugs. Add some new values,
543 currently just for internal use: SOUP_TRANSFER_NONE (for cases
544 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
545 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
546 actually implemented yet).
548 * libsoup/soup-message.c (soup_message_get_request_encoding,
549 soup_message_get_response_encoding): figure out the body encoding
550 being used by the request/response, including all the tricky
551 cases like HEAD/1xx/etc.
552 (soup_message_is_keepalive): if the response encoding is
553 SOUP_TRANSFER_EOF, then the message isn't keepalive.
555 * libsoup/soup-message-client-io.c (parse_response_headers): use
556 soup_message_get_response_encoding.
558 * libsoup/soup-message-server-io.c (parse_request_headers): use
559 soup_message_get_request_encoding.
560 (get_response_headers): use both soup_server_message_get_encoding
561 and soup_message_get_response_encoding, to properly distinguish
562 between the wire encoding and the alleged-by-headers encoding
563 (which differ for HEAD, etc).
565 * libsoup/soup-message-io.c (io_error, read_body_chunk):
566 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
567 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
568 SOUP_MESSAGE_IO_STATE_FINISHING.
570 * libsoup/soup-server.c (request_finished): Check
571 soup_socket_is_connected() *before* soup_message_is_keepalive(),
572 since the message will be invalid if the client unexpectedly
573 dropped the connection.
575 * tests/simple-httpd.c (server_callback): handle HEAD requests.
576 Remove no-longer-necessary soup_server_message_set_encoding()
579 * tests/get.c: add -d (debug) flag to print headers, and -h flag
580 to do a HEAD rather than GET
582 2006-07-10 Dan Winship <danw@novell.com>
584 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
585 time. Pointed out by Daniel Holbach.
587 2006-07-10 Dan Winship <danw@novell.com>
589 * configure.in: 2.2.95
593 2006-06-19 Dan Winship <danw@novell.com>
595 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
596 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
598 * configure.in: fix some quoting
600 2006-06-14 Dan Winship <danw@novell.com>
602 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
604 * tests/xmlrpc-test.c: XML-RPC regression test
606 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
608 * tests/httpd.conf.in: add php stuff
610 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
611 rather than "stop", so that it stops listening on the socket
612 before exiting, so that we can immediately start another apache
613 (eg, in "make check").
615 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
618 * libsoup/soup-xmlrpc-message.c
619 (soup_xmlrpc_message_write_datetime): rename from
620 "..._write_time", to make it consistent with the XML-RPC type name
621 and the corresponding SoupXmlrpcResponse method. Also, fix it to
622 use the same ISO 8601 format as the spec, and use the right value
623 for the seconds field.
624 (soup_xmlrpc_message_write_base64): Change the buf arg to a
625 gconstpointer rather than a const char *.
627 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
628 Return a GByteArray containing the decoded data, rather than
629 the base64-encoded string.
630 (soup_xmlrpc_value_dump_internal): Update for that (and don't
632 (soup_xmlrpc_value_array_get_iterator,
633 soup_xmlrpc_value_array_iterator_get_value): Make these actually
636 2006-06-12 Dan Winship <danw@novell.com>
638 * configure.in: 2.2.94
642 2006-06-12 Dan Winship <danw@novell.com>
644 * docs/reference/client-howto.xml:
645 * docs/reference/server-howto.xml: New client and server API
648 * docs/reference/*: reorganize, regenerate, fill in some missing
651 * libsoup/soup-connection.c (soup_connection_new): document the
654 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
656 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
659 2006-06-12 Dan Winship <danw@novell.com>
661 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
662 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
664 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
665 the output parameter and make the return value match the other
668 2006-06-09 Dan Winship <danw@novell.com>
670 * configure.in: Add tests for apache, output tests/httpd.conf
674 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
676 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
679 * tests/auth-test.c: Use apache-wrapper functions to start a local
680 apache process to test authentication against, since the auth-test
681 tree at developer.ximian.com went missing a long time ago. #311825
683 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
684 (TESTS): include auth-test if HAVE_APACHE.
686 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
687 URI pointing to a directory rather than a file.
689 2006-06-08 Dan Winship <danw@novell.com>
691 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
692 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
693 Check return value of strtol/g_ascii_strtod correctly. #344222,
694 patch from Brent Smith.
696 2006-06-07 Dan Winship <danw@novell.com>
698 * libsoup/soup-xmlrpc-response.c
699 (soup_xmlrpc_response_from_string): record whether or not the
700 response was a fault.
701 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
704 2006-05-29 Dan Winship <danw@novell.com>
706 * configure.in: 2.2.93
710 2006-05-29 Dan Winship <danw@novell.com>
712 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
713 "FINISHING" which means "done I/O, but not yet done processing and
714 cleanup" before "DONE" (which now always means "completely done").
715 (soup_message_io_stop): disconnect the socket if the read state is
716 "< FINISHING", not "!= DONE".
717 (io_error): on an EOF-that-signals-end-of-data, set state to
718 FINISHING and run io_read().
719 (io_read, io_write): remove the g_return_if_fails from before.
720 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
721 listening for the readable/writable signal (eg, so we don't end up
722 reading a following pipelined request), and set the state to DONE.
723 (soup_message_io_unpause): Only reconnect the readable/writable
724 signals if the io state isn't DONE. Guard the calls to
725 io_read/io_write better so that it's safe to call this even after
726 they are both DONE, since it may be easier for us to test that
727 than for the caller to.
729 Fixes 334469, 342640, and another bug caused by the earlier
730 workaround to 334469. Based on patches and analysis from William
731 Jon McCann and Armin Bauer.
733 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
734 this work again. (Pointed out by Alex Larsson)
736 2006-05-26 Dan Winship <danw@novell.com>
738 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
741 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
742 SSL after CONNECTing! Doh. Part of bnc #174255.
743 (SoupConnectionMode): new enum for the three types of
744 SoupConnection (direct, proxy, tunnel).
745 (set_property): set priv->mode according to proxy_uri and
747 (socket_connect_result, soup_connection_connect_sync): use
748 priv->mode to decide whether or not to tunnel.
749 (send_request): Only pass TRUE for is_proxy to
750 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
751 (Also part of bnc #174255).
753 2006-05-26 Dan Winship <danw@novell.com>
755 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
756 if IO is currently in progress on a message.
758 * libsoup/soup-session-async.c (run_queue): don't process messages
759 that are io_in_progress. #342545, fix based on analysis from Wang
760 Xin. (In the future we may want to re-fix this by adding a
761 REQUEUED message status separate from QUEUED.)
763 2006-05-22 Dan Winship <danw@novell.com>
765 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
766 while holding host_lock; that's not allowed and can cause
767 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
770 2006-04-10 Dan Winship <danw@novell.com>
772 * configure.in: bump version to 2.2.92
776 2006-04-10 Dan Winship <danw@novell.com>
778 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
779 if these get called after the IO is done. This isn't supposed to
780 happen, but apparently does. Workaround for #334469.
782 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
783 NULL-terminate these so we don't crash when trying to parse an
784 invalid value. (Flip side of the previous #328615 patch.)
786 2006-04-02 Dan Winship <danw@novell.com>
788 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
789 Write out correct digest algorithm value. #328615.
791 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
792 Request-Line-parsing code to not have a lame max length. #335040.
794 * Makefile.am (install-data-local): Install the .pc file mode 644,
797 * libsoup/soup-auth-digest.c:
798 * libsoup/soup-auth.c:
799 * libsoup/soup-message-client-io.c:
800 * libsoup/soup-message-server-io.c:
801 * libsoup/soup-message.c:
802 * libsoup/soup-method.c:
803 * libsoup/soup-server-auth.c:
804 * tests/get.c: replace locale-ish strcasecmps with
807 * libsoup/*.c: fix most signed/unsigned mismatch warnings
809 2006-03-03 Dan Winship <danw@novell.com>
811 * configure.in: bump version to 2.2.91.
815 2006-03-03 Dan Winship <danw@novell.com>
817 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
818 GMainContext as well, and update the resolution code to dispatch
819 each lookup result in the correct context.
821 * libsoup/soup-address.c (soup_address_resolve_async_full): New
822 method that takes a GMainContext to pass to
823 soup_dns_lookup_resolve_async.
825 * libsoup/soup-socket.c (soup_socket_connect): Use
826 soup_address_resolve_async_full. Fixes a problem reported by Armin
829 * configure.in: update to require glib 2.6, since apparently the
832 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
834 * libsoup/soup-connection.c:
835 * libsoup/soup-session.c:
836 * libsoup/soup-socket.c: add a "timeout" property,
837 which gets passed from server to socket, and session to connection
838 to socket, allowing blocking non-responsive sync connections to
839 return. Combination of "EAGAIN" && "Blocking" connection is treated
840 as error and the connection will be terminated and the control
841 is returned to the caller immediately.
843 2006-02-02 Tor Lillqvist <tml@novell.com>
845 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
846 on Windows, as they are present by default on XP only. We do want
847 to support Windows 2000, too.
849 2005-12-21 Dan Winship <danw@novell.com>
851 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
854 * tests/date.c: add three more ISO 8601 cases, to exercise all the
857 #324671, from Emmanuele Bassi
859 2005-11-25 Dan Winship <danw@novell.com>
861 * README: sync to text on wiki, and point to wiki
863 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
865 2005-11-17 Dan Winship <danw@novell.com>
867 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
868 right away, to protect against this being re-entered mid-cleanup
869 (when we unref the connection). #321208, based on a patch from
872 2005-11-16 Dan Winship <danw@novell.com>
874 * libsoup/soup-xmlrpc-message.c
875 (soup_xmlrpc_message_start_member): add the "name" element to the
876 struct member. #321362, patch from Sebastian Bauer.
878 2005-11-10 Dan Winship <danw@novell.com>
880 * configure.in: bump version to 2.2.90. This will not be
881 officially released, but once these patches have gotten some
882 testing they may be pulled up to the gnome-2-12 branch.
884 * libsoup/soup-connection.c:
885 * libsoup/soup-server.c:
886 * libsoup/soup-session.c:
887 * libsoup/soup-socket.c: add an "async-context" property,
888 which gets passed from server to socket, and session to connection
889 to socket, allowing async usage outside the main thread. Based on
890 patches from Armin Bauer and Jürg Billeter.
892 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
893 soup_add_timeout): utility routines to add watches, idles, and
894 timeouts to non-default GMainContexts.
896 * libsoup/soup-message-io.c (io_write): set the read state
897 appropriately after writing a "100 Continue" response
898 (io_read): More 100-Continue stuff. I don't think this is quite
899 right so it will probably change again later.
901 2005-11-01 Dan Winship <danw@novell.com>
903 * docs/reference/libsoup-docs.sgml: tell it to generate an index
905 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
907 2005-11-01 Dan Winship <danw@novell.com>
909 * libsoup/soup-connection.c (set_current_request,
910 clear_current_request): Cast the argument to
911 g_object_add/remove_weak_pointer to the wrong type, to make gcc
912 4.1 happy, because C is stupid and "void **" means "a pointer to a
913 void *", not "a pointer to any kind of pointer".
915 * libsoup/soup-xmlrpc-response.c
916 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
919 2005-10-27 Dan Winship <danw@novell.com>
921 * libsoup/soup-socket.c (soup_socket_client_new_async,
922 soup_socket_client_new_sync): unref the SoupAddress passed to
923 soup_socket_connect to avoid a leak. Based on a patch from Wang
925 (socket_read_watch, read_from_network, socket_write_watch,
926 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
927 events when polling, since poll() will return them whether or not
928 you asked for them, but glib will ignore them unless you did,
929 which will result in CPU suckage if such an error occurs. #319305,
930 patch from Jonathan Matthew.
932 2005-10-27 Dan Winship <danw@novell.com>
934 bgo #316313 / bnc #116762, and probably also bgo #318252
936 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
937 after releasing it, to make sure we can't accidentally release it
940 * libsoup/soup-connection.c (clear_current_request): Call
941 soup_message_io_stop() on the cleared request.
943 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
944 little dance here to make sure the session can't queue another
945 message on the connection while we're in the process of requeuing
948 2005-08-30 Tor Lillqvist <tml@novell.com>
950 * libsoup-zip.in: Include documentation in developer zipfile.
952 2005-08-22 Dan Winship <danw@novell.com>
954 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
955 g_type_class_add_private.
957 * configure.in: Bump to 2.2.6.1
961 2005-08-22 Dan Winship <danw@novell.com>
963 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
964 soup_server_get_socket() addition.
968 2005-08-22 Dan Winship <danw@novell.com>
970 * libsoup/soup-connection.c (set_current_request,
971 clear_current_request): Fix g_object_add/remove_weak_pointer usage
972 to prevent a crash when canceling a request. From Tambet.
974 2005-08-16 Dan Winship <danw@novell.com>
976 Fix a connection leak reported by Tambet.
978 * libsoup/soup-connection.c (send_request): rather than tracking
979 the message progress via signals, call
980 soup_message_send_request_internal() and have it call
981 soup_connection_release() when it's done.
982 (request_restarted, request_done): gone
983 (clear_current_request): handle disconnecting (if necessary) and
984 updating last_used time here.
985 (soup_connection_release): Call clear_current_request().
986 (dispose): Call clear_current_request()
988 * libsoup/soup-message-client-io.c
989 (soup_message_send_request_internal): New. Takes a SoupConnection
990 in addition to the other args, and passes that on to
993 * libsoup/soup-message-io.c (SoupMessageIOData): add a
994 SoupConnection field.
995 (io_cleanup): if io->conn is set, unref it.
996 (soup_message_io_stop): if io->conn is set, and we ended in a
997 clean state, call soup_connection_release() on it.
998 (soup_message_io_client): Add a SoupConnection arg, which gets
999 reffed and stored in io->conn.
1001 * TODO: misc updates
1003 2005-08-15 Dan Winship <danw@novell.com>
1005 * libsoup/soup-connection.h (soup_connection_new):
1006 * libsoup/soup-server.h (soup_server_new):
1007 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
1008 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
1009 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
1011 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
1012 definition of this from glib 2.8 for use when compiling against
1015 2005-08-15 Tambet Ingo <tambet@ximian.com>
1017 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
1020 * libsoup/soup-server.c (soup_server_get_listener): ditto.
1022 2005-08-12 Dan Winship <danw@novell.com>
1024 * libsoup/soup-server.c (soup_server_get_listener): new method to
1025 get the server's listening socket.
1027 * libsoup/soup-socket.c: add a new "cloexec" property, to set
1028 FD_CLOEXEC on the socket. Update everything for that.
1030 2005-08-05 Dan Winship <danw@novell.com>
1032 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
1034 (soup_socket_connect): Make sure that get_iochannel() gets called
1035 if the connect succeeds right away, or the socket will fail on
1036 the first read or write. [#312540]
1038 2005-08-01 Dan Winship <danw@novell.com>
1040 * configure.in: drop version back down to 2.2.5 and
1041 SOUP_API_VERSION back to 2.2; due to various snafus, there has
1042 never yet been an official release of the 2.4 API and the GNOME
1043 2.12 betas have been shipping with libsoup 2.2 tarballs (while
1044 jhbuild has been using 2.4, with evolution and related packages
1045 having configure hacks to build against either). As there never
1046 ended up being any API-incompatible changes in the 2.4 series, we
1047 can just merge it back into the 2.2 series and kill off 2.4.
1049 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
1052 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
1054 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
1055 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
1056 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
1057 let us use a variable.
1059 2005-08-01 Dan Winship <danw@novell.com>
1061 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
1062 SoupMD5Context and write out the digest in hex digits.
1064 * libsoup/soup-auth-digest.c (authenticate, compute_response):
1065 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
1066 rather than duplicating the code in both places here.
1068 Patch from Wim Lewis.
1070 2005-07-15 Dan Winship <danw@novell.com>
1072 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
1073 since some servers are lame. Based on a patch from Jean-Yves
1076 * tests/uri-parsing.c: add some more tests to make sure that
1077 things that should be %-escaped do get %-escaped
1079 2005-07-06 Tor Lillqvist <tml@novell.com>
1081 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
1082 that gmtime() is thread-safe on Windows.
1083 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
1085 2005-06-14 Dan Winship <danw@novell.com>
1087 * configure.in: check for gmtime_r
1089 * libsoup/soup-date.c: date/time-manipulation functions
1091 * libsoup/soup-xmlrpc-message.c:
1092 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
1093 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
1096 * tests/date.c: soup-date test code
1098 * tests/getbug.c: XMLRPC test code. (Should be switched to use
1099 bugzilla.gnome.org once bgo supports XMLRPC.)
1101 * TODO: XMLRPC is implemented now (but shares the problem with
1102 SOAP that the API is not very good).
1104 2005-06-14 Dan Winship <danw@novell.com>
1106 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
1109 * docs/reference/*: update, fix, etc
1111 2005-06-13 Tor Lillqvist <tml@novell.com>
1113 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
1114 that we do have inet_pton() and inet_ntop() on Windows (because we
1115 implement them ourselves in soup-dns.c).
1117 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
1118 implementations, they were completely bogus.
1119 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
1121 2005-06-08 Dan Winship <danw@novell.com>
1123 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
1124 use just the domain name for the domain, not the whole
1125 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
1127 2005-05-26 Dan Winship <danw@novell.com>
1129 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
1130 this, since it can be called from set_property(). Possible fix for
1133 2005-05-05 Dan Winship <danw@novell.com>
1135 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
1136 --type-init-func to force g_thread_init to be called. [#302674]
1138 2005-04-18 Tor Lillqvist <tml@novell.com>
1140 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
1141 Automake conditional OS_WIN32. Pre-cache information that we do
1142 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
1143 wouldn't notice as they don't include the necessary headers or
1144 link with -lws2_32. Easiest to just pre-cache it.)
1146 * libsoup-zip.in: New file, to build zipfile-based distribution of
1149 * Makefile.am (EXTRA_DIST)
1150 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
1152 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
1153 WinSock library -lws2_32.
1155 * libsoup/soup-portability.h: New file. On Unix it includes the
1156 traditional BSD socket etc headers. On Win32 it includes
1157 winsock2.h and ws2tcpip.h.
1160 * libsoup/*.h: Correspondingly, don't include the BSD socket API
1163 * libsoup/soup-address.h
1164 * libsoup/soup-dns.h: Include soup-portability.h
1166 * libsoup/soup-address.c (soup_address_class_init): This function
1167 should get called before libsoup uses the WinSock API, so this is
1168 a good place to call WSAStartup().
1170 * libsoup/soup-auth-digest.c (get_protection_space): Use
1171 g_strsplit() instead of the relatively unportable strtok_r().
1173 * libsoup/soun-dns.c: Remove unused headers. Implement
1174 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
1175 and WSAAddressToString().
1177 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
1178 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
1180 (soup_socket_class_init): Call soup_address_get_type() to make
1181 sure WSAStartup() gets called (through soup_address_class_init()).
1182 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
1183 (soup_socket_write): Conditionalize SIGPIPE use.
1185 * tests/get.c: mkdir() is different in Microsoft's C library.
1187 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
1188 some clash with winsock2.h (which includes windows.h). The Win32
1189 headers pollute the namespace wildly.
1191 2005-04-15 Dan Winship <danw@novell.com>
1193 * libsoup/soup-dns.c (resolve_name): make this work with
1194 pre-EAI_OVERFLOW glibc [#300620]
1196 2005-04-12 Dan Winship <danw@novell.com>
1198 * configure.in: Remove the various gethostbyname_r checks and just
1199 check for getnameinfo/getaddrinfo.
1201 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
1202 forking. Change the API around a bunch in the process.
1204 * libsoup/soup-address.c: Update for soup-dns changes
1206 * tests/dns.c: take multiple hostnames on the command line and
1207 resolve them all at once (patch from tml)
1209 2005-04-11 Dan Winship <danw@novell.com>
1211 * configure.in: require glib-2.0 >= 2.4.0
1213 * libsoup/*.c: use G_DEFINE_TYPE and
1214 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
1216 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
1217 SOUP_MAKE_TYPE_WITH_IFACE
1219 * tests/revserver.c: use GThread. (patch from tml)
1221 2005-04-11 Dan Winship <danw@novell.com>
1223 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
1226 * libsoup.pc.in: rename from libsoup-2.2.pc.in
1228 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
1229 install the .pc file by hand, renaming it to include the
1232 * libsoup/Makefile.am: s/2.2/2.4/
1234 2005-03-09 Dan Winship <danw@novell.com>
1236 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
1237 if gnutls returns 0. [#73352]
1238 (verify_certificate): put an #ifdef around
1239 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
1241 2005-01-08 Not Zed <NotZed@Ximian.com>
1243 ** See ximian bug #70323.
1245 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
1246 types with guint32, as the code needs 32 bit longs.
1248 2004-10-20 Dan Winship <danw@novell.com>
1250 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
1251 commit, which somehow did not actually get committed then.
1253 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
1254 indicating whether or not the connection is connected.
1255 (tunnel_connect_finished): If successful, set connected. If the
1256 server returns a 3xx response, translate it to 407 (under the
1257 assumption that it's trying to redirect us to an HTML login page,
1258 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
1259 soup_socket_start_ssl().
1260 (socket_connect_result, soup_connection_connect_sync): If
1261 successful, set connected
1262 (soup_connection_disconnect): Don't emit "disconnected" if we
1263 aren't yet connected, or the message that was waiting for this
1264 connection may get stranded in the queue. (also part of 68531)
1266 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
1267 SSL and lets the caller pass the expected hostname. Fixes a
1268 problem where SSL certification validation would always fail if
1269 you used a proxy, because it was comparing the cert against the
1270 proxy's hostname. (68583)
1272 2004-10-06 Dan Winship <danw@novell.com>
1274 * libsoup/soup-ssl.h (SoupSocketError): add
1275 SOUP_SSL_ERROR_CERTIFICATE.
1277 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
1279 (verify_certificate): Set the GError appropriately rather than
1282 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
1283 the GIOChannel operation returns an error, store it as GOBject
1284 data on the socket (as a hack so soup-message-io.c can access it
1285 without us needing to change SoupSocket's API).
1287 * libsoup/soup-message-io.c (io_error): peek at the socket's
1288 "last_error" datum and set the message's status to SSL_FAILED
1289 (with the GError's message string) rather than IO_ERROR, if
1290 appropriate. For 64414.
1292 2004-09-30 Dan Winship <danw@novell.com>
1294 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
1295 extra initialization needed for libgcrypt 1.2 or higher. Fixes
1297 (soup_ssl_get_client_credentials,
1298 soup_ssl_get_server_credentials): Call soup_gnutls_init().
1300 2004-08-26 Dan Winship <danw@novell.com>
1302 * configure.in: Bump version to 2.2.0.
1304 * AUTHORS: Update this to reflect the last 2 years.
1306 * NEWS: Brief summary of 1.99.x -> 2.2 changes
1308 * README, TODO: Updates
1310 2004-08-26 Dan Winship <danw@novell.com>
1312 * libsoup/*: add/fix lots of gtk-doc comments
1314 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
1315 Fix bug noticed while documenting. (We were using the
1316 locale-case-insensitive functions rather than the g_ascii_ ones.)
1318 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
1319 implemented) NO_PIPELINE and NO_COOKIE flags.
1321 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
1322 There are still problems here with gtk-doc not recognizing many of
1323 the objects in libsoup...
1325 2004-08-13 JP Rosevear <jpr@novell.com>
1327 * configure.in: bump version, libtool number
1329 2004-08-09 Dan Winship <danw@novell.com>
1331 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
1332 use conn after emitting the "connect_result" signal, since it
1333 might be destroyed by that. Based on a patch from hpj.
1335 2004-08-02 Dan Winship <danw@novell.com>
1337 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
1339 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
1340 set, don't re-encode the URL parts. Based on a patch by
1341 Alfred.Peng@Sun.COM.
1343 2004-07-19 JP Rosevear <jpr@novell.com>
1345 * configure.in: bump version, libtool number
1347 2004-07-15 Dan Winship <danw@novell.com>
1349 * libsoup/soup-session-sync.c (send_message): Simplify this. If
1350 the message comes back from soup_connection_send_request not
1351 FINISHED, get a new connection rather than reusing the old one.
1352 This fixes a race condition in which a connection could end up
1353 double-booked, and fixes the handling of messages that get
1354 redirected to another server.
1356 2004-07-13 Dan Winship <danw@novell.com>
1358 * libsoup/soup-session.c (connect_result): If the connection
1359 attempt succeeded, reserve the connection before releasing
1360 host_lock. Otherwise, another thread might find it in the
1361 connection pool before the caller can queue a message on it.
1364 * libsoup/soup-session-async.c (got_connection): Call
1365 soup_connection_release(), since we don't have a specific message
1366 in mind for the connection, so we need it to be considered idle.
1368 * libsoup/soup-connection.c (soup_connection_release): New
1369 function, to undo a soup_connection_reserve().
1370 (soup_connection_send_request, soup_connection_reserve,
1371 soup_connection_authenticate, soup_connection_reauthenticate):
1374 2004-07-12 Dan Winship <danw@novell.com>
1376 * libsoup/soup-session-sync.c (send_message): signal the
1377 "connections available" condition after the message finishes. Duh.
1379 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
1381 2004-07-08 Dan Winship <danw@novell.com>
1383 * libsoup/soup-soap-response.c: Revert previous change for now; it
1384 breaks the build on distros with older libxmls.
1386 2004-07-08 Dan Winship <danw@novell.com>
1388 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
1391 2004-07-07 Fernando Herrera <fherrera@onirica.com>
1393 * libsoup/soup-soap-response.c: (finalize), (init),
1394 (soup_soap_response_from_string): Use a parse context for the
1395 xml document, so we can safely use the option to ignore
1396 blank spaces and '\n'.
1398 2004-07-06 Dan Winship <danw@novell.com>
1400 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
1401 http or https, require a hostname. For #61049
1403 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
1405 2004-06-03 JP Rosevear <jpr@novell.com>
1407 * configure.in: bump version to 2.1.11, libtool number
1409 2004-06-01 Dan Winship <danw@novell.com>
1411 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
1412 macros to not use ?: expressions as lvalues, since that's
1413 apparently a GNU extension.
1414 (soup_address_resolve_async): Use a timeout rather than an idle
1415 handler to poll the dns result. (soup-dns really should be
1416 rewritten to not require polling, but this is easier for now.)
1419 * libsoup/soup-server.c (call_handler): Don't use GNU-only
1420 non-constant structure initialization
1422 * tests/dns.c: Simple test of the dns code
1424 * tests/Makefile.am (noinst_PROGRAMS): build it
1426 2004-05-19 JP Rosevear <jpr@novell.com>
1428 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
1430 2004-05-18 Dan Winship <danw@novell.com>
1432 * libsoup/soup-ssl.h:
1433 * libsoup/soup-nossl.c: define some GError codes and stuff
1435 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
1436 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
1437 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
1440 * libsoup/soup-socket.c (soup_socket_write): Handle
1441 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
1442 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
1444 (read_from_network): Handle the reverse case (which would cause
1445 hanging rather than spinning, and might be the cause of some
1446 connector 1.5 slowness?)
1448 2004-05-11 Dan Winship <danw@novell.com>
1450 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
1451 kludgefully, using the magic of GClosure, to fix x86_64 problems
1454 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
1456 * libsoup/soup-soap-message.c (finalize) : free
1457 the elements of priv structure before freeing priv
1459 2004-04-20 Dan Winship <danw@ximian.com>
1461 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
1462 re-sending the message, call soup_message_restarted()
1463 (send_request): Connect to "restarted" signal, and remove the 401
1464 handlers from there; doing it here didn't work because if the
1465 connection was closed, the message would be re-sent on a new
1466 connection, but would still have the handlers from the old
1467 connection attached to it, which would make authentication fail.
1469 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
1470 Copy the handler list before starting, to protect against handlers
1471 that modify the handler list.
1473 2004-04-15 Dan Winship <danw@ximian.com>
1475 * libsoup/soup-connection.c (soup_connection_connect_sync):
1476 Connect to the socket's "disconnect" signal. (We were only doing
1477 this from the async version before, which meant that synchronous
1478 SoupConnections could outlive their sockets and start causing
1481 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
1482 Authorization header before adding a new one.
1484 2004-04-02 JP Rosevear <jpr@ximian.com>
1486 * configure.in: bump version, libtool number
1488 2004-03-15 Dan Winship <danw@ximian.com>
1490 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
1491 types to kill a warning with -Wall -O2
1493 2004-03-05 JP Rosevear <jpr@ximian.com>
1495 * configure.in: bump version, libtool number
1497 2004-03-02 Dan Winship <danw@ximian.com>
1499 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
1500 bytes_read is -1, since the value of errno is irrelevant when
1501 bytes_read is 0. Probably #54960.
1503 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
1505 * libsoup/soup-soap-response.h: removed not-implemented function's
1508 2004-02-27 Rodney Dawes <dobey@ximian.com>
1511 * libsoup/Makefile.am: Use a different variable for linking to the
1512 static version of gnutls, so we don't pull the .a files into the .pc
1516 2004-02-20 Dan Winship <danw@ximian.com>
1518 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
1519 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
1520 to make this work on 64-bit platforms. (Grr. C type checking
1523 * tests/revserver.c: Likewise
1525 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
1529 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
1530 don't leak the value returned from xmlNodeGetContent().
1531 (soup_soap_parameter_get_string_value,
1532 soup_soap_parameter_get_property): return a g_strdup'ed
1533 string, not the value returned by xmlNodeGetContent, so that
1534 callers can use g_free, and not xmlFree.
1536 * libsoup/soup-soap-response.h: made soup_parameter_get_property
1539 2004-02-17 Dan Winship <danw@ximian.com>
1541 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
1542 typo. #54433, from Mariano Suarez-Alvarez.
1544 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
1547 2004-02-17 Rodney Dawes <dobey@ximian.com>
1549 * libsoup/soup-message.c (soup_message_new): HTTP connections require
1550 a hostname, and we also hash on the host for message queueing in the
1551 session, if the host is NULL we free the SoupUri and return NULL
1553 2004-02-14 Dan Winship <danw@ximian.com>
1555 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
1556 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
1558 2004-02-12 Joe Shaw <joe@ximian.com>
1560 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
1561 loop to prevent DNS errors from short reads.
1563 2004-02-11 Joe Shaw <joe@ximian.com>
1565 * configure.in: Bumped version number to 2.1.7 and libtool
1568 2004-02-11 Dan Winship <danw@ximian.com>
1570 * libsoup/soup-connection.c (soup_connection_disconnect): Update
1571 Joe's comment here with a gory explanation of exactly what's going
1572 on. (It's not just an SSL bug either, it affects all connections.)
1574 2004-02-10 Joe Shaw <joe@ximian.com>
1576 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
1577 workaround for SSL connections which time-out but don't close the
1578 socket until we try sending data again later.
1580 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
1581 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
1582 own it, the SoupAddress does.
1584 2004-02-09 JP Rosevear <jpr@ximian.com>
1586 * configure.in: Bump libtool numbers
1588 2004-02-05 Dan Winship <danw@ximian.com>
1590 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
1592 (soup_session_remove_filter): And unref it here (we were already
1593 unreffing it in dispose().)
1595 2004-02-05 Joe Shaw <joe@ximian.com>
1597 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
1598 hostent if it's NULL.
1599 (soup_dns_entry_check_lookup): If the entry is resolved, but the
1600 hostent is NULL, uncache it.
1602 2004-02-04 Dan Winship <danw@ximian.com>
1604 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
1605 remove the WWW-Authenticate headers before returning, so the
1606 session won't fall back to Basic auth. Also, leave the connection
1607 in the "authenticating" state rather than setting it to
1609 (ntlm_authorize_post): Only requeue the message if it's in the
1610 "authenticating" state (and set it to "authenticated"). Fixes an
1611 "unepectedly disconnected" error if authentication fails.
1613 2004-02-03 Dan Winship <danw@ximian.com>
1615 * libsoup/soup-message-io.c (io_cleanup): Call
1616 soup_message_io_stop so we don't get a callback on the io after
1617 it's been cleaned up.
1619 * libsoup/soup-session.c (add_auth): Only remove the Authorization
1620 header if we have another one to add. (Otherwise it messes up
1621 SoupConnectionNTLM.)
1623 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
1624 memcpy here, since the source and destination will overlap if
1625 *nread is small and read_buf->len is large. (Noticed by valgrind,
1628 2004-02-02 Joe Shaw <joe@ximian.com>
1630 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
1631 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
1632 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
1633 when there are no messages on the wire on a non-blocking socket.
1634 This sends a SSL hangup message and then allows us to immediately
1637 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
1639 * configure.in: bumped version number to 2.1.6.
1641 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
1643 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
1646 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
1648 * libsoup/soup-soap-response.[ch]
1649 (soup_soap_parameter_get_string_value): removed 'const' from return
1652 2004-01-29 Joe Shaw <joe@ximian.com>
1654 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
1655 certificate before we try to use it. Ahem.
1657 2004-01-23 Joe Shaw <joe@ximian.com>
1659 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
1661 2004-01-21 Joe Shaw <joe@ximian.com>
1663 * configure.in: Require at least GnuTLS 1.0.0.
1665 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
1667 (verify_certificate): Use gnutls_x509_crt_import() and
1668 gnutls_x509_crt_check_hostname() instead of
1669 gnutls_x509_check_certificates_hostname().
1670 (init_dh_params): Use gnutls_dh_params_generate2() instead of
1671 gnutls_dh_params_generate() and gnutls_dh_params_set().
1673 2004-01-20 Joe Shaw <joe@ximian.com>
1675 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
1676 close the socket itself, so we need to do it or else our
1677 connections stay in CLOSE_WAIT forever.
1679 2004-01-16 Jason Leach <leach@wam.umd.edu>
1681 * libsoup/Makefile.am: builddir != srcdir fixes.
1683 2004-01-14 Joe Shaw <joe@ximian.com>
1685 * libsoup/soup-gnutls.c (verify_certificate): Remove the
1686 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
1688 2004-01-12 JP Rosevear <jpr@ximian.com>
1690 * configure.in: bump version and libtool revision
1692 2004-01-12 Dan Winship <danw@ximian.com>
1694 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
1697 2004-01-10 Larry Ewing <lewing@ximian.com>
1699 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
1702 2004-01-09 Joe Shaw <joe@ximian.com>
1704 * acinclude.m4: Include the libgnutls.m4 file.
1706 * configure.in: Remove manual checking for libgnutls-config and
1707 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
1708 version, which is 0.9.7 for now.
1710 * libsoup/Makefile.am: Some changes for the above change.
1712 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
1713 HAVE_GNUTLS_GNUTLS_H.
1714 (verify_certificate): Uncomment the SSL certificate hostname
1717 * libsoup/soup-session.c (set_property): Be smart about flushing
1718 our SSL credentials only when the CA file is set to something
1719 different than it was before.
1721 2004-01-09 Harish K <kharish@novell.com>
1722 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
1723 added code to ignore Header element, if present, while creating
1726 2004-01-05 Dan Winship <danw@ximian.com>
1728 * configure.in: Remove no-longer-relevant socklen_t check
1730 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
1731 Marcus Clarke, #52566)
1733 * libsoup/soup-dns.c: Likewise
1735 2003-12-29 JP Rosevear <jpr@ximian.com>
1737 * configure.in: bump version and libtool numbers
1739 2003-12-22 Dan Winship <danw@ximian.com>
1741 * README, TODO: Update these
1743 2003-12-22 Dan Winship <danw@ximian.com>
1745 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
1746 you can disconnect a socket from one thread while doing I/O in
1749 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
1750 soup_message_io_stop() and io_cleanup(), to separate out the "stop
1751 reading/writing" and "free data" phases to allow thread-safe
1752 synchronous cancellation.
1753 (soup_message_io_finished): call both soup_message_io_stop() and
1755 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
1756 doesn't already have a transport error status (eg, CANCELLED).
1757 (new_iostate): Call io_cleanup() if needed.
1759 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
1760 clearer that it's not a status.
1762 * libsoup/soup-message.c (finalize, restarted, finished,
1763 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
1764 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
1766 * libsoup/soup-connection.c (send_request): Remove
1767 soup_message_io_cancel call.
1769 * libsoup/soup-session-sync.c (send_message): Connect to the
1770 connection's "disconnected" signal rather than using a weak ref,
1771 since that's what we really care about, and it's possible that the
1772 connection may have an extra ref on it somewhere that would keep
1773 it from being destroyed even if it was disconnected.
1775 2003-12-20 Joe Shaw <joe@ximian.com>
1777 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
1778 the non-proxy case, then use the root ("/").
1780 2003-12-19 Dan Winship <danw@ximian.com>
1782 * libsoup/soup-message-filter.c: New. An interface for objects
1783 that want to act on every message passing through a session.
1784 (Initially being used for authentication, but could also be used
1785 for cache handling, cookie management, etc.)
1787 * libsoup/soup-connection.c (class_init, etc): Add a message
1789 (send_request): If the connection has a message filter set, run
1790 it on the message before sending it.
1791 (soup_connection_connect_async, etc): When setting up a tunnel, if
1792 we get back a 407 and the session tries to requeue the message,
1793 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
1794 whether or not the proxy closed the connection).
1795 (soup_connection_connect_sync): Likewise
1796 (send_request, request_done): Ref/unref the connection
1798 * libsoup/soup-session.c (soup_session_get_type): Implement the
1799 SoupMessageFilter interface.
1800 (soup_session_get_connection): Use the session as the connection's
1802 (soup_session_add_filter, soup_session_remove_filter): Add/remove
1803 filters from the session
1804 (setup_message): do auth handling, and call each of the session's
1805 filters' setup_message methods as well.
1806 (soup_session_send_message_via): No longer needed.
1807 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
1809 * libsoup/soup-session-async.c (run_queue): Use
1810 soup_connection_send_request, since soup_session_send_message_via
1813 * libsoup/soup-session-sync.c (send_message): Likewise
1815 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
1816 response to a CONNECT is always keepalive, even if it's HTTP/1.0
1817 with no Connection header.
1819 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
1821 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
1822 gobject interface types.
1824 * tests/get.c (main): Add a -p flag to specify a proxy
1826 * tests/simple-proxy.c: Fix #includes
1828 2003-12-18 Dan Winship <danw@ximian.com>
1830 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
1831 disconnect the socket rather than just unreffing it, since the IO
1832 code may be holding an extra ref on it.
1833 (send_request): connect to the "restarted" signal too
1834 (request_restarted): Deal with "Connection: close"
1836 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
1837 not go into an infinite loop if the server only supports Basic.
1839 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
1841 * libsoup/Makefile.am: install soup-message-queue.h with the rest
1844 2003-12-17 Dan Winship <danw@ximian.com>
1846 * configure.in: Add gthread to glib check
1848 * libsoup/soup-session.c: Make this an abstract class.
1850 * libsoup/soup-session-async.c: A SoupSession class for
1851 asynchronous gmain-based operation; replaces the old SoupSession.
1853 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
1854 blocking operation for use with threaded apps.
1856 * libsoup/soup-types.h, libsoup/soup.h: add the new session
1859 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
1860 try to unref the socket if the socket creation fails.
1861 (soup_connection_reserve): New, to explicitly mark a connection as
1862 being in use without queueing a message on it.
1864 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
1865 "block" flag to not be reversed.
1867 * libsoup/soup-message.c (finished): set status to FINISHED here.
1868 (soup_message_cancel): Gone; needs to be done at the session
1871 * libsoup/soup-message-queue.c: Add a mutex and make all of the
1872 operations thread-safe.
1874 * libsoup/soup-socket.c (disconnect_internal): Make this
1876 (soup_socket_connect): Make the sync case work correctly.
1878 * libsoup/Makefile.am: add the SoupSession subclasses
1880 * tests/Makefile.am: libsoup depends on libgthread now, so
1881 revserver doesn't need to explicitly.
1883 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
1884 soup_session_async_new().
1886 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
1888 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
1891 2003-12-16 Joe Shaw <joe@ximian.com>
1893 * libsoup/soup-connection.c (socket_connect_result,
1894 soup_connection_connect_sync): Only set up a tunnel if the
1895 destination protocol is HTTPS.
1897 * libsoup/soup-message.c (class_init): Add a default handler for
1899 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
1900 (soup_message_cancel): Don't set the status to
1901 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
1902 status is already SOUP_MESSAGE_STATUS_FINISHED.
1904 * libsoup/soup-session.c (set_property): Don't cancel the session
1905 if the proxy URI set as a property isn't different from the old
1907 (get_host_for_message): Refactor some code so that we can easily
1908 get the right SoupSessionHost for proxies as well as from the
1910 (authenticate_auth): Take a gboolean proxy parameter. Check it to
1911 see which URI (message URI or proxy URI) to use for
1912 authentication. Add a long comment about lack of clarity in RFC
1913 2617 with respect to proxies and protection spaces.
1915 2003-12-15 Dan Winship <danw@ximian.com>
1917 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
1918 soup_socket_write): s/guint/gsize/ to match the definitions in
1919 soup-socket.c. #52167.
1921 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
1923 * libsoup/soup-soap-message.c: removed debugging of the messages here.
1925 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
1927 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
1928 added information for SOAP-ENV namespace.
1930 2003-12-10 Dan Winship <danw@ximian.com>
1932 * libsoup/soup-message-client-io.c (parse_response_headers): if we
1933 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
1934 message's http_version so the keep-alive handling is correct.
1935 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
1937 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
1938 "restarted" signal as suggested by Joe.
1940 * libsoup/soup-message-io.c (soup_message_io_finished): emit
1941 either "restarted" or "finished" as appropriate
1943 * libsoup/soup-session.c (soup_session_queue_message): Connect to
1944 "restarted" and run the queue if a message gets restarted
1946 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
1949 2003-12-10 Tambet Ingo <tambet@ximian.com>
1951 * configure.in: Use autoconfig to check for socklen_t ...
1953 * libsoup/soup-address.c: ... and remove it from here ...
1955 * libsoup/soup-dns.c: ... and here.
1957 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
1959 * libsoup/soup-soap-message.c (soup_soap_message_persist):
1960 (soup_soap_message_parse_response): print out request/response's
1961 contents, if in debug mode.
1963 2003-12-07 JP Rosevear <jpr@ximian.com>
1965 * configure.in: Bump version
1967 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
1969 * libsoup/soup-soap-response.[ch]
1970 (soup_soap_parameter_get_first_child,
1971 soup_soap_parameter_get_first_child_by_name,
1972 soup_soap_parameter_get_next_child,
1973 soup_soap_parameter_get_next_child_by_name): new functions to
1974 manage SoupSoapParameter's children.
1975 (soup_soap_response_get_first_parameter): dont return a GList, but
1976 a SoupSoapParameter contained in the GList.
1978 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
1980 * libsoup/soup-soap-response.[ch]
1981 (soup_soap_parameter_get_string_value): new function.
1983 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
1985 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
1986 structure, to "hide" the usage of xmlNode's.
1987 (soup_soap_parameter_get_name): functions to manage SOAP
1988 response parameters.
1989 (soup_soap_response_get_first_parameter,
1990 soup_soap_response_get_first_parameter_by_name,
1991 soup_soap_response_get_next_parameter,
1992 soup_soap_response_get_next_parameter_by_name):
1993 new functions for an easy access to the response's parameters.
1994 (soup_soap_response_from_string): removed warnings.
1996 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
1998 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
2001 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
2003 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
2004 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
2006 (finalize): NULL out new private fields.
2007 (soup_soap_response_from_string): added validation code.
2009 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
2011 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
2014 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
2017 * libsoup/Makefile.am: added new files.
2019 2003-11-18 Rodney Dawes <dobey@ximian.com>
2021 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
2023 2003-11-18 Rodney Dawes <dobey@ximian.com>
2025 * acinclude.m4: Add GTK_DOC_CHECK
2027 2003-11-18 Dan Winship <danw@ximian.com>
2029 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
2030 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
2032 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
2034 * Makefile.am: updates for gtk-doc
2035 (SUBDIRS): add back "docs"
2037 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
2038 aren't around any more
2040 * docs/reference/*: set up gtk-doc
2042 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
2043 "libsoup". Remove unused defines.
2045 * libsoup/soup-connection.c: Fix doc comments
2046 * libsoup/soup-message.c: Likewise
2047 * libsoup/soup-misc.c: Likewise
2048 * libsoup/soup-socket.c: Likewise
2049 * libsoup/soup-uri.c: Likewise
2051 * libsoup/soup-address.h: Fixes to please gtk-doc
2052 * libsoup/soup-connection.h: Likewise
2053 * libsoup/soup-message.h: Likewise
2054 * libsoup/soup-message-private.h: Likewise
2055 * libsoup/soup-misc.h: Likewise
2056 * libsoup/soup-server-auth.h: Likewise
2057 * libsoup/soup-socket.h: Likewise
2058 * libsoup/soup-status.h: Likewise
2060 2003-11-18 Dan Winship <danw@ximian.com>
2062 * configure.in: Fix up the SSL checks some. Remove some useless
2065 * libsoup/soup-misc.h: declare soup_ssl_supported.
2067 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
2069 * libsoup/soup-nossl.c: Not an SSL implementation, built if
2070 HAVE_SSL is not defined.
2072 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
2074 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
2076 (listen_watch): Deal with soup_socket_start_ssl failing.
2078 * libsoup/soup-connection.c (tunnel_connect_finished,
2079 socket_connect_result, soup_connection_connect_sync): Deal with
2080 the soup_socket_start_ssl failing.
2082 * libsoup/soup-server.c (soup_server_new): Deal with
2083 soup_ssl_get_server_credentials failing
2085 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
2087 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
2088 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
2089 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
2090 soup_soap_message_end_header,
2091 soup_soap_message_start_header_element,
2092 soup_soap_message_end_header_element, soup_soap_message_write_int,
2093 soup_soap_message_write_double, soup_soap_message_write_base64,
2094 soup_soap_message_write_time, soup_soap_message_write_string,
2095 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
2096 soup_soap_message_set_null, soup_soap_message_add_attribute,
2097 soup_soap_message_add_namespace,
2098 soup_soap_message_set_default_namespace,
2099 soup_soap_message_get_namespace_prefix,
2100 soup_soap_message_set_encoding_style, soup_soap_message_reset,
2101 soup_soap_message_persist): new functions from old SoupSerializer.
2103 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
2105 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
2106 soup_soap_message_new_from_uri): added a bunch of initialization
2108 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
2109 soup_soap_message_end_envelope, soup_soap_message_start_body,
2110 soup_soap_message_end_body, soup_soap_message_start_element,
2111 soup_soap_message_end_element):
2114 * configure.in: depend on libxml-2.0 for the SOAP code.
2116 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
2118 2003-11-17 Joe Shaw <joe@ximian.com>
2120 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
2123 * acinclude.m4: Include the gpg-error macros.
2125 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
2127 * libsoup/soup-soap-message.[ch]: new class to make it easier to
2128 build SOAP messages.
2130 * libsoup/Makefile.am: added new files.
2132 * configure.in: increased version number.
2134 2003-10-24 Joe Shaw <joe@ximian.com>
2136 * libsoup/soup-address.c (update_address_from_entry): Call
2137 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
2138 one in addr->priv->lookup. Fixes a crash on synchronous DNS
2141 * libsoup/soup-server.c (soup_server_new): We need to ref the
2142 address we're binding to, because soup_socket_get_local_address()
2145 2003-10-23 Dan Winship <danw@ximian.com>
2147 * libsoup/soup-socket.c (init): Initialize flags to default
2150 2003-09-23 Dan Winship <danw@ximian.com>
2152 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
2153 note whether or not the CA file has been loaded.
2154 (SoupGNUTLSChannel): add a "hostname" field.
2155 (verify_certificate): Remove the comment about not being able to
2156 verify the hostname because of soup problems. Now it's because of
2157 GNUTLS problems instead.
2158 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
2159 and takes a hostname and a creds argument now.
2160 (soup_ssl_get_client_credentials,
2161 soup_ssl_get_server_credentials): Return client/server credentials
2163 (soup_ssl_free_client_credentials,
2164 soup_ssl_free_server_credentials): and free them.
2166 * libsoup/soup-session.c (class_init, set_property, get_property):
2167 add ssl_ca_file property
2168 (get_host_for_message): when returning an SSL host for the first
2169 time, create a client credentials structure for the session.
2170 (run_queue): Pass the ssl creds to the new connection. Also fix an
2171 unrelated bug that caused infinite loops on "bad hostname".
2173 * libsoup/soup-server.c: Use GObject properties, including
2174 ssl_cert_file and ssl_key_file properties.
2175 (soup_server_new): Remove "protocol" argument; if the cert file
2176 and key file properties were set, create a server credential
2177 structure from them and pass that to soup_socket_server_new.
2179 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
2180 dest_uri to origin_uri to match RFC 2616 terminology. Add an
2182 (class_init, set_property, get_property): add SSL_CREDS property
2183 (soup_connection_connect_async, soup_connection_connect_sync):
2184 Pass ssl_creds to soup_socket_client_new calls.
2186 * libsoup/soup-socket.c: Use GObject properties, including an
2188 (soup_socket_set_flags): Gone (replaced with boolean properties)
2189 (soup_socket_new): Make this take a list of properties
2190 (listen_watch): copy ssl creds from listener to new socket
2191 (soup_socket_start_ssl): Pass remote hostname and socket creds
2192 structure to soup_ssl_wrap_iochannel.
2193 (soup_socket_client_new_async, soup_socket_client_new_sync,
2194 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
2197 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
2198 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
2199 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
2202 * tests/get.c: add a "-c CAfile" argument, for loading a CA
2203 certificate file to validate https connections against
2205 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
2206 arguments for loading an SSL server certificate. Only start an SSL
2207 server if those arguments were used.
2209 * tests/test-cert.pem:
2210 * tests/test-key.pem: SSL certificate for testing simple-httpd
2212 * tests/revserver.c: Update for API changes
2213 * tests/simple-proxy.c: Likewise
2215 2003-09-22 Dan Winship <danw@ximian.com>
2217 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
2220 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
2221 (soup_set_security_policy, soup_get_security_policy): Remove,
2222 since the GNUTLS backend doesn't actually implement it.
2223 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
2225 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
2228 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
2231 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
2232 soup_ssl_get_server_iochannel into a single function that takes a
2235 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
2236 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
2237 (soup_gnutls_set_security_policy): Gone
2239 * libsoup/soup-gnutls.h
2240 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
2243 * libsoup/soup-socket.c: Move soup_sockaddr_max
2244 #define here from soup-private.h
2245 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
2248 * libsoup/soup-private.h: Gone
2250 * libsoup/soup-address.c: Fix #includes for soup-private.h and
2252 * libsoup/soup-auth-digest.c: Likewise
2253 * libsoup/soup-auth.c: Likewise
2254 * libsoup/soup-connection-ntlm.c: Likewise
2255 * libsoup/soup-connection.c: Likewise
2256 * libsoup/soup-dns.c: Likewise
2257 * libsoup/soup-gnutls.c: Likewise
2258 * libsoup/soup-headers.c: Likewise
2259 * libsoup/soup-message-client-io.c: Likewise
2260 * libsoup/soup-message-handlers.c: Likewise
2261 * libsoup/soup-message-io.c: Likewise
2262 * libsoup/soup-message-server-io.c: Likewise
2263 * libsoup/soup-message.c: Likewise
2264 * libsoup/soup-server-message.c: Likewise
2265 * libsoup/soup-server.c: Likewise
2266 * libsoup/soup-session.c: Likewise
2267 * libsoup/soup-socket.c: Likewise
2268 * tests/auth-test.c: Likewise
2270 2003-09-19 Dan Winship <danw@ximian.com>
2272 * libsoup/soup-address.c (update_address_from_entry): free the
2275 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
2278 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
2279 iochannel initialization. Not sure how this worked before...
2281 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
2282 from soup_message_prepare (and a few things removed).
2284 * libsoup/soup-message-client-io.c (soup_message_send_request):
2285 s/soup_message_prepare/soup_message_cleanup_response/
2287 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
2288 with "\0" on the headers before passing them to the parse
2290 (io_read): Call soup_message_cleanup_response after returning an
2291 informational response so the data doesn't leak.
2293 * libsoup/soup-headers.c (soup_headers_parse): Update for
2294 soup-message-io.c:io_read change
2296 * libsoup/soup-server.c (soup_server_new,
2297 soup_server_new_with_host): Don't leak the SoupAddress.
2299 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
2301 (set_property): If the proxy uri changes, call
2302 soup_session_abort() and cleanup_hosts().
2303 (request_finished, final_finished): Fix a bug when requeuing
2306 * tests/libsoup.supp: valgrind suppression file for soup tests
2308 * tests/Makefile.am (EXTRA_DIST): dist it.
2309 (noinst_PROGRAMS): move the former check_PROGRAMS to
2310 noinst_PROGRAMS instead.
2312 2003-09-18 Dan Winship <danw@ximian.com>
2314 * libsoup/soup-message.c: Add wrote_informational and
2315 got_informational signals.
2317 * libsoup/soup-message-client-io.c (get_request_headers): Set the
2318 EXPECT_CONTINUE flag on the message if that header is set.
2320 * libsoup/soup-message-server-io.c (parse_request_headers):
2323 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
2324 when blocking on an expect-continue. Emit wrote_informational
2325 instead of wrote_headers in the 1xx case.
2326 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
2327 reading a 100 Continue response. Emit got_informational instead of
2328 got_headers in the 1xx case.
2330 * libsoup/soup-session.c (soup_session_send_message): Reorder
2331 things to deal with the fact that the message could finish right
2332 away if there is a connection available and the server is very
2335 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
2336 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
2338 2003-09-17 Dan Winship <danw@ximian.com>
2340 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
2341 (one that pruned too little, one that pruned too much).
2342 (queue_message): When requeuing, don't run the queue;
2343 final_finished will take care of that later.
2344 (soup_session_abort): New, to cancel all pending requests.
2346 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
2347 the socket while waiting for the address to resolve
2349 2003-09-17 Dan Winship <danw@ximian.com>
2351 * libsoup/soup-connection.c (soup_connection_new): Replaces the
2352 three previous soup_connection_new* functions and uses gobject
2353 properties to set the destination and proxy uris.
2354 (class_init): set up two more signals, authenticate and
2356 (soup_connection_send_request): virtualize
2357 (send_request): Default implementation
2359 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
2360 also handles NTLM authentication. Includes all of the NTLM code
2361 formerly in soup-auth-ntlm.c.
2363 * libsoup/soup-auth-ntlm.[ch]: Gone.
2365 * libsoup/soup-auth.c: Remove NTLM refs
2367 * libsoup/soup-session.c (class_init): Add gobject properties for
2368 proxy, max_conns, use_ntlm. Change the "authenticate" and
2369 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
2370 can be used for authenticating SoupConnectionNTLM as well, which
2371 doesn't use a SoupAuth).
2372 (soup_session_new): Renamed from soup_session_new_default.
2373 (soup_session_new_with_options): Replaces
2374 soup_session_new_with_proxy and soup_session_new_full. Takes
2376 (run_queue): Create a new connection of type SoupConnection or
2377 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
2378 to its authenticate and reauthenticate signals.
2379 (connection_authenticate, connection_reauthenticate): proxy these
2382 * libsoup/soup-address.c (update_address_from_entry): Fix a
2383 crasher when failing to resolve the address.
2385 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
2386 working before" bugs.
2388 * libsoup/soup-message-client-io.c (soup_message_send_request):
2389 call soup_message_prepare() to clean up the existing response
2392 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
2393 when processing an OK EOF.
2395 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
2396 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
2398 * tests/auth-test.c (authenticate, reauthenticate): Update for new
2400 (main): Use soup_session_new.
2401 * tests/get.c (main): Likewise.
2402 * tests/simple-proxy.c (main): Likewise.
2404 2003-09-10 Dan Winship <danw@ximian.com>
2406 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
2408 (invalidate_auth): Remove the call to soup_auth_invalidate.
2409 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
2410 contain authentication, then emit "authenticate" or
2411 "reauthenticate" (depending on whether or not this is the first
2412 time we've asked for a password for this auth).
2413 (update_auth_internal): If the server rejects our
2414 username/password, don't bail out immediately. Try doing a
2415 "reauthenticate" first.
2417 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
2419 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
2421 (soup_auth_invalidate): Remove this; it doesn't actually do
2422 anything useful for us.
2424 * libsoup/soup-auth-basic.c (invalidate): Remove
2425 * libsoup/soup-auth-digest.c: (invalidate): Remove
2426 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
2428 * libsoup/soup-uri.c: Remove all references to "authmech".
2429 (soup_uri_set_auth): Remove this too.
2431 * tests/auth-test.c: Update to use the "authenticate" and
2432 "reauthenticate" signals instead of encoding usernames and
2433 passwords in the URIs. Add a few more test cases.
2435 2003-09-10 Dan Winship <danw@ximian.com>
2437 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
2438 "status" field from here, since it's mostly used by SoupSession,
2439 which shouldn't need access to SoupMessagePrivate.
2441 * libsoup/soup-message.h (SoupMessage): Move it here.
2442 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
2443 (soup_message_set_uri): also moved from soup-message-private.h
2445 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
2447 * libsoup/soup-message-handlers.c:
2448 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
2450 * libsoup/soup-message-io.c (soup_message_io_client,
2451 soup_message_io_server, soup_message_io_unpause): Don't set up an
2452 idle handler, just jump right in to reading/writing; if this is a
2453 synchronous socket, then the caller wants to block, and if it's
2454 not, then we'll quickly get an EAGAIN anyway.
2456 * libsoup/soup-session.c: (queue_message): Likewise.
2457 (*) Update for SoupMessageStatus move and remove
2458 soup-message-private.h include.
2460 * libsoup/soup-server-message.c: Remove soup-message-private.h
2463 * libsoup/soup-server.c: Likewise.
2465 * libsoup/soup-connection.c (soup_connection_is_connected,
2466 soup_connection_is_new): Remove these, since they weren't being
2469 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
2470 avoid namespace pollution.
2472 * libsoup/soup-auth-digest.c: Update for that.
2473 * libsoup/soup-server-auth.c: Likewise
2475 * tests/auth-test.c: Remove soup-message-private.h include
2477 2003-09-09 Dan Winship <danw@ximian.com>
2479 Beginnings of improved synchronous API support
2481 * libsoup/soup-dns.c: Simplify this by making it not automatically
2482 return the result: force the caller to poll. (This isn't really a
2483 performance issue: the results should come back quickly anyway.)
2484 Also, make the cache thread-safe.
2485 (soup_dns_entry_from_name): Was soup_gethostbyname
2486 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
2487 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
2488 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
2489 blocks if it's not resolved yet).
2491 * libsoup/soup-address.c: Update for soup-dns changes.
2492 (soup_address_new): Don't automatically start resolving the
2493 hostname now, since we don't know if the caller is going to want
2494 it resolved synchronously or asynchronously.
2495 (soup_address_resolve_async): Renamed from soup_address_resolve.
2496 (soup_address_resolve_sync): New routine to do blocking
2499 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
2500 status value directly when connecting synchronously.
2501 (soup_socket_client_new_async, soup_socket_client_new_sync):
2502 Separate async/sync client socket functions.
2503 (soup_socket_get_iochannel): Made static since it was not used
2504 outside soup-socket.
2506 * libsoup/soup-connection.c (soup_connection_new,
2507 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
2508 up the data, don't actually start connecting.
2509 (soup_connection_connect_async, soup_connection_connect_sync): New
2510 async and sync SoupConnection connecting routines.
2511 (soup_connection_get_socket): Remove this since it wasn't being
2514 * libsoup/soup-session.c (final_finished): Run the queue since a
2515 connection is now freed up.
2516 (run_queue): Update for soup_connection_new* changes.
2518 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
2519 wasn't being used any more.
2521 * libsoup/soup-private.h: Remove some prototypes for functions
2522 that no longer exist.
2524 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
2525 (copies the protocol, host, and port of a SoupUri).
2527 * tests/auth-test.c:
2529 * tests/simple-proxy.c: belatedly update for soup-session change
2531 * tests/revserver.c: Handle each new connection in its own thread,
2532 using synchronous SoupSocket calls.
2534 2003-09-05 Dan Winship <danw@ximian.com>
2536 * libsoup/soup-session.c: Move a bunch of logic here from
2537 soup-context. Now the session keeps track of hosts (instead of
2538 having a global soup_hosts hash) and their connections.
2539 (soup_session_new_with_proxy, soup_session_new_full): New session
2540 constructors to specify a proxy or a proxy and connection limits
2541 (send_request): Add Authorization and Proxy-Authorization headers
2542 before sending off the request.
2543 (soup_session_queue_message, et al): Improve the way this works.
2544 There's no need to use timeouts to wait for connections to become
2545 free; we *know* when they become free.
2547 * libsoup/soup-private.h: Remove SoupHost and some other
2548 no-longer-used stuff.
2550 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
2551 soup_set_connection_limit, soup_set_connection_limit): Gone. These
2552 are all per-session now.
2554 * libsoup/soup-message.c: Remove all SoupContext references
2555 (mostly replaced with SoupUri references)
2556 (cleanup_message): priv->connect_tag and priv->connection are gone
2557 now, so this was just soup_message_io_cancel(). So remove
2558 cleanup_message and replace it with that everywhere.
2559 (soup_message_disconnect): Gone.
2560 (soup_message_set_uri): Replaces soup_message_set_context.
2561 (soup_message_set_connection, soup_message_get_connection): Gone
2563 * libsoup/soup-message-server-io.c (parse_request_headers):
2564 s/soup_message_set_context/soup_message_set_uri/
2566 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
2567 connect_tag, context, and connection.
2569 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
2571 * libsoup/soup-context.c: Gone
2573 * tests/auth-test.c (identify_auth): update for session/context
2576 2003-09-03 Dan Winship <danw@ximian.com>
2578 * libsoup/soup-status.h: Renamed from soup-error.h, with types
2579 and defines renamed accordingly.
2581 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
2582 status_code and errorphrase to reason_phrase. Remove errorclass.
2583 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
2584 as being either "errors" or "not errors", so its semantics are
2585 guaranteed to be wrong sometimes.
2587 * libsoup/soup-message.c (soup_message_set_status,
2588 soup_message_set_status_full): Renamed
2590 * libsoup/soup-message-handlers.c
2591 (soup_message_add_status_code_handler,
2592 soup_message_add_status_class_handler): Rename.
2594 * libsoup/soup-session.c (soup_session_send_message): Make this
2595 return a status code rather than a status class.
2597 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
2598 unrelated unused fields (retries, callback, user_data).
2602 2003-09-02 Dan Winship <danw@ximian.com>
2604 * libsoup/soup-session.c: First draft at the new object to
2605 maintain formerly-global state. (Not yet complete; still need to
2606 get rid of SoupContext).
2608 * libsoup/soup-message-queue.c: Data structure used by SoupSession
2610 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
2611 some bits went into soup-connection.
2613 * libsoup/soup-connection.c (soup_connection_send_request): New,
2614 to send a request on a connection. The connection updates its
2615 internal state and then hands off to soup_message_send_request.
2616 (request_done): Callback set up by soup_connection_send_request.
2617 Marks the connection as no-longer-in-use, and disconnects it if
2618 the message says to.
2619 (soup_connection_set_in_use, soup_connection_mark_old): No longer
2620 needed; the connection takes care of this itself now.
2621 (soup_connection_new_proxy): New, to create a new connection that
2622 is explicitly marked as being through an HTTP proxy.
2623 (soup_connection_new_tunnel): New, to create a new HTTPS
2624 connection through a proxy. (Includes the code to send the
2627 * libsoup/soup-context.c (try_existing_connections): Don't need to
2628 call soup_connection_set_in_use.
2629 (try_create_connection): Use soup_connection_new,
2630 soup_connection_new_proxy, or soup_connection_new_tunnel as
2633 * libsoup/soup-message.c (soup_message_prepare): Replaces
2635 (soup_message_queue, soup_message_requeue, soup_message_prepare):
2636 Gone. This must be done via a SoupSession now.
2637 (soup_message_set_connection): don't need to mark in_use/not
2638 in_use. Also, msg->priv->socket is gone now.
2639 (soup_message_get_socket): Gone.
2641 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
2642 Remove references to global handlers.
2643 (redirect_handler, authorize_handler): Moved to soup-session.c.
2645 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
2646 session to shut down now.
2648 * libsoup/soup.h: add soup-session.h
2650 * libsoup/Makefile.am: updates
2652 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
2655 2003-08-29 Dan Winship <danw@ximian.com>
2657 * libsoup/soup-message-io.c: Major rewrite. There is now only a
2658 single IO state object (instead of one for reading and one for
2659 writing), and the IO code handles switching back and forth between
2660 reading and writing as appropriate (including handling the extra
2661 switches needed for "Expect: 100-continue").
2662 (soup_message_io_client, soup_message_io_server): The new entry
2664 (soup_message_io_cancel): If the caller cancels the IO when we
2665 were expecting to read more data, disconnect the socket.
2667 * libsoup/soup-message.h (SoupMessageFlags): add
2668 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
2669 do the special expect-continue handling.
2671 * libsoup/soup-message.c: Move all the signal stuff here. Remove
2672 the "done_reading" and "done_writing" signals and replace them
2673 with a single "finished" signal. (A single signal. Say that 10
2675 (soup_message_got_headers, etc): Functions to emit signals.
2676 (got_headers, got_chunk, got_body): Default signal methods that
2677 call soup_message_run_handlers.
2678 (finished): Default signal method that replaces
2679 soup_message_issue_callback.
2680 ([various]): s/soup_message_issue_callback/soup_message_finished/
2681 (soup_message_requeue): There's no soup_message_set_read_callbacks
2682 any more, so if the caller requeues while it's still reading, just
2684 (soup_message_add_chunk, soup_message_add_final_chunk,
2685 soup_message_pop_chunk): Moved here from soup-server-message,
2686 although we don't actually quite support using chunked encoding
2689 * libsoup/soup-server-message.c (soup_server_message_new): No
2690 longer takes a socket argument.
2691 (soup_server_message_add_chunk, soup_server_message_get_chunk):
2692 Moved into SoupMessage.
2694 * libsoup/soup-message-handlers.c (global_handlers): Make these
2695 POST_BODY rather than PRE_BODY, so they won't mess up the IO
2696 channel when the requeue the message.
2697 (soup_message_run_handlers): Don't need to issue the message
2698 callback from here any more.
2699 (authorize_handler): Just leave the error as 401 or 407 (see
2700 soup-error.h change)
2702 * libsoup/soup-message-client-io.c (soup_message_send_request):
2703 Replaces soup_message_write_request and
2704 soup_message_read_response.
2706 * libsoup/soup-message-server-io.c: Parallel to
2707 soup-message-client-io.c, this defines the server-side header
2709 (soup_message_read_request): Its entry point.
2711 * libsoup/soup-server.c: Lots of code moved into
2712 soup-message-server-io.c. Update for other changes.
2714 * libsoup/soup-queue.c: Update for changes
2716 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
2717 Don't call soup_socket_disconnect() on an error, just return
2718 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
2719 signals that will mess up the caller of the read/write function.
2721 * libsoup/soup-connection.c (soup_connection_disconnect): When
2722 disconnecting the socket, disconnect from its signals first to
2723 prevent bad reentrancy.
2725 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
2726 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
2727 anything that SOUP_ERROR_UNATHORIZED and
2728 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
2729 "transport" errors actually are transport-related.)
2731 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
2733 * tests/simple-proxy.c: Complicate this a bunch. In particular,
2734 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
2735 pass the data back to the client in chunked format.
2737 2003-08-27 Dan Winship <danw@ximian.com>
2739 * libsoup/soup-types.h: New header with typedefs, to avoid
2740 #include loops among other headers.
2742 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
2744 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
2746 2003-08-26 Dan Winship <danw@ximian.com>
2748 * libsoup/soup-message-client-io.c (soup_message_write_request,
2749 soup_message_read_response): Higher-than-soup-message-io-level
2750 functions to do client-side IO. (Code that used to be in
2752 (get_request_header_cb): Fix a bug in the generation of the Host:
2753 header; need to include the port number if it's not the default.
2755 * libsoup/soup-message-io.c (soup_message_write,
2756 soup_message_write_simple): Take separate user_datas for the get_*
2757 callbacks and the done callbacks.
2759 * libsoup/soup-queue.c: Update to use soup_message_write_request
2760 and soup_message_read_response.
2762 * libsoup/soup-connection.c (soup_connection_new): Change the
2763 prototype to take a SoupUri and a callback.
2765 * libsoup/soup-context.c (try_create_connection,
2766 soup_context_connect_cb): Update for soup_connection_new change.
2768 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
2769 for soup_message_write changes
2771 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
2774 2003-08-26 Dan Winship <danw@ximian.com>
2776 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
2777 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
2778 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
2780 * libsoup/soup-message.c (class_init): set up signals
2781 (requeue_read_finished): Update for changes.
2783 * libsoup/soup-message-io.c (soup_message_read): Split out
2784 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
2785 arg to say where to store the message body. Set up
2786 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
2788 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
2789 (read_body_chunk): emit READ_CHUNK.
2790 (issue_final_callback): Set r->body. emit READ_BODY.
2791 (failed_read): emit READ_ERROR.
2792 (soup_message_read_set_callbacks): Disconnect old signal handlers,
2794 (soup_message_read_cancel): Disconnect signal handlers.
2795 (soup_message_write, soup_message_write_simple): Set up
2796 wrote_body_cb and error_cb as signal handlers.
2797 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
2798 nothing currently ever listens for them. emit WROTE_BODY when
2800 (failed_write): emit WRITE_ERROR
2802 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
2803 soup_queue_read_headers_cb): Split this into two unequal chunks.
2804 (read_header_cb only runs the pre-body handlers).
2805 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
2807 (soup_queue_write_done_cb): Update call to soup_message_read
2809 * libsoup/soup-server.c (parse_headers_cb): Renamed from
2811 (read_done_cb): Update prototype
2812 (start_request): Update soup_message_read call.
2814 2003-08-25 Dan Winship <danw@ximian.com>
2816 * libsoup/soup-message-io.c (soup_message_read,
2817 soup_message_write, soup_message_write_simple): Add a "user_data"
2818 arg, pass it to the callbacks.
2820 * libsoup/soup-message.c (soup_message_requeue,
2821 requeue_read_finished, requeue_read_error): Update for that
2823 * libsoup/soup-queue.c: Likewise
2825 * libsoup/soup-server.c: Likewise
2827 2003-08-25 Dan Winship <danw@ximian.com>
2829 * libsoup/soup-message.c (soup_message_new): Take a uri string
2830 instead of a context. Also, swap the args (so the method comes
2831 before the URI, just like in the protocol).
2832 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
2833 SoupUri instead of a string
2834 (soup_message_set_request, soup_message_set_response): Replace
2835 soup_message_new_full.
2836 (cleanup_message): Was soup_message_cleanup, but is static now.
2837 (queue_message): Do the pre-queuing message cleanup here instead
2838 of in soup_queue_message.
2839 (soup_message_queue): Set the callback and user_data, then call
2841 (requeue_read_error, requeue_read_finished, soup_message_requeue):
2843 (soup_message_get_uri): Replaces soup_message_get_context.
2845 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
2846 part of SoupMessagePrivate now)
2848 * libsoup/soup-context.c: #include soup-message-private
2849 (soup_context_from_uri): constify the uri arg.
2851 * libsoup/soup-queue.c: Various context/uri fixes
2852 (proxy_https_connect): Use soup_message_new_from_uri.
2853 (soup_queue_message): Drastically simplified since most of the
2854 work is in soup-messsage.c:queue_message() now
2856 * libsoup/soup-auth-digest.c (compute_response,
2857 get_authorization): Use soup_message_get_uri.
2859 * libsoup/soup-server-auth.c (parse_digest): Likewise
2861 * libsoup/soup-server.c (call_handler): Likewise
2863 * tests/simple-httpd.c (server_callback): Likewise.
2865 * tests/simple-proxy.c (server_callback): Likewise
2867 * tests/get.c (got_url): Likewise.
2868 (get_url): Update soup_message_new usage.
2870 * tests/auth-test.c: #include soup-message-private. Update for
2871 context changes and soup_message_new change.
2873 2003-08-22 Dan Winship <danw@ximian.com>
2875 * libsoup/soup-message-private.h: New file containing
2876 SoupMessagePrivate and some other soup-message-internal
2877 types/functions. Also includes the new, expanded SoupMessageStatus
2880 * libsoup/soup-message-io.c: Replaces what used to be in
2881 soup-transfer, but now all the interfaces take SoupMessages
2882 instead of SoupReader/SoupWriter and deal with maintaining
2883 msg->priv->{read,write}_state themselves. Fixes up all the
2884 refcounting madness.
2886 * libsoup/soup-message-handlers.c: Move the handler code here,
2887 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
2888 to make the distinction from SoupHandlerKind clearer.)
2890 * libsoup/soup-message.c: Update for soup-message-io and new
2891 SoupMessageStatus values. Remove handler code.
2892 (soup_message_cleanup): Remove the hack to try to preserve the
2893 connection if the message gets cleaned up before it finishes
2894 reading. soup_message_requeue handles this in the requeuing case,
2895 and there's no especially compelling reason to bother doing it in
2896 any other case. (And the soup-message-io api doesn't support
2897 having a read operation that's not connected to any message.)
2899 * libsoup/soup-private.h: remove SoupMessagePrivate
2901 * libsoup/soup-queue.c: Update for soup-message-io and new
2902 SoupMessageStatus values.
2904 * libsoup/soup-server-message.c: Likewise
2906 * libsoup/soup-server.c: Likewise
2908 * libsoup/soup-transfer.c: Gone (yay)
2910 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
2912 2003-08-20 Dan Winship <danw@ximian.com>
2914 * libsoup/soup-message.c: Make this a GObject. (Note that since
2915 SoupMessage was not refcounted before, it's not really refcounted
2917 (soup_message_free): Gone, replaced by g_object_unref
2918 (soup_message_copy, soup_message_foreach_remove_header): Remove
2919 these, since neither was currently functional.
2920 (soup_message_is_keepalive): New utility function to look at
2921 HTTP version and request/response headers to decide if a message
2922 indicates the connection should be kept alive.
2923 (soup_message_set_connection, soup_message_get_connection): New
2924 (soup_message_get_socket): New
2926 * libsoup/soup-server-message.c: Make this a subclass of
2928 (soup_server_message_new): Now takes a SoupServer and SoupSocket
2929 (soup_server_message_get_server): New
2930 (soup_server_message_set_encoding,
2931 soup_server_message_get_encoding): Get/set whether the message
2932 should be sent with content-length or chunked encoding
2933 (soup_server_message_is_started, soup_server_message_is_finished):
2934 Private member accessors.
2935 (soup_server_message_add_chunk): Renamed from add_data
2936 (soup_server_message_get_chunk): Pops a chunk from the list.
2937 (soup_server_message_get_source): Gone
2939 * libsoup/soup-server.c: Update for SoupServerMessage changes.
2940 (error_cb, write_done_cb): All the cleanup stuff that used to be
2941 here happens automatically by unreffing the message now.
2942 (get_response_header): Remove some erroneous leftover CGI stuff
2943 (issue_bad_request): add "Connection: close" to the response.
2944 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
2945 with no Host header as per RFC 2616.
2947 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
2948 (soup_connection_set_in_use): Let the caller set the connection to
2949 "not in use" even after the socket has been disconnected.
2951 * libsoup/soup-context.c: Use soup_message_get_connection
2953 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
2954 check on request length, since it was rejecting
2955 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
2957 * libsoup/soup-queue.c: Use soup_message_get_connection and
2958 soup_message_get_socket.
2959 (soup_queue_read_done_cb): Use soup_message_is_keepalive
2960 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
2961 soup_connection_start_ssl
2963 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
2964 handlers if the socket hasn't been disconnected yet.
2966 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
2967 reader_read): Fix these so that reader_read will exit properly if
2968 the read is cancelled.
2970 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
2972 * tests/simple-httpd.c (server_callback): set the message to
2973 content-length encoding.
2974 * tests/simple-proxy.c (server_callback): Likewise
2976 2003-08-19 Dan Winship <danw@ximian.com>
2978 * libsoup/soup-socket.c (soup_socket_read,
2979 soup_socket_read_until, soup_socket_write): New API for doing
2980 socket IO. Works both synchronously and asynchronously, and
2981 buffers data to prevent the "100 Continue" problem.
2982 (soup_socket_set_flag): Replaces formerly-private
2983 soup_set_sockopts. (primarily to let the caller turn off
2984 SOUP_SOCKET_FLAG_NONBLOCKING).
2986 * libsoup/soup-transfer.c (soup_transfer_read,
2987 soup_transfer_write, soup_transfer_write_simple): Take a
2988 SoupSocket instead of a GIOChannel. Use the new socket IO api.
2989 Changed the prototypes of some of the callbacks to be less
2992 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
2993 soup_connection_get_iochannel.
2995 * libsoup/soup-message.c: Fix up for soup-transfer changes
2997 * libsoup/soup-queue.c: Likewise
2999 * libsoup/soup-server.c: Likewise
3001 * tests/revserver.c: A slightly more complicated replacement for
3002 timeserver. (Does both reads and writes)
3004 2003-08-19 Dan Winship <danw@ximian.com>
3006 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
3007 configure it, and no one has complained, and it looks like the
3008 SOCKS5 auth code doesn't actually work anyway...
3010 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
3012 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
3013 SOUP_PROTOCOL_SOCKS5
3015 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
3017 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
3020 2003-08-19 Dan Winship <danw@ximian.com>
3022 * libsoup/soup-server.c: Make this a GObject. Remove
3023 SoupServerMessage code (to soup-server-message.c). Remove CGI
3024 server code (for now?)
3025 (soup_server_add_handler, soup_server_remove_handler): Rename
3026 (from register/unregister) to make it clearer what they do.
3028 * libsoup/soup-server-message.c: Moved out of soup-server.c
3030 * libsoup/soup-private.h: Remove SoupServer def
3032 * libsoup/Makefile.am (libsoupinclude_HEADERS,
3033 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
3035 * tests/simple-httpd.c:
3036 * tests/simple-proxy.c: Update for SoupServer changes
3038 2003-08-18 Dan Winship <danw@ximian.com>
3040 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
3041 a struct sockaddr again (like it used to be). In particular, add
3042 back the "port" field. Add a bunch of macros to try (and fail) to
3043 simplify some of the code.
3044 (soup_address_new): Now returns a SoupAddress directly rather than
3045 a random handle, and the caller can just use g_object_unref to
3046 cancel the lookup. Also, the callback now uses a
3047 SoupKnownErrorCode rather than a special-purpose address-lookup
3049 (soup_address_new_cancel): No longer needed.
3050 (soup_address_new_sync): Removed
3051 (soup_address_new_any): Replaces soup_address_ipv4_any and
3052 soup_address_ipv6_any.
3053 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
3055 (soup_address_get_physical): Renamed from
3056 soup_address_get_canonical_name.
3057 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
3059 * libsoup/soup-socket.c: Update for SoupAddress changes and make
3060 similar changes here.
3061 (soup_socket_new): Just creates a generic SoupSocket now.
3062 (soup_socket_connect): Client setup
3063 (soup_socket_listen): Server setup. Now also sets up an iochannel
3064 listening for connects and emits a "new_connection" signal as they
3066 (soup_socket_start_ssl): Turns on SSL.
3067 (soup_socket_client_new, soup_socket_server_new): Utility
3068 functions that wrap the above.
3069 (soup_socket_new_cancel, soup_socket_new_sync): Gone
3070 (soup_socket_server_accept, soup_socket_server_try_accept): No
3072 (soup_socket_get_iochannel): No longer adds a ref when returning
3073 the iochannel. Also, we set it to "close_on_unref" so that if a
3074 caller adds a ref to it, the connection will actually remain open
3075 even after the SoupSocket is destroyed.
3076 (soup_socket_get_local_address, soup_socket_get_remote_address):
3077 Let the caller get both of these.
3079 * libsoup/soup-connection.c: Don't keep a private copy of the
3081 (soup_connection_new): Don't need to set socket options here.
3083 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
3084 (soup_connection_get_iochannel): Just return the socket's
3085 iochannel (and don't ref it)
3087 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
3088 SOUP_ERROR_CANT_RESOLVE_PROXY
3090 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
3091 Remove the "FIXME add a CANT_RESOLVE error" and return
3092 SOUP_ERROR_CANT_RESOLVE instead.
3094 * libsoup/soup-server.c: Update for socket/address changes. Don't
3095 poke into SoupSocket's private fields.
3096 (soup_server_run_async): Just connect to the socket's
3097 "new_connection" signal.
3099 * libsoup/soup-context.c (try_create_connection,
3100 soup_context_connect_cb): Update for socket changes. Replace
3101 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
3103 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
3104 to connect to a signal handler and connect another function to
3105 clean up the first signal handler after its first invocation.
3106 (Lets us use signals to replace one-off callbacks.)
3108 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
3109 actually private now.
3110 (struct _SoupServer): Remove accept_tag.
3112 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
3113 Don't unref the iochannel.
3114 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
3116 * libsoup/soup-socks.c: Update for socket/address changes
3118 * tests/simple-httpd.c (main):
3119 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
3120 * tests/simple-proxy.c (main): Likewise
3122 * tests/timeserver.c: Update for SoupSocket's "new_connection"
3123 signal, and for SoupAddress changes.
3125 2003-08-14 Dan Winship <danw@ximian.com>
3127 * libsoup/soup-connection.c: New, split out from soup-context and
3128 made into a GObject.
3129 (soup_connection_disconnect): Disconnects the connection and emits
3130 a signal. (Replaces the old "keep_alive" flag.)
3131 (soup_connection_is_connected): Checks if the connection is still
3133 (connection_died): Just disconnect, rather than freeing the
3134 connection. This way if anyone else is still referencing it they
3135 won't end up with an invalid pointer.
3137 * libsoup/soup-context.c: Make this a GObject, remove all the
3138 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
3139 SoupContext can keep track of connection auth stuff there without
3140 SoupConnection needing to care. Various other updates.
3142 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
3145 * libsoup/*.c, tests/get.c: Update for context/connection changes
3147 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
3148 definition to deal with the fact that there's no
3149 soup_connection_get_context any more.
3151 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
3152 with connection persistence here.
3153 (soup_queue_read_done_cb): Do it here instead. Disconnect the
3154 connection when appropriate.
3155 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
3156 Reference-count the connection properly. (I think.)
3158 * libsoup/soup-marshal.list: New, for SoupConnection's
3159 "disconnected" signal.
3161 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
3163 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
3164 GLIB_GENMARSHAL gets set too.
3166 2003-08-14 Dan Winship <danw@ximian.com>
3168 * libsoup/soup-error.c: Fix a spelling mistake.
3170 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
3172 2003-08-12 Dan Winship <danw@ximian.com>
3174 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
3175 of the interfaces around a little bit.
3177 * libsoup/soup-auth-basic.c: subclass for Basic auth
3179 * libsoup/soup-auth-digest.c: subclass for Digest auth
3181 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
3182 the code from soup-ntlm.c here, and make it private.
3184 * libsoup/soup-ntlm.c: gone
3186 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
3187 here, and change the signature of SoupAuthorizeFn.
3189 * libsoup/soup-context.c: Use g_object_unref to free auths, use
3190 methods instead of directly access private fields.
3192 * libsoup/soup-queue.c: Likewise
3194 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
3195 NTLM references. We have no plans to implement server-side NTLM
3198 * tests/auth-test.c (identify_auth): Update for auth api changes
3200 2003-08-12 Dan Winship <danw@ximian.com>
3202 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
3205 * libsoup/soup-address.c: Make this a GObject.
3206 (soup_address_ref, soup_address_unref): Gone.
3207 (soup_address_copy): Gone. Wasn't being used anyway.
3209 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
3210 here from soup-address.c, so that soup-address doesn't need to
3211 worry about trying to cache zero-ref addresses.
3213 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
3214 consistently for port numbers.
3215 (soup_socket_ref, soup_socket_unref): Gone.
3217 * libsoup/soup-private.h: Change the SoupSocket definition to be
3218 SoupSocketPrivate. (Still need to keep this here since soup-server
3219 pokes around in its internals.)
3220 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
3222 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
3223 reader/writer rather than leaking them.
3225 * libsoup/*: Use GObject methods for socket/address refcounting
3227 * tests/auth-test.c (main)
3228 * tests/timeserver.c (main): Call g_type_init.
3230 * tests/get.c (main): Call g_type_init.
3231 (get_url, got_url): Fix some bugs that could make -r mode get into
3232 infinite loops downloading the same files over and over. Plug some
3233 memory leaks to make this more useful for valgrinding libsoup.
3235 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
3236 handler for SIGINT so we can exit cleanly, since valgrind won't
3237 give a leak report if you don't. Plug a few memory leaks.
3239 * tests/simple-proxy.c (main): Likewise
3241 2003-08-12 Dan Winship <danw@ximian.com>
3243 Pull over some new test programs from the soup-refactoring branch,
3244 along with the SoupUri changes they depend on.
3246 * tests/simple-httpd.c: A really simple HTTP server, to test the
3249 * tests/simple-proxy.c: An even simpler HTTP proxy
3251 * tests/get.c: Add "-r" flag to recursively get files (thereby
3252 testing multiple-connections-at-once code). Also good for setting
3253 up a tree to use with simple-httpd.
3255 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
3258 * tests/uri-parsing.c: Regression test for the new soup-uri.c
3260 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
3261 pull in some optimizations from camel-url. Also, make SoupProtocol
3262 a GQuark so we can still compare them with ==, but we can also
3263 recognize any protocol.
3264 (soup_uri_new_with_base): New, to merge base and relative URIs
3265 (soup_uri_to_string): Update this. Change the "show_password" flag
3266 (which we always passed FALSE for) to "just_path", for places that
3267 want the path+query without the protocol, host, etc.
3269 * libsoup/soup-queue.c (soup_get_request_header): Just use
3270 soup_uri_to_string to generate the request URI.
3272 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
3273 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
3274 the URI by hand badly.
3275 * libsoup/soup-server-auth.c (parse_digest): Likewise
3277 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
3278 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
3281 * libsoup/soup-context.c (soup_context_uri_hash,
3282 soup_context_uri_equal): s/querystring/query/
3284 2003-08-12 Dan Winship <danw@ximian.com>
3286 * configure.in: Bump API version to 2.2 and package version to
3287 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
3288 libgnutls-config to find GNUTLS.
3290 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
3292 * Makefile.am: Update for pc file rename
3294 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
3295 and libsoup-ssl-proxy stuff.
3297 * libsoup/soup-ssl-proxy.c
3298 * libsoup/soup-nss.[ch]
3299 * libsoup/soup-openssl.[ch]: gone
3301 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
3303 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
3304 auth_test_LDADD): Update libsoup version
3306 2003-08-07 Dan Winship <danw@ximian.com>
3308 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
3309 soup_auth_invalidate): These are all really SoupContext functions,
3310 so move them to soup-context.c (and rename them appropriately).
3311 (soup_auth_get_protection_space): New method to get the
3312 "protection space" of an auth (paths where it is valid).
3313 (soup_auth_invalidate): New method to try to un-authenticate an
3314 auth (so we can keep the domain info cached even if the auth info
3316 (basic_pspace_func): Basic protection space is all directories
3317 below the current one.
3318 (basic_invalidate_func): Clear the encoded username/password
3319 (digest_pspace_func): Digest protection space is either the whole
3320 server, or "what the domain parameter says" (though we don't deal
3321 with cross-host domains).
3322 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
3324 (digest_parse_func, digest_free): Set/free domain parameter
3325 (ntlm_pspace): NTLM protection space is always the whole server.
3326 (ntlm_invalidate): Clear the auth state.
3327 (soup_auth_new_ntlm): Make this non-static
3328 (SoupAuth): Replace the quad-state "status" field with an
3329 "authenticated" boolean.
3331 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
3332 hash with separate "auth_realms" (path->realm) and "auths"
3333 (realm->auth) hashes. Also add a "use_ntlm" flag.
3335 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
3337 (connection_free): Don't the connection's auth, just free it.
3338 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
3339 does two-stage lookup (path->realm then realm->auth) and also
3340 deals with NTLM hacks.
3341 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
3342 but also large parts of authorize_handler. Updates the auth hashes
3343 based on information from a 401 or 407 response. Does a better job
3344 than authorize_handler did of not throwing away good information.
3345 (soup_context_preauthenticate): New; fakes up auth info so that
3346 requests will end up using authentication without the server
3347 needing to return an error first.
3348 (soup_context_authenticate_auth): Moved out of authorize_handler
3349 so it can be used at request-sending time too, if we know that we
3350 need it. (That way we can avoid requeuing the request if it isn't
3351 going to be able to be authenticated.)
3352 (soup_context_invalidate_auth): Sort of like the old
3353 soup_auth_invalidate, but only destroys the auth data, while still
3354 remembering the path->realm mapping.
3356 * libsoup/soup-message.c (authorize_handler): Mostly moved into
3357 soup_context_update_auth.
3358 (maybe_validate_auth): Remove this; it was only useful because of
3359 bugs elsewhere in the auth handling.
3361 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
3362 soup_context_lookup_auth. If the returned auth isn't
3363 authenticated, call soup_context_authenticate_auth() on it.
3365 * tests/auth-test.c: New (from soup-refactoring branch). Tests
3366 that the Basic/Digest auth code does the right thing. (TODO: find
3367 a good way to add NTLM tests too.)
3369 * tests/Makefile.am (check_PROGRAMS): add auth-test
3371 2003-07-29 Dan Winship <danw@ximian.com>
3373 * configure.in: 1.99.25 ("Potato and Leek Soup")
3375 * libsoup/soup-message.c (requeue_read_finished,
3376 release_connection): Free the passed-in body data. Otherwise the
3377 response body ends up getting leaked on most 3xx and 4xx
3379 (soup_message_cleanup): Remove a piece of code that didn't
3380 actually do anything and its associated confused comment.
3382 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
3384 * libsoup/soup-context.c (connection_free): plug a non-occasional
3387 2003-06-26 Joe Shaw <joe@ximian.com>
3389 * configure.in: Version 1.99.24
3391 2003-06-24 Dan Winship <danw@ximian.com>
3393 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
3394 it, and (b) depends on lots of new things sometimes (like on RH9).
3396 * libsoup/soup-openssl.c:
3397 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
3398 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
3401 2003-06-19 Dan Winship <danw@ximian.com>
3403 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
3404 old read_tag before changing/clearing it.
3405 (soup_queue_write_done_cb): Likewise with the write_tag.
3407 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
3408 around the stop+callback.
3409 (soup_transfer_write_cb): Likewise.
3411 2003-06-12 Dan Winship <danw@ximian.com>
3413 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
3415 (soup_transfer_read, create_writer): Set initial ref_count to 2
3416 (one for soup-transfer, one for the caller).
3417 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
3419 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
3420 drops soup-transfer's ref.
3421 (soup_transfer_read_cancel): Now just a stop+unref
3422 (soup_transfer_write_ref, soup_transfer_write_unref,
3423 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
3425 * libsoup/soup-message.c (soup_message_cleanup): when setting up
3426 the "finish reading" callbacks, unref the reader so it will be
3427 destroyed once it's done reading.
3428 (soup_message_requeue): Likewise.
3430 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
3431 prototype change (no longer returns a SoupTransferDone).
3432 (soup_queue_read_chunk_cb): Likewise.
3434 * libsoup/soup-server.c (read_headers_cb): Likewise
3436 2003-06-11 Dan Winship <danw@ximian.com>
3438 * libsoup/soup-transfer.c: Change all functions to take a
3439 SoupReader * or SoupWriter * instead of a guint.
3441 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
3442 write_tag pointers instead of guints.
3444 2003-06-02 Chris Toshok <toshok@ximian.com>
3446 * libsoup/soup-ssl.c: remove #include for soup-nss.h
3448 2003-06-02 Chris Toshok <toshok@ximian.com>
3450 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
3451 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
3452 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
3454 2003-06-02 Chris Toshok <toshok@ximian.com>
3456 * configure.in: Bump version to 1.99.23.
3458 2003-05-30 Chris Toshok <toshok@ximian.com>
3460 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
3461 reconnect when there's an error with ssl connection. This fixes
3462 #43387, but it runs the risk of sending requests multiple times to
3463 the exchange server, and it results in lots of shorter lived
3464 connections and more forking (in the ssl proxy case), depending on
3465 the length of the operation.
3467 2003-05-21 Dan Winship <danw@ximian.com>
3469 * configure.in: 1.99.22 (codename: French Onion Soup)
3471 2003-05-20 Dan Winship <danw@ximian.com>
3473 * libsoup/soup-message.c (soup_message_requeue): Clear the
3474 write_tag as well so we don't double-cancel it. #43395.
3476 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
3477 be destroyed by the end of the func, so we have to call
3478 soup_connection_set_used at the beginning.
3480 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
3481 Call g_set_error() so that we don't SEGV immediately after
3482 returning G_IO_STATUS_ERROR.
3484 2003-05-08 Joe Shaw <joe@ximian.com>
3486 * configure.in: Bump version to 1.99.21
3488 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
3489 tunnelling fails, the other message which shares our same
3490 connection will free it first, so set ours to NULL.
3492 2003-05-08 Dan Winship <danw@ximian.com>
3494 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
3495 return an NTLM request string. Otherwise return the "response"
3496 field (which should include the NTLM authenticate message)
3497 (ntlm_init): Don't bother setting "response" to the NTLM request
3498 string. Just leave it NULL in that case.
3500 * libsoup/soup-message.c (authorize_handler): Never try to reuse
3501 an NTLM auth returned from soup_auth_lookup. Only set the auth on
3502 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
3503 call soup_auth_set_context() on it just like for non-NTLM auth.
3504 The net effect of all of this is that now we record when a context
3505 needs NTLM auth just like with non-NTLM auth, so that that info
3506 gets preserved across connections.
3507 (soup_message_requeue): No longer need the hackery here to
3508 preserve the connection auth state.
3510 2003-05-07 Dan Winship <danw@ximian.com>
3512 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
3513 toggle the connection's in_use flag, and set up the death watch
3514 when it's not in use.
3515 (connection_death): This is only hooked up when the connection is
3516 not in use now, so don't need to check that. Should fix the
3517 infinite connection_death loop.
3518 (soup_connection_is_new): Keep a distinct "new" flag rather than
3519 defining "new" as "has been released at least once".
3520 (soup_connection_set_used): Mark a connection no-longer new.
3521 (soup_context_connect_cb): Mark the connection as new. Don't set
3522 up the death watch since it's in_use.
3523 (try_existing_connections): Use soup_connection_set_in_use.
3524 (soup_connection_release): Likewise
3526 * libsoup/soup-message.c (requeue_read_finished): Call
3527 soup_connection_set_used so that the connection isn't still
3528 considered new when we send the message the second time.
3530 * libsoup/soup-queue.c (soup_queue_error_cb): Call
3531 soup_connection_set_used (assuming we don't close the connection)
3532 (soup_queue_read_done_cb): Likewise.
3534 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
3535 nothing, call soup_transfer_read_error_cb rather than just
3536 cancelling, or else it will get cancelled again later.
3538 2003-05-07 Dan Winship <danw@ximian.com>
3540 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
3541 library doesn't depend on them, only the proxy does. #42473
3543 2003-05-06 Dan Winship <danw@ximian.com>
3545 * src/libsoup/soup-message.c (global_handlers): Change the
3546 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
3547 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
3548 for "Location" to get around the non-64-bit-clean union
3549 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
3550 (redirect_handler): Update for that.
3552 2003-04-28 Dan Winship <danw@ximian.com>
3554 * configure.in: 1.99.20
3556 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
3557 we always call UNIGNORE_CANCEL. Might fix #41971
3559 2003-04-25 Dan Winship <danw@ximian.com>
3561 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
3562 suddenly gets an io error while reading or writing, assume it's a
3563 timeout or something, close the connection, and requeue the
3566 2003-04-23 Dan Winship <danw@ximian.com>
3568 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
3569 soup-transfer callbacks to keep reading off the connection unless
3570 we're actually going to keep the connection around afterward.
3571 Otherwise we can just close it.
3573 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
3574 thingy so that it's possible to cancel a read from inside a
3575 callback so that the above change actually works instead of just
3578 2003-04-20 Rodney Dawes <dobey@ximian.com>
3580 * configure.in: Up version to 1.99.18
3581 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
3583 2003-04-11 Dan Winship <danw@ximian.com>
3585 * libsoup/soup-context.c (soup_connection_purge_idle): New
3586 function to close all idle connections. (Needed for #41117 or else
3587 there's no way to force-discard NTLM authentication.)
3589 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
3591 2003-04-10 Joe Shaw <joe@ximian.com>
3593 * libsoup/soup-queue.c (proxy_https_connect):
3594 proxy_https_connect_cb() might not get called if connecting to the
3595 proxy fails, and it causes us to double-free the connection.
3596 Always set the message's connection to NULL before freeing it.
3598 2003-04-09 Dan Winship <danw@ximian.com>
3600 * configure.in: 1.99.17
3602 2003-04-07 Dan Winship <danw@ximian.com>
3604 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
3605 We can't release the connection there because there may be
3606 SoupMessages still pointing to it. (Needs to be revisited.)
3608 2003-04-03 JP Rosevear <jpr@ximian.com>
3610 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
3611 error during waitpid
3613 * libsoup/soup-address.c: ditto
3615 2003-04-02 Joe Shaw <joe@ximian.com>
3617 * libsoup/soup-context.c (connection_death): Only drop the
3618 connection if we get an error condition on the channel. Fixes a
3621 2003-04-02 Joe Shaw <joe@ximian.com>
3623 * libsoup/soup-context.c (connection_death): Just call
3624 soup_connection_release() from here and return whether the
3625 connection is in use.
3627 2003-03-31 Ian Peters <itp@ximian.com>
3629 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
3630 case of EAGAIN or EINTR, since shutting down an SSL connection
3631 requires more than just closing a socket.
3633 2003-03-28 Dan Winship <danw@ximian.com>
3635 * libsoup/soup-message.c (soup_message_set_context): If the new
3636 context points to a different server from the old context, call
3637 soup_message_cleanup. Otherwise it tries to reuse the old
3640 2003-03-25 Joe Shaw <joe@ximian.com>
3642 * configure.in: Bump up to 1.99.16
3644 2003-03-24 Joe Shaw <joe@ximian.com>
3646 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
3647 slightly better error message on various SSL failures than the
3650 * soup-queue.c (soup_queue_error_cb): Throw the
3651 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
3653 2003-03-21 Joe Shaw <joe@ximian.com>
3655 * soup-server.c: Use non-deprecated g_main_loop_* calls
3657 (soup_server_unref): Don't unref the main loop if it's NULL.
3658 Fixes a glib warning.
3660 2003-03-18 Dan Winship <danw@ximian.com>
3662 * configure.in: comment out NSS checks. The NSS code doesn't work
3663 and there are no current plans to fix it.
3665 * README (Features): Mention GnuTLS, remove NSS and the rest of
3666 the "Planned Features" section.
3668 * MAINTAINERS: remove Alex
3670 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
3671 timeout to 10 seconds (and get rid of the 3 tries) so we don't
3672 fail to connect just because the server is slow/far away.
3674 2003-03-17 Joe Shaw <joe@ximian.com>
3676 * configure.in: Bump up to 1.99.15.
3678 2003-03-12 Ian Peters <itp@ximian.com>
3680 * libsoup/soup-gnutls.c: because creating client credentials is
3681 expensive, keep the same one around as long as possible, only
3682 recreating it if the ssl_ca_file changes. Wrap
3683 gnutls_certificate_credentials in a refcounted struct to avoid
3684 freeing it while another established connection may potentially
3685 need it (say, to rehandshake).
3687 2003-03-11 Frank Belew <frb@ximian.com>
3689 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
3692 2003-03-10 Joe Shaw <joe@ximian.com>
3694 * configure.in: Bump up to 1.99.14.
3696 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
3697 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
3700 2003-03-07 Joe Shaw <joe@ximian.com>
3702 * configure.in: Bump up to 1.99.13.
3704 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
3705 the list of conditions to watch. If the remote end hangs up the
3706 connection, we'll get a successful read of 0 bytes, not a HUP.
3707 The connection will have to be released by the point we check for
3708 it in connection_death().
3710 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
3711 (apparently) errant resetting of the read and write tags. I think
3712 this might have been causing some reentrancy and crashes.
3714 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
3715 channel to NULL encoding and not buffered.
3717 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
3720 2003-02-28 Joe Shaw <joe@ximian.com>
3722 * configure.in: Bump up to 1.99.12.
3724 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
3725 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
3726 this case we probably don't want to call the error callback, we
3727 just want to act like our transfer was cancelled.
3729 2003-02-27 Joe Shaw <joe@ximian.com>
3731 Try to apply some order to the iochannel refcounting...
3733 * configure.in: Bump up to 1.99.11.
3735 * libsoup/soup-context.c (soup_connection_get_iochannel): The
3736 connections needs to own a reference to the iochannel! If we're
3737 using HTTPS, release the ref we get from soup_socket_get_iochannel
3738 and replace it with the ref we get from soup_ssl_get_iochannel().
3739 Then, always ref the channel that we return (ugh, but that's the
3741 (connection_free): Release the connection's ref to the iochannel.
3743 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
3744 iochannel. The reference we pass back will be owned by the
3746 (soup_ssl_hup_waitpid): Release our ref.
3748 2003-02-27 Joe Shaw <joe@ximian.com>
3750 * configure.in: Bump up to 1.99.10.
3752 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
3753 iochannel, return to the status quo. Sigh.
3755 2003-02-26 Joe Shaw <joe@ximian.com>
3757 * configure.in: Bump up to 1.99.9.
3759 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
3760 it's causing problems with HTTPS and proxies; the iochannel
3761 refcounting is waaaaaay horked.
3763 2003-02-26 Frank Belew <frb@ximian.com>
3765 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
3767 2003-02-11 Joe Shaw <joe@ximian.com>
3769 * configure.in: Bump up to 1.99.8 for snaps.
3771 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
3772 It returns the address to the resulting hostent or NULL on failure,
3773 unlike Linux which returns an error code.
3775 2003-02-11 Joe Shaw <joe@ximian.com>
3777 * configure.in: Bump up to 1.99.7 for snaps.
3779 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
3780 the error string from OpenSSL if we can't establish a connection.
3782 2003-02-04 Joe Shaw <joe@ximian.com>
3784 * configure.in: Bump up to 1.99.6 for snaps.
3786 * libsoup/soup-server.c (destroy_message): We already assigned
3787 chan, so don't reassign it, and unref it in all cases.
3788 (issue_bad_request): Always unref after a call to
3789 soup_socket_get_iochannel(), because it refs it.
3790 (conn_accept): Fix some funky GIOChannel reffing here.
3792 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
3793 g_io_channel_ref() on the socket. This is the exact opposite of
3794 what we want to do. Create a temporary structure containing the
3795 parent pid and the old socket and unref the socket when our
3796 callback is called. This should fix GIOChannels being leaked on
3799 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
3802 2003-01-22 Joe Shaw <joe@ximian.com>
3804 * configure.in: Bump up to 1.99.5 for the snaps.
3806 * libsoup/soup-address.c (soup_address_new): If we found the
3807 address in our hash, we need to return NULL or else Soup will
3808 think we're doing an async lookup and do some cancellation on
3809 us. Besides, we were returning the wrong type anyway and it
3810 was crashing things.
3812 2003-01-17 Joe Shaw <joe@ximian.com>
3814 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
3815 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
3816 out, so keep trying until we succeed.
3818 2003-01-10 Joe Shaw <joe@ximian.com>
3820 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
3821 strings and print out the error when the cert can't verify.
3823 2003-01-09 Dan Winship <danw@ximian.com>
3825 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
3826 overrun noticed by valgrind
3828 2002-12-20 Joe Shaw <joe@ximian.com>
3830 * libsoup/soup-server.c (soup_server_new_with_host): Added.
3831 Starts a server only on the interface specified, instead of all
3834 2002-12-16 Jeremy Katz <katzj@redhat.com>
3836 * configure.in: use $libdir instead of /usr/lib when looking for
3839 2002-12-11 Joe Shaw <joe@ximian.com>
3841 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
3842 Don't set a variable to NULL and then immediately try to
3845 2002-12-09 Joe Shaw <joe@ximian.com>
3847 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
3848 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
3849 we don't hang forever if we don't get more data.
3851 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
3852 or else we'll hang forever in SSL_connect() if the other side
3855 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
3856 release the connection on message free, even if the connection was
3859 2002-12-03 Joe Shaw <joe@ximian.com>
3861 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
3862 g_io_channel_set_close_on_unref() on the second half of the socket
3863 pair so we don't leak file descriptors.
3865 2002-12-03 Frank Belew <frb@ximian.com>
3867 * libsoup/soup-address.c: add signal.h to the list of headers to
3870 2002-11-25 Joe Shaw <joe@ximian.com>
3872 * Makefile.am: Build the tests directory again
3874 2002-11-21 Rodney Dawes <dobey@ximian.com>
3876 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
3878 2002-11-20 Michael Meeks <michael@ximian.com>
3880 * configure.in: require autoconf 2.52 not 2.53.
3882 2002-11-18 Dan Winship <danw@ximian.com>
3884 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
3885 since it's apparently non-portable. Use s6_addr instead.
3886 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
3888 * libsoup/soup-error.c: Fix spelling of
3889 SOUP_ERROR_MOVED_PERMANENTLY and its description.
3891 * libsoup/soup-message.c (soup_message_get_request_header, etc):
3892 Remove long-deprecated API.
3894 * libsoup/soup-socket.c (soup_socket_connect): remove unused
3897 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
3898 * libsoup/soup-server.c (cgi_read): Likewise
3899 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
3901 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
3902 * libsoup/soup-transfer.c (soup_transfer_read_cb,
3903 soup_transfer_write_cb): Likewise.
3905 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
3906 instead of IPv4. (Tested on OS X.)
3908 2002-11-15 Dan Winship <danw@ximian.com>
3910 * libsoup/*: Change old Helix Code refs to Ximian (and update
3913 2002-11-15 Frank Belew <frb@ximian.com>
3915 * tests/Makefile.am: uncomment lines to make timeserver build
3918 2002-11-14 Joe Shaw <joe@ximian.com>
3920 * libsoup/soup-address.c (soup_address_new): When we get an
3921 address from the hash, call our address lookup callback or else
3922 the connection will hang.
3924 2002-11-13 Dan Winship <danw@ximian.com>
3926 * tests/timeserver.c: Oops, commit this.
3928 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
3930 2002-11-13 Joe Shaw <joe@ximian.com>
3932 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
3933 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
3936 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
3937 to properly shut down the SSL connection before closing the
3940 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
3941 iochannels before quitting the main loop.
3943 * tests/Makefile.am: disable building timeserver, the source file
3946 2002-11-12 Dan Winship <danw@ximian.com>
3948 * configure.in: Check for IPv6 support in networking headers.
3950 * libsoup/soup-address.c: Make the internal structure of
3951 SoupAddress entirely private, and make SoupAddress be more like a
3952 hostent and less like a sockaddr. (Ie, make it not have a port
3953 associated with it.) Document undocumented functions. Add
3954 completely-untested support for IPv6.
3955 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
3956 SoupAddress and a port.
3957 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
3958 addresses corresponding to the IPv6 and IPv6 "any" addresses.
3959 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
3960 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
3961 may be a sockaddr_in or sockaddr_in6.
3962 (soup_address_gethostname, soup_address_gethostaddr): Remove
3963 these. They aren't reliable, especially on multihomed hosts.
3964 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
3965 (soup_address_new): Keep pending lookups in a separate hash table
3966 from completed lookups. Fix a bug when canceling a lookup when
3967 there was more one outstanding request for it.
3968 (soup_address_lookup_in_cache): Removed.
3970 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
3971 it's not in SoupAddress any more).
3972 (soup_socket_connect): Simplify this. Don't use
3973 soup_address_lookup_in_cache, just call soup_address_new, since we
3974 already know the code can deal with the callback being invoked
3976 (soup_socket_new_sync, soup_socket_new): Take a port argument.
3977 (soup_socket_server_new): Take a SoupAddress to use as the local
3978 address to bind to. This lets the caller choose between the IPv4
3979 and IPv6 "any" addresses, and also lets you bind to a single
3980 interface of a multi-homed machine.
3981 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
3984 * libsoup/soup-server.c (soup_server_new): Pass
3985 soup_address_ipv4_any() to soup_socket_server_new().
3987 * libsoup/soup-socks.c (soup_connect_socks_proxy,
3988 soup_socks_write): Fix up for the API changes, but it won't work
3991 * tests/timeserver.c: Another really simple test, for the server
3994 * tests/Makefile.am: build timeserver
3996 2002-11-11 Dan Winship <danw@ximian.com>
3998 * libsoup/soup-address.c: Move the SoupAddress code from
3999 soup-socket.c and soup-socket-unix.c to here.
4001 * libsoup/soup-socket.c: Move the remaining code from
4002 soup-socket-unix.c here.
4004 * libsoup/soup-socket-unix.c: Gone
4006 * tests/get.c: really really trivial test program
4008 * configure.in (AC_OUTPUT):
4009 * Makefile.am (SUBDIRS): add tests/
4011 2002-11-05 Dan Winship <danw@ximian.com>
4013 * Split libsoup out of soup. ChangeLog.old contains the original
4016 * Makefile.am, etc: Fix things up to work with the new directory
4017 layout. Disable docs until we fix them.
4019 * autogen.sh: Use gnome-autogen.sh
4021 * configure.in: Require autoconf 2.53. Remove stuff that was only
4022 needed for httpd or wsdl code. Remove glib1 support. Bump version
4025 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
4026 in ${includedir}/soup-2.0
4028 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
4029 SOAP-specific stuff, Windows support, and other things that
4030 weren't being maintained.
4032 * soup-config.in, soupConf.sh: Kill these. We only support