1 2006-11-20 Dan Winship <danw@novell.com>
3 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
4 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
5 same thing as <value><string>foo</string></value>. Pointed out by
8 2006-11-06 Dan Winship <danw@novell.com>
10 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
11 addition of soup_xml_real_node.
15 2006-11-06 Dan Winship <danw@novell.com>
17 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
18 "real" (ie, not comment or whitespace) xml node
20 * libsoup/soup-soap-response.c (parse_parameters)
21 (soup_soap_response_from_string)
22 (soup_soap_parameter_get_first_child)
23 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
24 Based on a patch from Andrew W. Nosenko.
26 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
27 don't call xmlKeepBlanksDefault, which changes libxml's behavior
28 globally! Instead, use soup_xml_real_node() when traversing the
31 * libsoup/soup-xmlrpc-response.c
32 (soup_xmlrpc_response_from_string): don't call
34 (exactly_one_child): rewrite in terms of soup_xml_real_node()
35 (which means it handles comments now as well)
36 (soup_xmlrpc_value_get_struct)
37 (soup_xmlrpc_value_array_get_iterator)
38 (soup_xmlrpc_value_array_iterator_prev)
39 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
41 2006-11-05 Dan Winship <danw@novell.com>
43 * libsoup/soup-headers.c (soup_headers_parse_request): document
44 this (in particular, point out that str+len must point to exactly
45 the right place). Allow req_method and req_path to be NULL.
46 (soup_headers_parse_status_line, soup_headers_parse_response):
47 document. Also, change "status_phrase" argument to "reason_phrase"
48 to match the spec. Inspired by #339889.
50 2006-11-03 Dan Winship <danw@novell.com>
52 * libsoup/*.c: fix lots of warnings. Partially from patches from
53 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
55 2006-11-03 Dan Winship <danw@novell.com>
57 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
58 Based on #356809 from Matthew Barnes.
60 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
61 Paolo Borelli. #351500
63 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
64 pointed out by Andrew W. Nosenko.
66 * configure.in: Use pkgconfig to find gnutls. Remove old static
67 linking stuff that was only needed for rcd.
69 * acinclude.m4: remove gnutls stuff
71 * libsoup.pc.in: Use Requires rather than putting xml/ssl
72 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
75 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
76 cygwin. From "Cygwin Ports maintainer", #321827.
78 2006-07-24 Dan Winship <danw@novell.com>
80 * configure.in: 2.2.96. bump AGE and CURRENT for new API
84 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
85 New, from Fernando Herrera, bug 348532.
87 2006-07-21 Dan Winship <danw@novell.com>
89 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
90 constructed auth doesn't have a realm, it's invalid, as per RFC
91 2617. Based on a patch from Nate Nielsen on libsoup-list.
92 (soup_auth_get_realm): remove "if available" from docs; all auths
95 * libsoup/soup-message-server-io.c (get_response_headers): If the
96 server handler set a Content-Length header on the message, don't
97 add a second one. (Preserves compatibility with an old hacky way
98 that people might have been handling HEAD from SoupServer.)
100 * README: update to mention mailing list and bugzilla
102 * HACKING: kill this since there's nothing here that isn't either
103 obvious, or redundant with the README
105 2006-07-21 Dan Winship <danw@novell.com>
107 * libsoup/soup-server-message.c (soup_server_message_init):
108 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
109 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
110 actually worked here, and so there was an undocumented requirement
111 that you manually set the encoding on every response
112 (which SoupServer itself was not doing on internal errors).
113 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
114 (soup_server_message_set_encoding): reject the new
115 SoupTransferEncoding values, for compatibility
117 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
118 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
119 public API, it always has been, due to bugs. Add some new values,
120 currently just for internal use: SOUP_TRANSFER_NONE (for cases
121 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
122 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
123 actually implemented yet).
125 * libsoup/soup-message.c (soup_message_get_request_encoding,
126 soup_message_get_response_encoding): figure out the body encoding
127 being used by the request/response, including all the tricky
128 cases like HEAD/1xx/etc.
129 (soup_message_is_keepalive): if the response encoding is
130 SOUP_TRANSFER_EOF, then the message isn't keepalive.
132 * libsoup/soup-message-client-io.c (parse_response_headers): use
133 soup_message_get_response_encoding.
135 * libsoup/soup-message-server-io.c (parse_request_headers): use
136 soup_message_get_request_encoding.
137 (get_response_headers): use both soup_server_message_get_encoding
138 and soup_message_get_response_encoding, to properly distinguish
139 between the wire encoding and the alleged-by-headers encoding
140 (which differ for HEAD, etc).
142 * libsoup/soup-message-io.c (io_error, read_body_chunk):
143 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
144 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
145 SOUP_MESSAGE_IO_STATE_FINISHING.
147 * libsoup/soup-server.c (request_finished): Check
148 soup_socket_is_connected() *before* soup_message_is_keepalive(),
149 since the message will be invalid if the client unexpectedly
150 dropped the connection.
152 * tests/simple-httpd.c (server_callback): handle HEAD requests.
153 Remove no-longer-necessary soup_server_message_set_encoding()
156 * tests/get.c: add -d (debug) flag to print headers, and -h flag
157 to do a HEAD rather than GET
159 2006-07-10 Dan Winship <danw@novell.com>
161 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
162 time. Pointed out by Daniel Holbach.
164 2006-07-10 Dan Winship <danw@novell.com>
166 * configure.in: 2.2.95
170 2006-06-19 Dan Winship <danw@novell.com>
172 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
173 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
175 * configure.in: fix some quoting
177 2006-06-14 Dan Winship <danw@novell.com>
179 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
181 * tests/xmlrpc-test.c: XML-RPC regression test
183 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
185 * tests/httpd.conf.in: add php stuff
187 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
188 rather than "stop", so that it stops listening on the socket
189 before exiting, so that we can immediately start another apache
190 (eg, in "make check").
192 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
195 * libsoup/soup-xmlrpc-message.c
196 (soup_xmlrpc_message_write_datetime): rename from
197 "..._write_time", to make it consistent with the XML-RPC type name
198 and the corresponding SoupXmlrpcResponse method. Also, fix it to
199 use the same ISO 8601 format as the spec, and use the right value
200 for the seconds field.
201 (soup_xmlrpc_message_write_base64): Change the buf arg to a
202 gconstpointer rather than a const char *.
204 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
205 Return a GByteArray containing the decoded data, rather than
206 the base64-encoded string.
207 (soup_xmlrpc_value_dump_internal): Update for that (and don't
209 (soup_xmlrpc_value_array_get_iterator,
210 soup_xmlrpc_value_array_iterator_get_value): Make these actually
213 2006-06-12 Dan Winship <danw@novell.com>
215 * configure.in: 2.2.94
219 2006-06-12 Dan Winship <danw@novell.com>
221 * docs/reference/client-howto.xml:
222 * docs/reference/server-howto.xml: New client and server API
225 * docs/reference/*: reorganize, regenerate, fill in some missing
228 * libsoup/soup-connection.c (soup_connection_new): document the
231 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
233 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
236 2006-06-12 Dan Winship <danw@novell.com>
238 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
239 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
241 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
242 the output parameter and make the return value match the other
245 2006-06-09 Dan Winship <danw@novell.com>
247 * configure.in: Add tests for apache, output tests/httpd.conf
251 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
253 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
256 * tests/auth-test.c: Use apache-wrapper functions to start a local
257 apache process to test authentication against, since the auth-test
258 tree at developer.ximian.com went missing a long time ago. #311825
260 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
261 (TESTS): include auth-test if HAVE_APACHE.
263 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
264 URI pointing to a directory rather than a file.
266 2006-06-08 Dan Winship <danw@novell.com>
268 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
269 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
270 Check return value of strtol/g_ascii_strtod correctly. #344222,
271 patch from Brent Smith.
273 2006-06-07 Dan Winship <danw@novell.com>
275 * libsoup/soup-xmlrpc-response.c
276 (soup_xmlrpc_response_from_string): record whether or not the
277 response was a fault.
278 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
281 2006-05-29 Dan Winship <danw@novell.com>
283 * configure.in: 2.2.93
287 2006-05-29 Dan Winship <danw@novell.com>
289 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
290 "FINISHING" which means "done I/O, but not yet done processing and
291 cleanup" before "DONE" (which now always means "completely done").
292 (soup_message_io_stop): disconnect the socket if the read state is
293 "< FINISHING", not "!= DONE".
294 (io_error): on an EOF-that-signals-end-of-data, set state to
295 FINISHING and run io_read().
296 (io_read, io_write): remove the g_return_if_fails from before.
297 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
298 listening for the readable/writable signal (eg, so we don't end up
299 reading a following pipelined request), and set the state to DONE.
300 (soup_message_io_unpause): Only reconnect the readable/writable
301 signals if the io state isn't DONE. Guard the calls to
302 io_read/io_write better so that it's safe to call this even after
303 they are both DONE, since it may be easier for us to test that
304 than for the caller to.
306 Fixes 334469, 342640, and another bug caused by the earlier
307 workaround to 334469. Based on patches and analysis from William
308 Jon McCann and Armin Bauer.
310 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
311 this work again. (Pointed out by Alex Larsson)
313 2006-05-26 Dan Winship <danw@novell.com>
315 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
318 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
319 SSL after CONNECTing! Doh. Part of bnc #174255.
320 (SoupConnectionMode): new enum for the three types of
321 SoupConnection (direct, proxy, tunnel).
322 (set_property): set priv->mode according to proxy_uri and
324 (socket_connect_result, soup_connection_connect_sync): use
325 priv->mode to decide whether or not to tunnel.
326 (send_request): Only pass TRUE for is_proxy to
327 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
328 (Also part of bnc #174255).
330 2006-05-26 Dan Winship <danw@novell.com>
332 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
333 if IO is currently in progress on a message.
335 * libsoup/soup-session-async.c (run_queue): don't process messages
336 that are io_in_progress. #342545, fix based on analysis from Wang
337 Xin. (In the future we may want to re-fix this by adding a
338 REQUEUED message status separate from QUEUED.)
340 2006-05-22 Dan Winship <danw@novell.com>
342 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
343 while holding host_lock; that's not allowed and can cause
344 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
347 2006-04-10 Dan Winship <danw@novell.com>
349 * configure.in: bump version to 2.2.92
353 2006-04-10 Dan Winship <danw@novell.com>
355 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
356 if these get called after the IO is done. This isn't supposed to
357 happen, but apparently does. Workaround for #334469.
359 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
360 NULL-terminate these so we don't crash when trying to parse an
361 invalid value. (Flip side of the previous #328615 patch.)
363 2006-04-02 Dan Winship <danw@novell.com>
365 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
366 Write out correct digest algorithm value. #328615.
368 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
369 Request-Line-parsing code to not have a lame max length. #335040.
371 * Makefile.am (install-data-local): Install the .pc file mode 644,
374 * libsoup/soup-auth-digest.c:
375 * libsoup/soup-auth.c:
376 * libsoup/soup-message-client-io.c:
377 * libsoup/soup-message-server-io.c:
378 * libsoup/soup-message.c:
379 * libsoup/soup-method.c:
380 * libsoup/soup-server-auth.c:
381 * tests/get.c: replace locale-ish strcasecmps with
384 * libsoup/*.c: fix most signed/unsigned mismatch warnings
386 2006-03-03 Dan Winship <danw@novell.com>
388 * configure.in: bump version to 2.2.91.
392 2006-03-03 Dan Winship <danw@novell.com>
394 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
395 GMainContext as well, and update the resolution code to dispatch
396 each lookup result in the correct context.
398 * libsoup/soup-address.c (soup_address_resolve_async_full): New
399 method that takes a GMainContext to pass to
400 soup_dns_lookup_resolve_async.
402 * libsoup/soup-socket.c (soup_socket_connect): Use
403 soup_address_resolve_async_full. Fixes a problem reported by Armin
406 * configure.in: update to require glib 2.6, since apparently the
409 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
411 * libsoup/soup-connection.c:
412 * libsoup/soup-session.c:
413 * libsoup/soup-socket.c: add a "timeout" property,
414 which gets passed from server to socket, and session to connection
415 to socket, allowing blocking non-responsive sync connections to
416 return. Combination of "EAGAIN" && "Blocking" connection is treated
417 as error and the connection will be terminated and the control
418 is returned to the caller immediately.
420 2006-02-02 Tor Lillqvist <tml@novell.com>
422 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
423 on Windows, as they are present by default on XP only. We do want
424 to support Windows 2000, too.
426 2005-12-21 Dan Winship <danw@novell.com>
428 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
431 * tests/date.c: add three more ISO 8601 cases, to exercise all the
434 #324671, from Emmanuele Bassi
436 2005-11-25 Dan Winship <danw@novell.com>
438 * README: sync to text on wiki, and point to wiki
440 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
442 2005-11-17 Dan Winship <danw@novell.com>
444 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
445 right away, to protect against this being re-entered mid-cleanup
446 (when we unref the connection). #321208, based on a patch from
449 2005-11-16 Dan Winship <danw@novell.com>
451 * libsoup/soup-xmlrpc-message.c
452 (soup_xmlrpc_message_start_member): add the "name" element to the
453 struct member. #321362, patch from Sebastian Bauer.
455 2005-11-10 Dan Winship <danw@novell.com>
457 * configure.in: bump version to 2.2.90. This will not be
458 officially released, but once these patches have gotten some
459 testing they may be pulled up to the gnome-2-12 branch.
461 * libsoup/soup-connection.c:
462 * libsoup/soup-server.c:
463 * libsoup/soup-session.c:
464 * libsoup/soup-socket.c: add an "async-context" property,
465 which gets passed from server to socket, and session to connection
466 to socket, allowing async usage outside the main thread. Based on
467 patches from Armin Bauer and Jürg Billeter.
469 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
470 soup_add_timeout): utility routines to add watches, idles, and
471 timeouts to non-default GMainContexts.
473 * libsoup/soup-message-io.c (io_write): set the read state
474 appropriately after writing a "100 Continue" response
475 (io_read): More 100-Continue stuff. I don't think this is quite
476 right so it will probably change again later.
478 2005-11-01 Dan Winship <danw@novell.com>
480 * docs/reference/libsoup-docs.sgml: tell it to generate an index
482 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
484 2005-11-01 Dan Winship <danw@novell.com>
486 * libsoup/soup-connection.c (set_current_request,
487 clear_current_request): Cast the argument to
488 g_object_add/remove_weak_pointer to the wrong type, to make gcc
489 4.1 happy, because C is stupid and "void **" means "a pointer to a
490 void *", not "a pointer to any kind of pointer".
492 * libsoup/soup-xmlrpc-response.c
493 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
496 2005-10-27 Dan Winship <danw@novell.com>
498 * libsoup/soup-socket.c (soup_socket_client_new_async,
499 soup_socket_client_new_sync): unref the SoupAddress passed to
500 soup_socket_connect to avoid a leak. Based on a patch from Wang
502 (socket_read_watch, read_from_network, socket_write_watch,
503 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
504 events when polling, since poll() will return them whether or not
505 you asked for them, but glib will ignore them unless you did,
506 which will result in CPU suckage if such an error occurs. #319305,
507 patch from Jonathan Matthew.
509 2005-10-27 Dan Winship <danw@novell.com>
511 bgo #316313 / bnc #116762, and probably also bgo #318252
513 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
514 after releasing it, to make sure we can't accidentally release it
517 * libsoup/soup-connection.c (clear_current_request): Call
518 soup_message_io_stop() on the cleared request.
520 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
521 little dance here to make sure the session can't queue another
522 message on the connection while we're in the process of requeuing
525 2005-08-30 Tor Lillqvist <tml@novell.com>
527 * libsoup-zip.in: Include documentation in developer zipfile.
529 2005-08-22 Dan Winship <danw@novell.com>
531 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
532 g_type_class_add_private.
534 * configure.in: Bump to 2.2.6.1
538 2005-08-22 Dan Winship <danw@novell.com>
540 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
541 soup_server_get_socket() addition.
545 2005-08-22 Dan Winship <danw@novell.com>
547 * libsoup/soup-connection.c (set_current_request,
548 clear_current_request): Fix g_object_add/remove_weak_pointer usage
549 to prevent a crash when canceling a request. From Tambet.
551 2005-08-16 Dan Winship <danw@novell.com>
553 Fix a connection leak reported by Tambet.
555 * libsoup/soup-connection.c (send_request): rather than tracking
556 the message progress via signals, call
557 soup_message_send_request_internal() and have it call
558 soup_connection_release() when it's done.
559 (request_restarted, request_done): gone
560 (clear_current_request): handle disconnecting (if necessary) and
561 updating last_used time here.
562 (soup_connection_release): Call clear_current_request().
563 (dispose): Call clear_current_request()
565 * libsoup/soup-message-client-io.c
566 (soup_message_send_request_internal): New. Takes a SoupConnection
567 in addition to the other args, and passes that on to
570 * libsoup/soup-message-io.c (SoupMessageIOData): add a
571 SoupConnection field.
572 (io_cleanup): if io->conn is set, unref it.
573 (soup_message_io_stop): if io->conn is set, and we ended in a
574 clean state, call soup_connection_release() on it.
575 (soup_message_io_client): Add a SoupConnection arg, which gets
576 reffed and stored in io->conn.
580 2005-08-15 Dan Winship <danw@novell.com>
582 * libsoup/soup-connection.h (soup_connection_new):
583 * libsoup/soup-server.h (soup_server_new):
584 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
585 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
586 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
588 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
589 definition of this from glib 2.8 for use when compiling against
592 2005-08-15 Tambet Ingo <tambet@ximian.com>
594 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
597 * libsoup/soup-server.c (soup_server_get_listener): ditto.
599 2005-08-12 Dan Winship <danw@novell.com>
601 * libsoup/soup-server.c (soup_server_get_listener): new method to
602 get the server's listening socket.
604 * libsoup/soup-socket.c: add a new "cloexec" property, to set
605 FD_CLOEXEC on the socket. Update everything for that.
607 2005-08-05 Dan Winship <danw@novell.com>
609 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
611 (soup_socket_connect): Make sure that get_iochannel() gets called
612 if the connect succeeds right away, or the socket will fail on
613 the first read or write. [#312540]
615 2005-08-01 Dan Winship <danw@novell.com>
617 * configure.in: drop version back down to 2.2.5 and
618 SOUP_API_VERSION back to 2.2; due to various snafus, there has
619 never yet been an official release of the 2.4 API and the GNOME
620 2.12 betas have been shipping with libsoup 2.2 tarballs (while
621 jhbuild has been using 2.4, with evolution and related packages
622 having configure hacks to build against either). As there never
623 ended up being any API-incompatible changes in the 2.4 series, we
624 can just merge it back into the 2.2 series and kill off 2.4.
626 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
629 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
631 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
632 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
633 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
634 let us use a variable.
636 2005-08-01 Dan Winship <danw@novell.com>
638 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
639 SoupMD5Context and write out the digest in hex digits.
641 * libsoup/soup-auth-digest.c (authenticate, compute_response):
642 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
643 rather than duplicating the code in both places here.
645 Patch from Wim Lewis.
647 2005-07-15 Dan Winship <danw@novell.com>
649 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
650 since some servers are lame. Based on a patch from Jean-Yves
653 * tests/uri-parsing.c: add some more tests to make sure that
654 things that should be %-escaped do get %-escaped
656 2005-07-06 Tor Lillqvist <tml@novell.com>
658 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
659 that gmtime() is thread-safe on Windows.
660 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
662 2005-06-14 Dan Winship <danw@novell.com>
664 * configure.in: check for gmtime_r
666 * libsoup/soup-date.c: date/time-manipulation functions
668 * libsoup/soup-xmlrpc-message.c:
669 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
670 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
673 * tests/date.c: soup-date test code
675 * tests/getbug.c: XMLRPC test code. (Should be switched to use
676 bugzilla.gnome.org once bgo supports XMLRPC.)
678 * TODO: XMLRPC is implemented now (but shares the problem with
679 SOAP that the API is not very good).
681 2005-06-14 Dan Winship <danw@novell.com>
683 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
686 * docs/reference/*: update, fix, etc
688 2005-06-13 Tor Lillqvist <tml@novell.com>
690 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
691 that we do have inet_pton() and inet_ntop() on Windows (because we
692 implement them ourselves in soup-dns.c).
694 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
695 implementations, they were completely bogus.
696 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
698 2005-06-08 Dan Winship <danw@novell.com>
700 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
701 use just the domain name for the domain, not the whole
702 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
704 2005-05-26 Dan Winship <danw@novell.com>
706 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
707 this, since it can be called from set_property(). Possible fix for
710 2005-05-05 Dan Winship <danw@novell.com>
712 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
713 --type-init-func to force g_thread_init to be called. [#302674]
715 2005-04-18 Tor Lillqvist <tml@novell.com>
717 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
718 Automake conditional OS_WIN32. Pre-cache information that we do
719 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
720 wouldn't notice as they don't include the necessary headers or
721 link with -lws2_32. Easiest to just pre-cache it.)
723 * libsoup-zip.in: New file, to build zipfile-based distribution of
726 * Makefile.am (EXTRA_DIST)
727 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
729 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
730 WinSock library -lws2_32.
732 * libsoup/soup-portability.h: New file. On Unix it includes the
733 traditional BSD socket etc headers. On Win32 it includes
734 winsock2.h and ws2tcpip.h.
737 * libsoup/*.h: Correspondingly, don't include the BSD socket API
740 * libsoup/soup-address.h
741 * libsoup/soup-dns.h: Include soup-portability.h
743 * libsoup/soup-address.c (soup_address_class_init): This function
744 should get called before libsoup uses the WinSock API, so this is
745 a good place to call WSAStartup().
747 * libsoup/soup-auth-digest.c (get_protection_space): Use
748 g_strsplit() instead of the relatively unportable strtok_r().
750 * libsoup/soun-dns.c: Remove unused headers. Implement
751 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
752 and WSAAddressToString().
754 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
755 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
757 (soup_socket_class_init): Call soup_address_get_type() to make
758 sure WSAStartup() gets called (through soup_address_class_init()).
759 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
760 (soup_socket_write): Conditionalize SIGPIPE use.
762 * tests/get.c: mkdir() is different in Microsoft's C library.
764 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
765 some clash with winsock2.h (which includes windows.h). The Win32
766 headers pollute the namespace wildly.
768 2005-04-15 Dan Winship <danw@novell.com>
770 * libsoup/soup-dns.c (resolve_name): make this work with
771 pre-EAI_OVERFLOW glibc [#300620]
773 2005-04-12 Dan Winship <danw@novell.com>
775 * configure.in: Remove the various gethostbyname_r checks and just
776 check for getnameinfo/getaddrinfo.
778 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
779 forking. Change the API around a bunch in the process.
781 * libsoup/soup-address.c: Update for soup-dns changes
783 * tests/dns.c: take multiple hostnames on the command line and
784 resolve them all at once (patch from tml)
786 2005-04-11 Dan Winship <danw@novell.com>
788 * configure.in: require glib-2.0 >= 2.4.0
790 * libsoup/*.c: use G_DEFINE_TYPE and
791 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
793 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
794 SOUP_MAKE_TYPE_WITH_IFACE
796 * tests/revserver.c: use GThread. (patch from tml)
798 2005-04-11 Dan Winship <danw@novell.com>
800 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
803 * libsoup.pc.in: rename from libsoup-2.2.pc.in
805 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
806 install the .pc file by hand, renaming it to include the
809 * libsoup/Makefile.am: s/2.2/2.4/
811 2005-03-09 Dan Winship <danw@novell.com>
813 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
814 if gnutls returns 0. [#73352]
815 (verify_certificate): put an #ifdef around
816 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
818 2005-01-08 Not Zed <NotZed@Ximian.com>
820 ** See ximian bug #70323.
822 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
823 types with guint32, as the code needs 32 bit longs.
825 2004-10-20 Dan Winship <danw@novell.com>
827 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
828 commit, which somehow did not actually get committed then.
830 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
831 indicating whether or not the connection is connected.
832 (tunnel_connect_finished): If successful, set connected. If the
833 server returns a 3xx response, translate it to 407 (under the
834 assumption that it's trying to redirect us to an HTML login page,
835 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
836 soup_socket_start_ssl().
837 (socket_connect_result, soup_connection_connect_sync): If
838 successful, set connected
839 (soup_connection_disconnect): Don't emit "disconnected" if we
840 aren't yet connected, or the message that was waiting for this
841 connection may get stranded in the queue. (also part of 68531)
843 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
844 SSL and lets the caller pass the expected hostname. Fixes a
845 problem where SSL certification validation would always fail if
846 you used a proxy, because it was comparing the cert against the
847 proxy's hostname. (68583)
849 2004-10-06 Dan Winship <danw@novell.com>
851 * libsoup/soup-ssl.h (SoupSocketError): add
852 SOUP_SSL_ERROR_CERTIFICATE.
854 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
856 (verify_certificate): Set the GError appropriately rather than
859 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
860 the GIOChannel operation returns an error, store it as GOBject
861 data on the socket (as a hack so soup-message-io.c can access it
862 without us needing to change SoupSocket's API).
864 * libsoup/soup-message-io.c (io_error): peek at the socket's
865 "last_error" datum and set the message's status to SSL_FAILED
866 (with the GError's message string) rather than IO_ERROR, if
867 appropriate. For 64414.
869 2004-09-30 Dan Winship <danw@novell.com>
871 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
872 extra initialization needed for libgcrypt 1.2 or higher. Fixes
874 (soup_ssl_get_client_credentials,
875 soup_ssl_get_server_credentials): Call soup_gnutls_init().
877 2004-08-26 Dan Winship <danw@novell.com>
879 * configure.in: Bump version to 2.2.0.
881 * AUTHORS: Update this to reflect the last 2 years.
883 * NEWS: Brief summary of 1.99.x -> 2.2 changes
885 * README, TODO: Updates
887 2004-08-26 Dan Winship <danw@novell.com>
889 * libsoup/*: add/fix lots of gtk-doc comments
891 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
892 Fix bug noticed while documenting. (We were using the
893 locale-case-insensitive functions rather than the g_ascii_ ones.)
895 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
896 implemented) NO_PIPELINE and NO_COOKIE flags.
898 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
899 There are still problems here with gtk-doc not recognizing many of
900 the objects in libsoup...
902 2004-08-13 JP Rosevear <jpr@novell.com>
904 * configure.in: bump version, libtool number
906 2004-08-09 Dan Winship <danw@novell.com>
908 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
909 use conn after emitting the "connect_result" signal, since it
910 might be destroyed by that. Based on a patch from hpj.
912 2004-08-02 Dan Winship <danw@novell.com>
914 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
916 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
917 set, don't re-encode the URL parts. Based on a patch by
920 2004-07-19 JP Rosevear <jpr@novell.com>
922 * configure.in: bump version, libtool number
924 2004-07-15 Dan Winship <danw@novell.com>
926 * libsoup/soup-session-sync.c (send_message): Simplify this. If
927 the message comes back from soup_connection_send_request not
928 FINISHED, get a new connection rather than reusing the old one.
929 This fixes a race condition in which a connection could end up
930 double-booked, and fixes the handling of messages that get
931 redirected to another server.
933 2004-07-13 Dan Winship <danw@novell.com>
935 * libsoup/soup-session.c (connect_result): If the connection
936 attempt succeeded, reserve the connection before releasing
937 host_lock. Otherwise, another thread might find it in the
938 connection pool before the caller can queue a message on it.
941 * libsoup/soup-session-async.c (got_connection): Call
942 soup_connection_release(), since we don't have a specific message
943 in mind for the connection, so we need it to be considered idle.
945 * libsoup/soup-connection.c (soup_connection_release): New
946 function, to undo a soup_connection_reserve().
947 (soup_connection_send_request, soup_connection_reserve,
948 soup_connection_authenticate, soup_connection_reauthenticate):
951 2004-07-12 Dan Winship <danw@novell.com>
953 * libsoup/soup-session-sync.c (send_message): signal the
954 "connections available" condition after the message finishes. Duh.
956 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
958 2004-07-08 Dan Winship <danw@novell.com>
960 * libsoup/soup-soap-response.c: Revert previous change for now; it
961 breaks the build on distros with older libxmls.
963 2004-07-08 Dan Winship <danw@novell.com>
965 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
968 2004-07-07 Fernando Herrera <fherrera@onirica.com>
970 * libsoup/soup-soap-response.c: (finalize), (init),
971 (soup_soap_response_from_string): Use a parse context for the
972 xml document, so we can safely use the option to ignore
973 blank spaces and '\n'.
975 2004-07-06 Dan Winship <danw@novell.com>
977 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
978 http or https, require a hostname. For #61049
980 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
982 2004-06-03 JP Rosevear <jpr@novell.com>
984 * configure.in: bump version to 2.1.11, libtool number
986 2004-06-01 Dan Winship <danw@novell.com>
988 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
989 macros to not use ?: expressions as lvalues, since that's
990 apparently a GNU extension.
991 (soup_address_resolve_async): Use a timeout rather than an idle
992 handler to poll the dns result. (soup-dns really should be
993 rewritten to not require polling, but this is easier for now.)
996 * libsoup/soup-server.c (call_handler): Don't use GNU-only
997 non-constant structure initialization
999 * tests/dns.c: Simple test of the dns code
1001 * tests/Makefile.am (noinst_PROGRAMS): build it
1003 2004-05-19 JP Rosevear <jpr@novell.com>
1005 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
1007 2004-05-18 Dan Winship <danw@novell.com>
1009 * libsoup/soup-ssl.h:
1010 * libsoup/soup-nossl.c: define some GError codes and stuff
1012 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
1013 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
1014 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
1017 * libsoup/soup-socket.c (soup_socket_write): Handle
1018 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
1019 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
1021 (read_from_network): Handle the reverse case (which would cause
1022 hanging rather than spinning, and might be the cause of some
1023 connector 1.5 slowness?)
1025 2004-05-11 Dan Winship <danw@novell.com>
1027 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
1028 kludgefully, using the magic of GClosure, to fix x86_64 problems
1031 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
1033 * libsoup/soup-soap-message.c (finalize) : free
1034 the elements of priv structure before freeing priv
1036 2004-04-20 Dan Winship <danw@ximian.com>
1038 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
1039 re-sending the message, call soup_message_restarted()
1040 (send_request): Connect to "restarted" signal, and remove the 401
1041 handlers from there; doing it here didn't work because if the
1042 connection was closed, the message would be re-sent on a new
1043 connection, but would still have the handlers from the old
1044 connection attached to it, which would make authentication fail.
1046 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
1047 Copy the handler list before starting, to protect against handlers
1048 that modify the handler list.
1050 2004-04-15 Dan Winship <danw@ximian.com>
1052 * libsoup/soup-connection.c (soup_connection_connect_sync):
1053 Connect to the socket's "disconnect" signal. (We were only doing
1054 this from the async version before, which meant that synchronous
1055 SoupConnections could outlive their sockets and start causing
1058 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
1059 Authorization header before adding a new one.
1061 2004-04-02 JP Rosevear <jpr@ximian.com>
1063 * configure.in: bump version, libtool number
1065 2004-03-15 Dan Winship <danw@ximian.com>
1067 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
1068 types to kill a warning with -Wall -O2
1070 2004-03-05 JP Rosevear <jpr@ximian.com>
1072 * configure.in: bump version, libtool number
1074 2004-03-02 Dan Winship <danw@ximian.com>
1076 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
1077 bytes_read is -1, since the value of errno is irrelevant when
1078 bytes_read is 0. Probably #54960.
1080 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
1082 * libsoup/soup-soap-response.h: removed not-implemented function's
1085 2004-02-27 Rodney Dawes <dobey@ximian.com>
1088 * libsoup/Makefile.am: Use a different variable for linking to the
1089 static version of gnutls, so we don't pull the .a files into the .pc
1093 2004-02-20 Dan Winship <danw@ximian.com>
1095 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
1096 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
1097 to make this work on 64-bit platforms. (Grr. C type checking
1100 * tests/revserver.c: Likewise
1102 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
1106 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
1107 don't leak the value returned from xmlNodeGetContent().
1108 (soup_soap_parameter_get_string_value,
1109 soup_soap_parameter_get_property): return a g_strdup'ed
1110 string, not the value returned by xmlNodeGetContent, so that
1111 callers can use g_free, and not xmlFree.
1113 * libsoup/soup-soap-response.h: made soup_parameter_get_property
1116 2004-02-17 Dan Winship <danw@ximian.com>
1118 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
1119 typo. #54433, from Mariano Suarez-Alvarez.
1121 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
1124 2004-02-17 Rodney Dawes <dobey@ximian.com>
1126 * libsoup/soup-message.c (soup_message_new): HTTP connections require
1127 a hostname, and we also hash on the host for message queueing in the
1128 session, if the host is NULL we free the SoupUri and return NULL
1130 2004-02-14 Dan Winship <danw@ximian.com>
1132 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
1133 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
1135 2004-02-12 Joe Shaw <joe@ximian.com>
1137 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
1138 loop to prevent DNS errors from short reads.
1140 2004-02-11 Joe Shaw <joe@ximian.com>
1142 * configure.in: Bumped version number to 2.1.7 and libtool
1145 2004-02-11 Dan Winship <danw@ximian.com>
1147 * libsoup/soup-connection.c (soup_connection_disconnect): Update
1148 Joe's comment here with a gory explanation of exactly what's going
1149 on. (It's not just an SSL bug either, it affects all connections.)
1151 2004-02-10 Joe Shaw <joe@ximian.com>
1153 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
1154 workaround for SSL connections which time-out but don't close the
1155 socket until we try sending data again later.
1157 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
1158 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
1159 own it, the SoupAddress does.
1161 2004-02-09 JP Rosevear <jpr@ximian.com>
1163 * configure.in: Bump libtool numbers
1165 2004-02-05 Dan Winship <danw@ximian.com>
1167 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
1169 (soup_session_remove_filter): And unref it here (we were already
1170 unreffing it in dispose().)
1172 2004-02-05 Joe Shaw <joe@ximian.com>
1174 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
1175 hostent if it's NULL.
1176 (soup_dns_entry_check_lookup): If the entry is resolved, but the
1177 hostent is NULL, uncache it.
1179 2004-02-04 Dan Winship <danw@ximian.com>
1181 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
1182 remove the WWW-Authenticate headers before returning, so the
1183 session won't fall back to Basic auth. Also, leave the connection
1184 in the "authenticating" state rather than setting it to
1186 (ntlm_authorize_post): Only requeue the message if it's in the
1187 "authenticating" state (and set it to "authenticated"). Fixes an
1188 "unepectedly disconnected" error if authentication fails.
1190 2004-02-03 Dan Winship <danw@ximian.com>
1192 * libsoup/soup-message-io.c (io_cleanup): Call
1193 soup_message_io_stop so we don't get a callback on the io after
1194 it's been cleaned up.
1196 * libsoup/soup-session.c (add_auth): Only remove the Authorization
1197 header if we have another one to add. (Otherwise it messes up
1198 SoupConnectionNTLM.)
1200 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
1201 memcpy here, since the source and destination will overlap if
1202 *nread is small and read_buf->len is large. (Noticed by valgrind,
1205 2004-02-02 Joe Shaw <joe@ximian.com>
1207 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
1208 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
1209 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
1210 when there are no messages on the wire on a non-blocking socket.
1211 This sends a SSL hangup message and then allows us to immediately
1214 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
1216 * configure.in: bumped version number to 2.1.6.
1218 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
1220 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
1223 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
1225 * libsoup/soup-soap-response.[ch]
1226 (soup_soap_parameter_get_string_value): removed 'const' from return
1229 2004-01-29 Joe Shaw <joe@ximian.com>
1231 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
1232 certificate before we try to use it. Ahem.
1234 2004-01-23 Joe Shaw <joe@ximian.com>
1236 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
1238 2004-01-21 Joe Shaw <joe@ximian.com>
1240 * configure.in: Require at least GnuTLS 1.0.0.
1242 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
1244 (verify_certificate): Use gnutls_x509_crt_import() and
1245 gnutls_x509_crt_check_hostname() instead of
1246 gnutls_x509_check_certificates_hostname().
1247 (init_dh_params): Use gnutls_dh_params_generate2() instead of
1248 gnutls_dh_params_generate() and gnutls_dh_params_set().
1250 2004-01-20 Joe Shaw <joe@ximian.com>
1252 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
1253 close the socket itself, so we need to do it or else our
1254 connections stay in CLOSE_WAIT forever.
1256 2004-01-16 Jason Leach <leach@wam.umd.edu>
1258 * libsoup/Makefile.am: builddir != srcdir fixes.
1260 2004-01-14 Joe Shaw <joe@ximian.com>
1262 * libsoup/soup-gnutls.c (verify_certificate): Remove the
1263 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
1265 2004-01-12 JP Rosevear <jpr@ximian.com>
1267 * configure.in: bump version and libtool revision
1269 2004-01-12 Dan Winship <danw@ximian.com>
1271 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
1274 2004-01-10 Larry Ewing <lewing@ximian.com>
1276 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
1279 2004-01-09 Joe Shaw <joe@ximian.com>
1281 * acinclude.m4: Include the libgnutls.m4 file.
1283 * configure.in: Remove manual checking for libgnutls-config and
1284 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
1285 version, which is 0.9.7 for now.
1287 * libsoup/Makefile.am: Some changes for the above change.
1289 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
1290 HAVE_GNUTLS_GNUTLS_H.
1291 (verify_certificate): Uncomment the SSL certificate hostname
1294 * libsoup/soup-session.c (set_property): Be smart about flushing
1295 our SSL credentials only when the CA file is set to something
1296 different than it was before.
1298 2004-01-09 Harish K <kharish@novell.com>
1299 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
1300 added code to ignore Header element, if present, while creating
1303 2004-01-05 Dan Winship <danw@ximian.com>
1305 * configure.in: Remove no-longer-relevant socklen_t check
1307 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
1308 Marcus Clarke, #52566)
1310 * libsoup/soup-dns.c: Likewise
1312 2003-12-29 JP Rosevear <jpr@ximian.com>
1314 * configure.in: bump version and libtool numbers
1316 2003-12-22 Dan Winship <danw@ximian.com>
1318 * README, TODO: Update these
1320 2003-12-22 Dan Winship <danw@ximian.com>
1322 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
1323 you can disconnect a socket from one thread while doing I/O in
1326 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
1327 soup_message_io_stop() and io_cleanup(), to separate out the "stop
1328 reading/writing" and "free data" phases to allow thread-safe
1329 synchronous cancellation.
1330 (soup_message_io_finished): call both soup_message_io_stop() and
1332 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
1333 doesn't already have a transport error status (eg, CANCELLED).
1334 (new_iostate): Call io_cleanup() if needed.
1336 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
1337 clearer that it's not a status.
1339 * libsoup/soup-message.c (finalize, restarted, finished,
1340 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
1341 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
1343 * libsoup/soup-connection.c (send_request): Remove
1344 soup_message_io_cancel call.
1346 * libsoup/soup-session-sync.c (send_message): Connect to the
1347 connection's "disconnected" signal rather than using a weak ref,
1348 since that's what we really care about, and it's possible that the
1349 connection may have an extra ref on it somewhere that would keep
1350 it from being destroyed even if it was disconnected.
1352 2003-12-20 Joe Shaw <joe@ximian.com>
1354 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
1355 the non-proxy case, then use the root ("/").
1357 2003-12-19 Dan Winship <danw@ximian.com>
1359 * libsoup/soup-message-filter.c: New. An interface for objects
1360 that want to act on every message passing through a session.
1361 (Initially being used for authentication, but could also be used
1362 for cache handling, cookie management, etc.)
1364 * libsoup/soup-connection.c (class_init, etc): Add a message
1366 (send_request): If the connection has a message filter set, run
1367 it on the message before sending it.
1368 (soup_connection_connect_async, etc): When setting up a tunnel, if
1369 we get back a 407 and the session tries to requeue the message,
1370 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
1371 whether or not the proxy closed the connection).
1372 (soup_connection_connect_sync): Likewise
1373 (send_request, request_done): Ref/unref the connection
1375 * libsoup/soup-session.c (soup_session_get_type): Implement the
1376 SoupMessageFilter interface.
1377 (soup_session_get_connection): Use the session as the connection's
1379 (soup_session_add_filter, soup_session_remove_filter): Add/remove
1380 filters from the session
1381 (setup_message): do auth handling, and call each of the session's
1382 filters' setup_message methods as well.
1383 (soup_session_send_message_via): No longer needed.
1384 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
1386 * libsoup/soup-session-async.c (run_queue): Use
1387 soup_connection_send_request, since soup_session_send_message_via
1390 * libsoup/soup-session-sync.c (send_message): Likewise
1392 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
1393 response to a CONNECT is always keepalive, even if it's HTTP/1.0
1394 with no Connection header.
1396 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
1398 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
1399 gobject interface types.
1401 * tests/get.c (main): Add a -p flag to specify a proxy
1403 * tests/simple-proxy.c: Fix #includes
1405 2003-12-18 Dan Winship <danw@ximian.com>
1407 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
1408 disconnect the socket rather than just unreffing it, since the IO
1409 code may be holding an extra ref on it.
1410 (send_request): connect to the "restarted" signal too
1411 (request_restarted): Deal with "Connection: close"
1413 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
1414 not go into an infinite loop if the server only supports Basic.
1416 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
1418 * libsoup/Makefile.am: install soup-message-queue.h with the rest
1421 2003-12-17 Dan Winship <danw@ximian.com>
1423 * configure.in: Add gthread to glib check
1425 * libsoup/soup-session.c: Make this an abstract class.
1427 * libsoup/soup-session-async.c: A SoupSession class for
1428 asynchronous gmain-based operation; replaces the old SoupSession.
1430 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
1431 blocking operation for use with threaded apps.
1433 * libsoup/soup-types.h, libsoup/soup.h: add the new session
1436 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
1437 try to unref the socket if the socket creation fails.
1438 (soup_connection_reserve): New, to explicitly mark a connection as
1439 being in use without queueing a message on it.
1441 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
1442 "block" flag to not be reversed.
1444 * libsoup/soup-message.c (finished): set status to FINISHED here.
1445 (soup_message_cancel): Gone; needs to be done at the session
1448 * libsoup/soup-message-queue.c: Add a mutex and make all of the
1449 operations thread-safe.
1451 * libsoup/soup-socket.c (disconnect_internal): Make this
1453 (soup_socket_connect): Make the sync case work correctly.
1455 * libsoup/Makefile.am: add the SoupSession subclasses
1457 * tests/Makefile.am: libsoup depends on libgthread now, so
1458 revserver doesn't need to explicitly.
1460 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
1461 soup_session_async_new().
1463 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
1465 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
1468 2003-12-16 Joe Shaw <joe@ximian.com>
1470 * libsoup/soup-connection.c (socket_connect_result,
1471 soup_connection_connect_sync): Only set up a tunnel if the
1472 destination protocol is HTTPS.
1474 * libsoup/soup-message.c (class_init): Add a default handler for
1476 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
1477 (soup_message_cancel): Don't set the status to
1478 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
1479 status is already SOUP_MESSAGE_STATUS_FINISHED.
1481 * libsoup/soup-session.c (set_property): Don't cancel the session
1482 if the proxy URI set as a property isn't different from the old
1484 (get_host_for_message): Refactor some code so that we can easily
1485 get the right SoupSessionHost for proxies as well as from the
1487 (authenticate_auth): Take a gboolean proxy parameter. Check it to
1488 see which URI (message URI or proxy URI) to use for
1489 authentication. Add a long comment about lack of clarity in RFC
1490 2617 with respect to proxies and protection spaces.
1492 2003-12-15 Dan Winship <danw@ximian.com>
1494 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
1495 soup_socket_write): s/guint/gsize/ to match the definitions in
1496 soup-socket.c. #52167.
1498 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
1500 * libsoup/soup-soap-message.c: removed debugging of the messages here.
1502 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
1504 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
1505 added information for SOAP-ENV namespace.
1507 2003-12-10 Dan Winship <danw@ximian.com>
1509 * libsoup/soup-message-client-io.c (parse_response_headers): if we
1510 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
1511 message's http_version so the keep-alive handling is correct.
1512 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
1514 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
1515 "restarted" signal as suggested by Joe.
1517 * libsoup/soup-message-io.c (soup_message_io_finished): emit
1518 either "restarted" or "finished" as appropriate
1520 * libsoup/soup-session.c (soup_session_queue_message): Connect to
1521 "restarted" and run the queue if a message gets restarted
1523 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
1526 2003-12-10 Tambet Ingo <tambet@ximian.com>
1528 * configure.in: Use autoconfig to check for socklen_t ...
1530 * libsoup/soup-address.c: ... and remove it from here ...
1532 * libsoup/soup-dns.c: ... and here.
1534 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
1536 * libsoup/soup-soap-message.c (soup_soap_message_persist):
1537 (soup_soap_message_parse_response): print out request/response's
1538 contents, if in debug mode.
1540 2003-12-07 JP Rosevear <jpr@ximian.com>
1542 * configure.in: Bump version
1544 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
1546 * libsoup/soup-soap-response.[ch]
1547 (soup_soap_parameter_get_first_child,
1548 soup_soap_parameter_get_first_child_by_name,
1549 soup_soap_parameter_get_next_child,
1550 soup_soap_parameter_get_next_child_by_name): new functions to
1551 manage SoupSoapParameter's children.
1552 (soup_soap_response_get_first_parameter): dont return a GList, but
1553 a SoupSoapParameter contained in the GList.
1555 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
1557 * libsoup/soup-soap-response.[ch]
1558 (soup_soap_parameter_get_string_value): new function.
1560 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
1562 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
1563 structure, to "hide" the usage of xmlNode's.
1564 (soup_soap_parameter_get_name): functions to manage SOAP
1565 response parameters.
1566 (soup_soap_response_get_first_parameter,
1567 soup_soap_response_get_first_parameter_by_name,
1568 soup_soap_response_get_next_parameter,
1569 soup_soap_response_get_next_parameter_by_name):
1570 new functions for an easy access to the response's parameters.
1571 (soup_soap_response_from_string): removed warnings.
1573 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
1575 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
1578 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
1580 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
1581 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
1583 (finalize): NULL out new private fields.
1584 (soup_soap_response_from_string): added validation code.
1586 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
1588 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
1591 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
1594 * libsoup/Makefile.am: added new files.
1596 2003-11-18 Rodney Dawes <dobey@ximian.com>
1598 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
1600 2003-11-18 Rodney Dawes <dobey@ximian.com>
1602 * acinclude.m4: Add GTK_DOC_CHECK
1604 2003-11-18 Dan Winship <danw@ximian.com>
1606 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
1607 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
1609 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
1611 * Makefile.am: updates for gtk-doc
1612 (SUBDIRS): add back "docs"
1614 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
1615 aren't around any more
1617 * docs/reference/*: set up gtk-doc
1619 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
1620 "libsoup". Remove unused defines.
1622 * libsoup/soup-connection.c: Fix doc comments
1623 * libsoup/soup-message.c: Likewise
1624 * libsoup/soup-misc.c: Likewise
1625 * libsoup/soup-socket.c: Likewise
1626 * libsoup/soup-uri.c: Likewise
1628 * libsoup/soup-address.h: Fixes to please gtk-doc
1629 * libsoup/soup-connection.h: Likewise
1630 * libsoup/soup-message.h: Likewise
1631 * libsoup/soup-message-private.h: Likewise
1632 * libsoup/soup-misc.h: Likewise
1633 * libsoup/soup-server-auth.h: Likewise
1634 * libsoup/soup-socket.h: Likewise
1635 * libsoup/soup-status.h: Likewise
1637 2003-11-18 Dan Winship <danw@ximian.com>
1639 * configure.in: Fix up the SSL checks some. Remove some useless
1642 * libsoup/soup-misc.h: declare soup_ssl_supported.
1644 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
1646 * libsoup/soup-nossl.c: Not an SSL implementation, built if
1647 HAVE_SSL is not defined.
1649 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
1651 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
1653 (listen_watch): Deal with soup_socket_start_ssl failing.
1655 * libsoup/soup-connection.c (tunnel_connect_finished,
1656 socket_connect_result, soup_connection_connect_sync): Deal with
1657 the soup_socket_start_ssl failing.
1659 * libsoup/soup-server.c (soup_server_new): Deal with
1660 soup_ssl_get_server_credentials failing
1662 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
1664 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
1665 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
1666 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
1667 soup_soap_message_end_header,
1668 soup_soap_message_start_header_element,
1669 soup_soap_message_end_header_element, soup_soap_message_write_int,
1670 soup_soap_message_write_double, soup_soap_message_write_base64,
1671 soup_soap_message_write_time, soup_soap_message_write_string,
1672 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
1673 soup_soap_message_set_null, soup_soap_message_add_attribute,
1674 soup_soap_message_add_namespace,
1675 soup_soap_message_set_default_namespace,
1676 soup_soap_message_get_namespace_prefix,
1677 soup_soap_message_set_encoding_style, soup_soap_message_reset,
1678 soup_soap_message_persist): new functions from old SoupSerializer.
1680 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
1682 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
1683 soup_soap_message_new_from_uri): added a bunch of initialization
1685 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
1686 soup_soap_message_end_envelope, soup_soap_message_start_body,
1687 soup_soap_message_end_body, soup_soap_message_start_element,
1688 soup_soap_message_end_element):
1691 * configure.in: depend on libxml-2.0 for the SOAP code.
1693 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
1695 2003-11-17 Joe Shaw <joe@ximian.com>
1697 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
1700 * acinclude.m4: Include the gpg-error macros.
1702 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
1704 * libsoup/soup-soap-message.[ch]: new class to make it easier to
1705 build SOAP messages.
1707 * libsoup/Makefile.am: added new files.
1709 * configure.in: increased version number.
1711 2003-10-24 Joe Shaw <joe@ximian.com>
1713 * libsoup/soup-address.c (update_address_from_entry): Call
1714 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
1715 one in addr->priv->lookup. Fixes a crash on synchronous DNS
1718 * libsoup/soup-server.c (soup_server_new): We need to ref the
1719 address we're binding to, because soup_socket_get_local_address()
1722 2003-10-23 Dan Winship <danw@ximian.com>
1724 * libsoup/soup-socket.c (init): Initialize flags to default
1727 2003-09-23 Dan Winship <danw@ximian.com>
1729 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
1730 note whether or not the CA file has been loaded.
1731 (SoupGNUTLSChannel): add a "hostname" field.
1732 (verify_certificate): Remove the comment about not being able to
1733 verify the hostname because of soup problems. Now it's because of
1734 GNUTLS problems instead.
1735 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
1736 and takes a hostname and a creds argument now.
1737 (soup_ssl_get_client_credentials,
1738 soup_ssl_get_server_credentials): Return client/server credentials
1740 (soup_ssl_free_client_credentials,
1741 soup_ssl_free_server_credentials): and free them.
1743 * libsoup/soup-session.c (class_init, set_property, get_property):
1744 add ssl_ca_file property
1745 (get_host_for_message): when returning an SSL host for the first
1746 time, create a client credentials structure for the session.
1747 (run_queue): Pass the ssl creds to the new connection. Also fix an
1748 unrelated bug that caused infinite loops on "bad hostname".
1750 * libsoup/soup-server.c: Use GObject properties, including
1751 ssl_cert_file and ssl_key_file properties.
1752 (soup_server_new): Remove "protocol" argument; if the cert file
1753 and key file properties were set, create a server credential
1754 structure from them and pass that to soup_socket_server_new.
1756 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
1757 dest_uri to origin_uri to match RFC 2616 terminology. Add an
1759 (class_init, set_property, get_property): add SSL_CREDS property
1760 (soup_connection_connect_async, soup_connection_connect_sync):
1761 Pass ssl_creds to soup_socket_client_new calls.
1763 * libsoup/soup-socket.c: Use GObject properties, including an
1765 (soup_socket_set_flags): Gone (replaced with boolean properties)
1766 (soup_socket_new): Make this take a list of properties
1767 (listen_watch): copy ssl creds from listener to new socket
1768 (soup_socket_start_ssl): Pass remote hostname and socket creds
1769 structure to soup_ssl_wrap_iochannel.
1770 (soup_socket_client_new_async, soup_socket_client_new_sync,
1771 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
1774 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
1775 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
1776 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
1779 * tests/get.c: add a "-c CAfile" argument, for loading a CA
1780 certificate file to validate https connections against
1782 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
1783 arguments for loading an SSL server certificate. Only start an SSL
1784 server if those arguments were used.
1786 * tests/test-cert.pem:
1787 * tests/test-key.pem: SSL certificate for testing simple-httpd
1789 * tests/revserver.c: Update for API changes
1790 * tests/simple-proxy.c: Likewise
1792 2003-09-22 Dan Winship <danw@ximian.com>
1794 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
1797 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
1798 (soup_set_security_policy, soup_get_security_policy): Remove,
1799 since the GNUTLS backend doesn't actually implement it.
1800 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
1802 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
1805 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
1808 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
1809 soup_ssl_get_server_iochannel into a single function that takes a
1812 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
1813 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
1814 (soup_gnutls_set_security_policy): Gone
1816 * libsoup/soup-gnutls.h
1817 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
1820 * libsoup/soup-socket.c: Move soup_sockaddr_max
1821 #define here from soup-private.h
1822 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
1825 * libsoup/soup-private.h: Gone
1827 * libsoup/soup-address.c: Fix #includes for soup-private.h and
1829 * libsoup/soup-auth-digest.c: Likewise
1830 * libsoup/soup-auth.c: Likewise
1831 * libsoup/soup-connection-ntlm.c: Likewise
1832 * libsoup/soup-connection.c: Likewise
1833 * libsoup/soup-dns.c: Likewise
1834 * libsoup/soup-gnutls.c: Likewise
1835 * libsoup/soup-headers.c: Likewise
1836 * libsoup/soup-message-client-io.c: Likewise
1837 * libsoup/soup-message-handlers.c: Likewise
1838 * libsoup/soup-message-io.c: Likewise
1839 * libsoup/soup-message-server-io.c: Likewise
1840 * libsoup/soup-message.c: Likewise
1841 * libsoup/soup-server-message.c: Likewise
1842 * libsoup/soup-server.c: Likewise
1843 * libsoup/soup-session.c: Likewise
1844 * libsoup/soup-socket.c: Likewise
1845 * tests/auth-test.c: Likewise
1847 2003-09-19 Dan Winship <danw@ximian.com>
1849 * libsoup/soup-address.c (update_address_from_entry): free the
1852 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
1855 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
1856 iochannel initialization. Not sure how this worked before...
1858 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
1859 from soup_message_prepare (and a few things removed).
1861 * libsoup/soup-message-client-io.c (soup_message_send_request):
1862 s/soup_message_prepare/soup_message_cleanup_response/
1864 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
1865 with "\0" on the headers before passing them to the parse
1867 (io_read): Call soup_message_cleanup_response after returning an
1868 informational response so the data doesn't leak.
1870 * libsoup/soup-headers.c (soup_headers_parse): Update for
1871 soup-message-io.c:io_read change
1873 * libsoup/soup-server.c (soup_server_new,
1874 soup_server_new_with_host): Don't leak the SoupAddress.
1876 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
1878 (set_property): If the proxy uri changes, call
1879 soup_session_abort() and cleanup_hosts().
1880 (request_finished, final_finished): Fix a bug when requeuing
1883 * tests/libsoup.supp: valgrind suppression file for soup tests
1885 * tests/Makefile.am (EXTRA_DIST): dist it.
1886 (noinst_PROGRAMS): move the former check_PROGRAMS to
1887 noinst_PROGRAMS instead.
1889 2003-09-18 Dan Winship <danw@ximian.com>
1891 * libsoup/soup-message.c: Add wrote_informational and
1892 got_informational signals.
1894 * libsoup/soup-message-client-io.c (get_request_headers): Set the
1895 EXPECT_CONTINUE flag on the message if that header is set.
1897 * libsoup/soup-message-server-io.c (parse_request_headers):
1900 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
1901 when blocking on an expect-continue. Emit wrote_informational
1902 instead of wrote_headers in the 1xx case.
1903 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
1904 reading a 100 Continue response. Emit got_informational instead of
1905 got_headers in the 1xx case.
1907 * libsoup/soup-session.c (soup_session_send_message): Reorder
1908 things to deal with the fact that the message could finish right
1909 away if there is a connection available and the server is very
1912 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
1913 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
1915 2003-09-17 Dan Winship <danw@ximian.com>
1917 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
1918 (one that pruned too little, one that pruned too much).
1919 (queue_message): When requeuing, don't run the queue;
1920 final_finished will take care of that later.
1921 (soup_session_abort): New, to cancel all pending requests.
1923 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
1924 the socket while waiting for the address to resolve
1926 2003-09-17 Dan Winship <danw@ximian.com>
1928 * libsoup/soup-connection.c (soup_connection_new): Replaces the
1929 three previous soup_connection_new* functions and uses gobject
1930 properties to set the destination and proxy uris.
1931 (class_init): set up two more signals, authenticate and
1933 (soup_connection_send_request): virtualize
1934 (send_request): Default implementation
1936 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
1937 also handles NTLM authentication. Includes all of the NTLM code
1938 formerly in soup-auth-ntlm.c.
1940 * libsoup/soup-auth-ntlm.[ch]: Gone.
1942 * libsoup/soup-auth.c: Remove NTLM refs
1944 * libsoup/soup-session.c (class_init): Add gobject properties for
1945 proxy, max_conns, use_ntlm. Change the "authenticate" and
1946 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
1947 can be used for authenticating SoupConnectionNTLM as well, which
1948 doesn't use a SoupAuth).
1949 (soup_session_new): Renamed from soup_session_new_default.
1950 (soup_session_new_with_options): Replaces
1951 soup_session_new_with_proxy and soup_session_new_full. Takes
1953 (run_queue): Create a new connection of type SoupConnection or
1954 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
1955 to its authenticate and reauthenticate signals.
1956 (connection_authenticate, connection_reauthenticate): proxy these
1959 * libsoup/soup-address.c (update_address_from_entry): Fix a
1960 crasher when failing to resolve the address.
1962 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
1963 working before" bugs.
1965 * libsoup/soup-message-client-io.c (soup_message_send_request):
1966 call soup_message_prepare() to clean up the existing response
1969 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
1970 when processing an OK EOF.
1972 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
1973 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
1975 * tests/auth-test.c (authenticate, reauthenticate): Update for new
1977 (main): Use soup_session_new.
1978 * tests/get.c (main): Likewise.
1979 * tests/simple-proxy.c (main): Likewise.
1981 2003-09-10 Dan Winship <danw@ximian.com>
1983 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
1985 (invalidate_auth): Remove the call to soup_auth_invalidate.
1986 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
1987 contain authentication, then emit "authenticate" or
1988 "reauthenticate" (depending on whether or not this is the first
1989 time we've asked for a password for this auth).
1990 (update_auth_internal): If the server rejects our
1991 username/password, don't bail out immediately. Try doing a
1992 "reauthenticate" first.
1994 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
1996 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
1998 (soup_auth_invalidate): Remove this; it doesn't actually do
1999 anything useful for us.
2001 * libsoup/soup-auth-basic.c (invalidate): Remove
2002 * libsoup/soup-auth-digest.c: (invalidate): Remove
2003 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
2005 * libsoup/soup-uri.c: Remove all references to "authmech".
2006 (soup_uri_set_auth): Remove this too.
2008 * tests/auth-test.c: Update to use the "authenticate" and
2009 "reauthenticate" signals instead of encoding usernames and
2010 passwords in the URIs. Add a few more test cases.
2012 2003-09-10 Dan Winship <danw@ximian.com>
2014 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
2015 "status" field from here, since it's mostly used by SoupSession,
2016 which shouldn't need access to SoupMessagePrivate.
2018 * libsoup/soup-message.h (SoupMessage): Move it here.
2019 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
2020 (soup_message_set_uri): also moved from soup-message-private.h
2022 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
2024 * libsoup/soup-message-handlers.c:
2025 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
2027 * libsoup/soup-message-io.c (soup_message_io_client,
2028 soup_message_io_server, soup_message_io_unpause): Don't set up an
2029 idle handler, just jump right in to reading/writing; if this is a
2030 synchronous socket, then the caller wants to block, and if it's
2031 not, then we'll quickly get an EAGAIN anyway.
2033 * libsoup/soup-session.c: (queue_message): Likewise.
2034 (*) Update for SoupMessageStatus move and remove
2035 soup-message-private.h include.
2037 * libsoup/soup-server-message.c: Remove soup-message-private.h
2040 * libsoup/soup-server.c: Likewise.
2042 * libsoup/soup-connection.c (soup_connection_is_connected,
2043 soup_connection_is_new): Remove these, since they weren't being
2046 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
2047 avoid namespace pollution.
2049 * libsoup/soup-auth-digest.c: Update for that.
2050 * libsoup/soup-server-auth.c: Likewise
2052 * tests/auth-test.c: Remove soup-message-private.h include
2054 2003-09-09 Dan Winship <danw@ximian.com>
2056 Beginnings of improved synchronous API support
2058 * libsoup/soup-dns.c: Simplify this by making it not automatically
2059 return the result: force the caller to poll. (This isn't really a
2060 performance issue: the results should come back quickly anyway.)
2061 Also, make the cache thread-safe.
2062 (soup_dns_entry_from_name): Was soup_gethostbyname
2063 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
2064 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
2065 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
2066 blocks if it's not resolved yet).
2068 * libsoup/soup-address.c: Update for soup-dns changes.
2069 (soup_address_new): Don't automatically start resolving the
2070 hostname now, since we don't know if the caller is going to want
2071 it resolved synchronously or asynchronously.
2072 (soup_address_resolve_async): Renamed from soup_address_resolve.
2073 (soup_address_resolve_sync): New routine to do blocking
2076 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
2077 status value directly when connecting synchronously.
2078 (soup_socket_client_new_async, soup_socket_client_new_sync):
2079 Separate async/sync client socket functions.
2080 (soup_socket_get_iochannel): Made static since it was not used
2081 outside soup-socket.
2083 * libsoup/soup-connection.c (soup_connection_new,
2084 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
2085 up the data, don't actually start connecting.
2086 (soup_connection_connect_async, soup_connection_connect_sync): New
2087 async and sync SoupConnection connecting routines.
2088 (soup_connection_get_socket): Remove this since it wasn't being
2091 * libsoup/soup-session.c (final_finished): Run the queue since a
2092 connection is now freed up.
2093 (run_queue): Update for soup_connection_new* changes.
2095 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
2096 wasn't being used any more.
2098 * libsoup/soup-private.h: Remove some prototypes for functions
2099 that no longer exist.
2101 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
2102 (copies the protocol, host, and port of a SoupUri).
2104 * tests/auth-test.c:
2106 * tests/simple-proxy.c: belatedly update for soup-session change
2108 * tests/revserver.c: Handle each new connection in its own thread,
2109 using synchronous SoupSocket calls.
2111 2003-09-05 Dan Winship <danw@ximian.com>
2113 * libsoup/soup-session.c: Move a bunch of logic here from
2114 soup-context. Now the session keeps track of hosts (instead of
2115 having a global soup_hosts hash) and their connections.
2116 (soup_session_new_with_proxy, soup_session_new_full): New session
2117 constructors to specify a proxy or a proxy and connection limits
2118 (send_request): Add Authorization and Proxy-Authorization headers
2119 before sending off the request.
2120 (soup_session_queue_message, et al): Improve the way this works.
2121 There's no need to use timeouts to wait for connections to become
2122 free; we *know* when they become free.
2124 * libsoup/soup-private.h: Remove SoupHost and some other
2125 no-longer-used stuff.
2127 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
2128 soup_set_connection_limit, soup_set_connection_limit): Gone. These
2129 are all per-session now.
2131 * libsoup/soup-message.c: Remove all SoupContext references
2132 (mostly replaced with SoupUri references)
2133 (cleanup_message): priv->connect_tag and priv->connection are gone
2134 now, so this was just soup_message_io_cancel(). So remove
2135 cleanup_message and replace it with that everywhere.
2136 (soup_message_disconnect): Gone.
2137 (soup_message_set_uri): Replaces soup_message_set_context.
2138 (soup_message_set_connection, soup_message_get_connection): Gone
2140 * libsoup/soup-message-server-io.c (parse_request_headers):
2141 s/soup_message_set_context/soup_message_set_uri/
2143 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
2144 connect_tag, context, and connection.
2146 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
2148 * libsoup/soup-context.c: Gone
2150 * tests/auth-test.c (identify_auth): update for session/context
2153 2003-09-03 Dan Winship <danw@ximian.com>
2155 * libsoup/soup-status.h: Renamed from soup-error.h, with types
2156 and defines renamed accordingly.
2158 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
2159 status_code and errorphrase to reason_phrase. Remove errorclass.
2160 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
2161 as being either "errors" or "not errors", so its semantics are
2162 guaranteed to be wrong sometimes.
2164 * libsoup/soup-message.c (soup_message_set_status,
2165 soup_message_set_status_full): Renamed
2167 * libsoup/soup-message-handlers.c
2168 (soup_message_add_status_code_handler,
2169 soup_message_add_status_class_handler): Rename.
2171 * libsoup/soup-session.c (soup_session_send_message): Make this
2172 return a status code rather than a status class.
2174 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
2175 unrelated unused fields (retries, callback, user_data).
2179 2003-09-02 Dan Winship <danw@ximian.com>
2181 * libsoup/soup-session.c: First draft at the new object to
2182 maintain formerly-global state. (Not yet complete; still need to
2183 get rid of SoupContext).
2185 * libsoup/soup-message-queue.c: Data structure used by SoupSession
2187 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
2188 some bits went into soup-connection.
2190 * libsoup/soup-connection.c (soup_connection_send_request): New,
2191 to send a request on a connection. The connection updates its
2192 internal state and then hands off to soup_message_send_request.
2193 (request_done): Callback set up by soup_connection_send_request.
2194 Marks the connection as no-longer-in-use, and disconnects it if
2195 the message says to.
2196 (soup_connection_set_in_use, soup_connection_mark_old): No longer
2197 needed; the connection takes care of this itself now.
2198 (soup_connection_new_proxy): New, to create a new connection that
2199 is explicitly marked as being through an HTTP proxy.
2200 (soup_connection_new_tunnel): New, to create a new HTTPS
2201 connection through a proxy. (Includes the code to send the
2204 * libsoup/soup-context.c (try_existing_connections): Don't need to
2205 call soup_connection_set_in_use.
2206 (try_create_connection): Use soup_connection_new,
2207 soup_connection_new_proxy, or soup_connection_new_tunnel as
2210 * libsoup/soup-message.c (soup_message_prepare): Replaces
2212 (soup_message_queue, soup_message_requeue, soup_message_prepare):
2213 Gone. This must be done via a SoupSession now.
2214 (soup_message_set_connection): don't need to mark in_use/not
2215 in_use. Also, msg->priv->socket is gone now.
2216 (soup_message_get_socket): Gone.
2218 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
2219 Remove references to global handlers.
2220 (redirect_handler, authorize_handler): Moved to soup-session.c.
2222 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
2223 session to shut down now.
2225 * libsoup/soup.h: add soup-session.h
2227 * libsoup/Makefile.am: updates
2229 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
2232 2003-08-29 Dan Winship <danw@ximian.com>
2234 * libsoup/soup-message-io.c: Major rewrite. There is now only a
2235 single IO state object (instead of one for reading and one for
2236 writing), and the IO code handles switching back and forth between
2237 reading and writing as appropriate (including handling the extra
2238 switches needed for "Expect: 100-continue").
2239 (soup_message_io_client, soup_message_io_server): The new entry
2241 (soup_message_io_cancel): If the caller cancels the IO when we
2242 were expecting to read more data, disconnect the socket.
2244 * libsoup/soup-message.h (SoupMessageFlags): add
2245 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
2246 do the special expect-continue handling.
2248 * libsoup/soup-message.c: Move all the signal stuff here. Remove
2249 the "done_reading" and "done_writing" signals and replace them
2250 with a single "finished" signal. (A single signal. Say that 10
2252 (soup_message_got_headers, etc): Functions to emit signals.
2253 (got_headers, got_chunk, got_body): Default signal methods that
2254 call soup_message_run_handlers.
2255 (finished): Default signal method that replaces
2256 soup_message_issue_callback.
2257 ([various]): s/soup_message_issue_callback/soup_message_finished/
2258 (soup_message_requeue): There's no soup_message_set_read_callbacks
2259 any more, so if the caller requeues while it's still reading, just
2261 (soup_message_add_chunk, soup_message_add_final_chunk,
2262 soup_message_pop_chunk): Moved here from soup-server-message,
2263 although we don't actually quite support using chunked encoding
2266 * libsoup/soup-server-message.c (soup_server_message_new): No
2267 longer takes a socket argument.
2268 (soup_server_message_add_chunk, soup_server_message_get_chunk):
2269 Moved into SoupMessage.
2271 * libsoup/soup-message-handlers.c (global_handlers): Make these
2272 POST_BODY rather than PRE_BODY, so they won't mess up the IO
2273 channel when the requeue the message.
2274 (soup_message_run_handlers): Don't need to issue the message
2275 callback from here any more.
2276 (authorize_handler): Just leave the error as 401 or 407 (see
2277 soup-error.h change)
2279 * libsoup/soup-message-client-io.c (soup_message_send_request):
2280 Replaces soup_message_write_request and
2281 soup_message_read_response.
2283 * libsoup/soup-message-server-io.c: Parallel to
2284 soup-message-client-io.c, this defines the server-side header
2286 (soup_message_read_request): Its entry point.
2288 * libsoup/soup-server.c: Lots of code moved into
2289 soup-message-server-io.c. Update for other changes.
2291 * libsoup/soup-queue.c: Update for changes
2293 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
2294 Don't call soup_socket_disconnect() on an error, just return
2295 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
2296 signals that will mess up the caller of the read/write function.
2298 * libsoup/soup-connection.c (soup_connection_disconnect): When
2299 disconnecting the socket, disconnect from its signals first to
2300 prevent bad reentrancy.
2302 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
2303 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
2304 anything that SOUP_ERROR_UNATHORIZED and
2305 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
2306 "transport" errors actually are transport-related.)
2308 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
2310 * tests/simple-proxy.c: Complicate this a bunch. In particular,
2311 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
2312 pass the data back to the client in chunked format.
2314 2003-08-27 Dan Winship <danw@ximian.com>
2316 * libsoup/soup-types.h: New header with typedefs, to avoid
2317 #include loops among other headers.
2319 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
2321 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
2323 2003-08-26 Dan Winship <danw@ximian.com>
2325 * libsoup/soup-message-client-io.c (soup_message_write_request,
2326 soup_message_read_response): Higher-than-soup-message-io-level
2327 functions to do client-side IO. (Code that used to be in
2329 (get_request_header_cb): Fix a bug in the generation of the Host:
2330 header; need to include the port number if it's not the default.
2332 * libsoup/soup-message-io.c (soup_message_write,
2333 soup_message_write_simple): Take separate user_datas for the get_*
2334 callbacks and the done callbacks.
2336 * libsoup/soup-queue.c: Update to use soup_message_write_request
2337 and soup_message_read_response.
2339 * libsoup/soup-connection.c (soup_connection_new): Change the
2340 prototype to take a SoupUri and a callback.
2342 * libsoup/soup-context.c (try_create_connection,
2343 soup_context_connect_cb): Update for soup_connection_new change.
2345 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
2346 for soup_message_write changes
2348 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
2351 2003-08-26 Dan Winship <danw@ximian.com>
2353 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
2354 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
2355 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
2357 * libsoup/soup-message.c (class_init): set up signals
2358 (requeue_read_finished): Update for changes.
2360 * libsoup/soup-message-io.c (soup_message_read): Split out
2361 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
2362 arg to say where to store the message body. Set up
2363 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
2365 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
2366 (read_body_chunk): emit READ_CHUNK.
2367 (issue_final_callback): Set r->body. emit READ_BODY.
2368 (failed_read): emit READ_ERROR.
2369 (soup_message_read_set_callbacks): Disconnect old signal handlers,
2371 (soup_message_read_cancel): Disconnect signal handlers.
2372 (soup_message_write, soup_message_write_simple): Set up
2373 wrote_body_cb and error_cb as signal handlers.
2374 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
2375 nothing currently ever listens for them. emit WROTE_BODY when
2377 (failed_write): emit WRITE_ERROR
2379 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
2380 soup_queue_read_headers_cb): Split this into two unequal chunks.
2381 (read_header_cb only runs the pre-body handlers).
2382 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
2384 (soup_queue_write_done_cb): Update call to soup_message_read
2386 * libsoup/soup-server.c (parse_headers_cb): Renamed from
2388 (read_done_cb): Update prototype
2389 (start_request): Update soup_message_read call.
2391 2003-08-25 Dan Winship <danw@ximian.com>
2393 * libsoup/soup-message-io.c (soup_message_read,
2394 soup_message_write, soup_message_write_simple): Add a "user_data"
2395 arg, pass it to the callbacks.
2397 * libsoup/soup-message.c (soup_message_requeue,
2398 requeue_read_finished, requeue_read_error): Update for that
2400 * libsoup/soup-queue.c: Likewise
2402 * libsoup/soup-server.c: Likewise
2404 2003-08-25 Dan Winship <danw@ximian.com>
2406 * libsoup/soup-message.c (soup_message_new): Take a uri string
2407 instead of a context. Also, swap the args (so the method comes
2408 before the URI, just like in the protocol).
2409 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
2410 SoupUri instead of a string
2411 (soup_message_set_request, soup_message_set_response): Replace
2412 soup_message_new_full.
2413 (cleanup_message): Was soup_message_cleanup, but is static now.
2414 (queue_message): Do the pre-queuing message cleanup here instead
2415 of in soup_queue_message.
2416 (soup_message_queue): Set the callback and user_data, then call
2418 (requeue_read_error, requeue_read_finished, soup_message_requeue):
2420 (soup_message_get_uri): Replaces soup_message_get_context.
2422 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
2423 part of SoupMessagePrivate now)
2425 * libsoup/soup-context.c: #include soup-message-private
2426 (soup_context_from_uri): constify the uri arg.
2428 * libsoup/soup-queue.c: Various context/uri fixes
2429 (proxy_https_connect): Use soup_message_new_from_uri.
2430 (soup_queue_message): Drastically simplified since most of the
2431 work is in soup-messsage.c:queue_message() now
2433 * libsoup/soup-auth-digest.c (compute_response,
2434 get_authorization): Use soup_message_get_uri.
2436 * libsoup/soup-server-auth.c (parse_digest): Likewise
2438 * libsoup/soup-server.c (call_handler): Likewise
2440 * tests/simple-httpd.c (server_callback): Likewise.
2442 * tests/simple-proxy.c (server_callback): Likewise
2444 * tests/get.c (got_url): Likewise.
2445 (get_url): Update soup_message_new usage.
2447 * tests/auth-test.c: #include soup-message-private. Update for
2448 context changes and soup_message_new change.
2450 2003-08-22 Dan Winship <danw@ximian.com>
2452 * libsoup/soup-message-private.h: New file containing
2453 SoupMessagePrivate and some other soup-message-internal
2454 types/functions. Also includes the new, expanded SoupMessageStatus
2457 * libsoup/soup-message-io.c: Replaces what used to be in
2458 soup-transfer, but now all the interfaces take SoupMessages
2459 instead of SoupReader/SoupWriter and deal with maintaining
2460 msg->priv->{read,write}_state themselves. Fixes up all the
2461 refcounting madness.
2463 * libsoup/soup-message-handlers.c: Move the handler code here,
2464 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
2465 to make the distinction from SoupHandlerKind clearer.)
2467 * libsoup/soup-message.c: Update for soup-message-io and new
2468 SoupMessageStatus values. Remove handler code.
2469 (soup_message_cleanup): Remove the hack to try to preserve the
2470 connection if the message gets cleaned up before it finishes
2471 reading. soup_message_requeue handles this in the requeuing case,
2472 and there's no especially compelling reason to bother doing it in
2473 any other case. (And the soup-message-io api doesn't support
2474 having a read operation that's not connected to any message.)
2476 * libsoup/soup-private.h: remove SoupMessagePrivate
2478 * libsoup/soup-queue.c: Update for soup-message-io and new
2479 SoupMessageStatus values.
2481 * libsoup/soup-server-message.c: Likewise
2483 * libsoup/soup-server.c: Likewise
2485 * libsoup/soup-transfer.c: Gone (yay)
2487 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
2489 2003-08-20 Dan Winship <danw@ximian.com>
2491 * libsoup/soup-message.c: Make this a GObject. (Note that since
2492 SoupMessage was not refcounted before, it's not really refcounted
2494 (soup_message_free): Gone, replaced by g_object_unref
2495 (soup_message_copy, soup_message_foreach_remove_header): Remove
2496 these, since neither was currently functional.
2497 (soup_message_is_keepalive): New utility function to look at
2498 HTTP version and request/response headers to decide if a message
2499 indicates the connection should be kept alive.
2500 (soup_message_set_connection, soup_message_get_connection): New
2501 (soup_message_get_socket): New
2503 * libsoup/soup-server-message.c: Make this a subclass of
2505 (soup_server_message_new): Now takes a SoupServer and SoupSocket
2506 (soup_server_message_get_server): New
2507 (soup_server_message_set_encoding,
2508 soup_server_message_get_encoding): Get/set whether the message
2509 should be sent with content-length or chunked encoding
2510 (soup_server_message_is_started, soup_server_message_is_finished):
2511 Private member accessors.
2512 (soup_server_message_add_chunk): Renamed from add_data
2513 (soup_server_message_get_chunk): Pops a chunk from the list.
2514 (soup_server_message_get_source): Gone
2516 * libsoup/soup-server.c: Update for SoupServerMessage changes.
2517 (error_cb, write_done_cb): All the cleanup stuff that used to be
2518 here happens automatically by unreffing the message now.
2519 (get_response_header): Remove some erroneous leftover CGI stuff
2520 (issue_bad_request): add "Connection: close" to the response.
2521 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
2522 with no Host header as per RFC 2616.
2524 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
2525 (soup_connection_set_in_use): Let the caller set the connection to
2526 "not in use" even after the socket has been disconnected.
2528 * libsoup/soup-context.c: Use soup_message_get_connection
2530 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
2531 check on request length, since it was rejecting
2532 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
2534 * libsoup/soup-queue.c: Use soup_message_get_connection and
2535 soup_message_get_socket.
2536 (soup_queue_read_done_cb): Use soup_message_is_keepalive
2537 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
2538 soup_connection_start_ssl
2540 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
2541 handlers if the socket hasn't been disconnected yet.
2543 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
2544 reader_read): Fix these so that reader_read will exit properly if
2545 the read is cancelled.
2547 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
2549 * tests/simple-httpd.c (server_callback): set the message to
2550 content-length encoding.
2551 * tests/simple-proxy.c (server_callback): Likewise
2553 2003-08-19 Dan Winship <danw@ximian.com>
2555 * libsoup/soup-socket.c (soup_socket_read,
2556 soup_socket_read_until, soup_socket_write): New API for doing
2557 socket IO. Works both synchronously and asynchronously, and
2558 buffers data to prevent the "100 Continue" problem.
2559 (soup_socket_set_flag): Replaces formerly-private
2560 soup_set_sockopts. (primarily to let the caller turn off
2561 SOUP_SOCKET_FLAG_NONBLOCKING).
2563 * libsoup/soup-transfer.c (soup_transfer_read,
2564 soup_transfer_write, soup_transfer_write_simple): Take a
2565 SoupSocket instead of a GIOChannel. Use the new socket IO api.
2566 Changed the prototypes of some of the callbacks to be less
2569 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
2570 soup_connection_get_iochannel.
2572 * libsoup/soup-message.c: Fix up for soup-transfer changes
2574 * libsoup/soup-queue.c: Likewise
2576 * libsoup/soup-server.c: Likewise
2578 * tests/revserver.c: A slightly more complicated replacement for
2579 timeserver. (Does both reads and writes)
2581 2003-08-19 Dan Winship <danw@ximian.com>
2583 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
2584 configure it, and no one has complained, and it looks like the
2585 SOCKS5 auth code doesn't actually work anyway...
2587 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
2589 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
2590 SOUP_PROTOCOL_SOCKS5
2592 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
2594 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
2597 2003-08-19 Dan Winship <danw@ximian.com>
2599 * libsoup/soup-server.c: Make this a GObject. Remove
2600 SoupServerMessage code (to soup-server-message.c). Remove CGI
2601 server code (for now?)
2602 (soup_server_add_handler, soup_server_remove_handler): Rename
2603 (from register/unregister) to make it clearer what they do.
2605 * libsoup/soup-server-message.c: Moved out of soup-server.c
2607 * libsoup/soup-private.h: Remove SoupServer def
2609 * libsoup/Makefile.am (libsoupinclude_HEADERS,
2610 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
2612 * tests/simple-httpd.c:
2613 * tests/simple-proxy.c: Update for SoupServer changes
2615 2003-08-18 Dan Winship <danw@ximian.com>
2617 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
2618 a struct sockaddr again (like it used to be). In particular, add
2619 back the "port" field. Add a bunch of macros to try (and fail) to
2620 simplify some of the code.
2621 (soup_address_new): Now returns a SoupAddress directly rather than
2622 a random handle, and the caller can just use g_object_unref to
2623 cancel the lookup. Also, the callback now uses a
2624 SoupKnownErrorCode rather than a special-purpose address-lookup
2626 (soup_address_new_cancel): No longer needed.
2627 (soup_address_new_sync): Removed
2628 (soup_address_new_any): Replaces soup_address_ipv4_any and
2629 soup_address_ipv6_any.
2630 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
2632 (soup_address_get_physical): Renamed from
2633 soup_address_get_canonical_name.
2634 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
2636 * libsoup/soup-socket.c: Update for SoupAddress changes and make
2637 similar changes here.
2638 (soup_socket_new): Just creates a generic SoupSocket now.
2639 (soup_socket_connect): Client setup
2640 (soup_socket_listen): Server setup. Now also sets up an iochannel
2641 listening for connects and emits a "new_connection" signal as they
2643 (soup_socket_start_ssl): Turns on SSL.
2644 (soup_socket_client_new, soup_socket_server_new): Utility
2645 functions that wrap the above.
2646 (soup_socket_new_cancel, soup_socket_new_sync): Gone
2647 (soup_socket_server_accept, soup_socket_server_try_accept): No
2649 (soup_socket_get_iochannel): No longer adds a ref when returning
2650 the iochannel. Also, we set it to "close_on_unref" so that if a
2651 caller adds a ref to it, the connection will actually remain open
2652 even after the SoupSocket is destroyed.
2653 (soup_socket_get_local_address, soup_socket_get_remote_address):
2654 Let the caller get both of these.
2656 * libsoup/soup-connection.c: Don't keep a private copy of the
2658 (soup_connection_new): Don't need to set socket options here.
2660 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
2661 (soup_connection_get_iochannel): Just return the socket's
2662 iochannel (and don't ref it)
2664 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
2665 SOUP_ERROR_CANT_RESOLVE_PROXY
2667 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
2668 Remove the "FIXME add a CANT_RESOLVE error" and return
2669 SOUP_ERROR_CANT_RESOLVE instead.
2671 * libsoup/soup-server.c: Update for socket/address changes. Don't
2672 poke into SoupSocket's private fields.
2673 (soup_server_run_async): Just connect to the socket's
2674 "new_connection" signal.
2676 * libsoup/soup-context.c (try_create_connection,
2677 soup_context_connect_cb): Update for socket changes. Replace
2678 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
2680 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
2681 to connect to a signal handler and connect another function to
2682 clean up the first signal handler after its first invocation.
2683 (Lets us use signals to replace one-off callbacks.)
2685 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
2686 actually private now.
2687 (struct _SoupServer): Remove accept_tag.
2689 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
2690 Don't unref the iochannel.
2691 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
2693 * libsoup/soup-socks.c: Update for socket/address changes
2695 * tests/simple-httpd.c (main):
2696 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
2697 * tests/simple-proxy.c (main): Likewise
2699 * tests/timeserver.c: Update for SoupSocket's "new_connection"
2700 signal, and for SoupAddress changes.
2702 2003-08-14 Dan Winship <danw@ximian.com>
2704 * libsoup/soup-connection.c: New, split out from soup-context and
2705 made into a GObject.
2706 (soup_connection_disconnect): Disconnects the connection and emits
2707 a signal. (Replaces the old "keep_alive" flag.)
2708 (soup_connection_is_connected): Checks if the connection is still
2710 (connection_died): Just disconnect, rather than freeing the
2711 connection. This way if anyone else is still referencing it they
2712 won't end up with an invalid pointer.
2714 * libsoup/soup-context.c: Make this a GObject, remove all the
2715 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
2716 SoupContext can keep track of connection auth stuff there without
2717 SoupConnection needing to care. Various other updates.
2719 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
2722 * libsoup/*.c, tests/get.c: Update for context/connection changes
2724 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
2725 definition to deal with the fact that there's no
2726 soup_connection_get_context any more.
2728 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
2729 with connection persistence here.
2730 (soup_queue_read_done_cb): Do it here instead. Disconnect the
2731 connection when appropriate.
2732 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
2733 Reference-count the connection properly. (I think.)
2735 * libsoup/soup-marshal.list: New, for SoupConnection's
2736 "disconnected" signal.
2738 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
2740 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
2741 GLIB_GENMARSHAL gets set too.
2743 2003-08-14 Dan Winship <danw@ximian.com>
2745 * libsoup/soup-error.c: Fix a spelling mistake.
2747 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
2749 2003-08-12 Dan Winship <danw@ximian.com>
2751 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
2752 of the interfaces around a little bit.
2754 * libsoup/soup-auth-basic.c: subclass for Basic auth
2756 * libsoup/soup-auth-digest.c: subclass for Digest auth
2758 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
2759 the code from soup-ntlm.c here, and make it private.
2761 * libsoup/soup-ntlm.c: gone
2763 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
2764 here, and change the signature of SoupAuthorizeFn.
2766 * libsoup/soup-context.c: Use g_object_unref to free auths, use
2767 methods instead of directly access private fields.
2769 * libsoup/soup-queue.c: Likewise
2771 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
2772 NTLM references. We have no plans to implement server-side NTLM
2775 * tests/auth-test.c (identify_auth): Update for auth api changes
2777 2003-08-12 Dan Winship <danw@ximian.com>
2779 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
2782 * libsoup/soup-address.c: Make this a GObject.
2783 (soup_address_ref, soup_address_unref): Gone.
2784 (soup_address_copy): Gone. Wasn't being used anyway.
2786 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
2787 here from soup-address.c, so that soup-address doesn't need to
2788 worry about trying to cache zero-ref addresses.
2790 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
2791 consistently for port numbers.
2792 (soup_socket_ref, soup_socket_unref): Gone.
2794 * libsoup/soup-private.h: Change the SoupSocket definition to be
2795 SoupSocketPrivate. (Still need to keep this here since soup-server
2796 pokes around in its internals.)
2797 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
2799 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
2800 reader/writer rather than leaking them.
2802 * libsoup/*: Use GObject methods for socket/address refcounting
2804 * tests/auth-test.c (main)
2805 * tests/timeserver.c (main): Call g_type_init.
2807 * tests/get.c (main): Call g_type_init.
2808 (get_url, got_url): Fix some bugs that could make -r mode get into
2809 infinite loops downloading the same files over and over. Plug some
2810 memory leaks to make this more useful for valgrinding libsoup.
2812 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
2813 handler for SIGINT so we can exit cleanly, since valgrind won't
2814 give a leak report if you don't. Plug a few memory leaks.
2816 * tests/simple-proxy.c (main): Likewise
2818 2003-08-12 Dan Winship <danw@ximian.com>
2820 Pull over some new test programs from the soup-refactoring branch,
2821 along with the SoupUri changes they depend on.
2823 * tests/simple-httpd.c: A really simple HTTP server, to test the
2826 * tests/simple-proxy.c: An even simpler HTTP proxy
2828 * tests/get.c: Add "-r" flag to recursively get files (thereby
2829 testing multiple-connections-at-once code). Also good for setting
2830 up a tree to use with simple-httpd.
2832 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
2835 * tests/uri-parsing.c: Regression test for the new soup-uri.c
2837 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
2838 pull in some optimizations from camel-url. Also, make SoupProtocol
2839 a GQuark so we can still compare them with ==, but we can also
2840 recognize any protocol.
2841 (soup_uri_new_with_base): New, to merge base and relative URIs
2842 (soup_uri_to_string): Update this. Change the "show_password" flag
2843 (which we always passed FALSE for) to "just_path", for places that
2844 want the path+query without the protocol, host, etc.
2846 * libsoup/soup-queue.c (soup_get_request_header): Just use
2847 soup_uri_to_string to generate the request URI.
2849 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
2850 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
2851 the URI by hand badly.
2852 * libsoup/soup-server-auth.c (parse_digest): Likewise
2854 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
2855 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
2858 * libsoup/soup-context.c (soup_context_uri_hash,
2859 soup_context_uri_equal): s/querystring/query/
2861 2003-08-12 Dan Winship <danw@ximian.com>
2863 * configure.in: Bump API version to 2.2 and package version to
2864 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
2865 libgnutls-config to find GNUTLS.
2867 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
2869 * Makefile.am: Update for pc file rename
2871 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
2872 and libsoup-ssl-proxy stuff.
2874 * libsoup/soup-ssl-proxy.c
2875 * libsoup/soup-nss.[ch]
2876 * libsoup/soup-openssl.[ch]: gone
2878 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
2880 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
2881 auth_test_LDADD): Update libsoup version
2883 2003-08-07 Dan Winship <danw@ximian.com>
2885 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
2886 soup_auth_invalidate): These are all really SoupContext functions,
2887 so move them to soup-context.c (and rename them appropriately).
2888 (soup_auth_get_protection_space): New method to get the
2889 "protection space" of an auth (paths where it is valid).
2890 (soup_auth_invalidate): New method to try to un-authenticate an
2891 auth (so we can keep the domain info cached even if the auth info
2893 (basic_pspace_func): Basic protection space is all directories
2894 below the current one.
2895 (basic_invalidate_func): Clear the encoded username/password
2896 (digest_pspace_func): Digest protection space is either the whole
2897 server, or "what the domain parameter says" (though we don't deal
2898 with cross-host domains).
2899 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
2901 (digest_parse_func, digest_free): Set/free domain parameter
2902 (ntlm_pspace): NTLM protection space is always the whole server.
2903 (ntlm_invalidate): Clear the auth state.
2904 (soup_auth_new_ntlm): Make this non-static
2905 (SoupAuth): Replace the quad-state "status" field with an
2906 "authenticated" boolean.
2908 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
2909 hash with separate "auth_realms" (path->realm) and "auths"
2910 (realm->auth) hashes. Also add a "use_ntlm" flag.
2912 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
2914 (connection_free): Don't the connection's auth, just free it.
2915 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
2916 does two-stage lookup (path->realm then realm->auth) and also
2917 deals with NTLM hacks.
2918 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
2919 but also large parts of authorize_handler. Updates the auth hashes
2920 based on information from a 401 or 407 response. Does a better job
2921 than authorize_handler did of not throwing away good information.
2922 (soup_context_preauthenticate): New; fakes up auth info so that
2923 requests will end up using authentication without the server
2924 needing to return an error first.
2925 (soup_context_authenticate_auth): Moved out of authorize_handler
2926 so it can be used at request-sending time too, if we know that we
2927 need it. (That way we can avoid requeuing the request if it isn't
2928 going to be able to be authenticated.)
2929 (soup_context_invalidate_auth): Sort of like the old
2930 soup_auth_invalidate, but only destroys the auth data, while still
2931 remembering the path->realm mapping.
2933 * libsoup/soup-message.c (authorize_handler): Mostly moved into
2934 soup_context_update_auth.
2935 (maybe_validate_auth): Remove this; it was only useful because of
2936 bugs elsewhere in the auth handling.
2938 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
2939 soup_context_lookup_auth. If the returned auth isn't
2940 authenticated, call soup_context_authenticate_auth() on it.
2942 * tests/auth-test.c: New (from soup-refactoring branch). Tests
2943 that the Basic/Digest auth code does the right thing. (TODO: find
2944 a good way to add NTLM tests too.)
2946 * tests/Makefile.am (check_PROGRAMS): add auth-test
2948 2003-07-29 Dan Winship <danw@ximian.com>
2950 * configure.in: 1.99.25 ("Potato and Leek Soup")
2952 * libsoup/soup-message.c (requeue_read_finished,
2953 release_connection): Free the passed-in body data. Otherwise the
2954 response body ends up getting leaked on most 3xx and 4xx
2956 (soup_message_cleanup): Remove a piece of code that didn't
2957 actually do anything and its associated confused comment.
2959 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
2961 * libsoup/soup-context.c (connection_free): plug a non-occasional
2964 2003-06-26 Joe Shaw <joe@ximian.com>
2966 * configure.in: Version 1.99.24
2968 2003-06-24 Dan Winship <danw@ximian.com>
2970 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
2971 it, and (b) depends on lots of new things sometimes (like on RH9).
2973 * libsoup/soup-openssl.c:
2974 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
2975 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
2978 2003-06-19 Dan Winship <danw@ximian.com>
2980 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
2981 old read_tag before changing/clearing it.
2982 (soup_queue_write_done_cb): Likewise with the write_tag.
2984 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
2985 around the stop+callback.
2986 (soup_transfer_write_cb): Likewise.
2988 2003-06-12 Dan Winship <danw@ximian.com>
2990 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
2992 (soup_transfer_read, create_writer): Set initial ref_count to 2
2993 (one for soup-transfer, one for the caller).
2994 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
2996 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
2997 drops soup-transfer's ref.
2998 (soup_transfer_read_cancel): Now just a stop+unref
2999 (soup_transfer_write_ref, soup_transfer_write_unref,
3000 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
3002 * libsoup/soup-message.c (soup_message_cleanup): when setting up
3003 the "finish reading" callbacks, unref the reader so it will be
3004 destroyed once it's done reading.
3005 (soup_message_requeue): Likewise.
3007 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
3008 prototype change (no longer returns a SoupTransferDone).
3009 (soup_queue_read_chunk_cb): Likewise.
3011 * libsoup/soup-server.c (read_headers_cb): Likewise
3013 2003-06-11 Dan Winship <danw@ximian.com>
3015 * libsoup/soup-transfer.c: Change all functions to take a
3016 SoupReader * or SoupWriter * instead of a guint.
3018 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
3019 write_tag pointers instead of guints.
3021 2003-06-02 Chris Toshok <toshok@ximian.com>
3023 * libsoup/soup-ssl.c: remove #include for soup-nss.h
3025 2003-06-02 Chris Toshok <toshok@ximian.com>
3027 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
3028 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
3029 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
3031 2003-06-02 Chris Toshok <toshok@ximian.com>
3033 * configure.in: Bump version to 1.99.23.
3035 2003-05-30 Chris Toshok <toshok@ximian.com>
3037 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
3038 reconnect when there's an error with ssl connection. This fixes
3039 #43387, but it runs the risk of sending requests multiple times to
3040 the exchange server, and it results in lots of shorter lived
3041 connections and more forking (in the ssl proxy case), depending on
3042 the length of the operation.
3044 2003-05-21 Dan Winship <danw@ximian.com>
3046 * configure.in: 1.99.22 (codename: French Onion Soup)
3048 2003-05-20 Dan Winship <danw@ximian.com>
3050 * libsoup/soup-message.c (soup_message_requeue): Clear the
3051 write_tag as well so we don't double-cancel it. #43395.
3053 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
3054 be destroyed by the end of the func, so we have to call
3055 soup_connection_set_used at the beginning.
3057 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
3058 Call g_set_error() so that we don't SEGV immediately after
3059 returning G_IO_STATUS_ERROR.
3061 2003-05-08 Joe Shaw <joe@ximian.com>
3063 * configure.in: Bump version to 1.99.21
3065 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
3066 tunnelling fails, the other message which shares our same
3067 connection will free it first, so set ours to NULL.
3069 2003-05-08 Dan Winship <danw@ximian.com>
3071 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
3072 return an NTLM request string. Otherwise return the "response"
3073 field (which should include the NTLM authenticate message)
3074 (ntlm_init): Don't bother setting "response" to the NTLM request
3075 string. Just leave it NULL in that case.
3077 * libsoup/soup-message.c (authorize_handler): Never try to reuse
3078 an NTLM auth returned from soup_auth_lookup. Only set the auth on
3079 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
3080 call soup_auth_set_context() on it just like for non-NTLM auth.
3081 The net effect of all of this is that now we record when a context
3082 needs NTLM auth just like with non-NTLM auth, so that that info
3083 gets preserved across connections.
3084 (soup_message_requeue): No longer need the hackery here to
3085 preserve the connection auth state.
3087 2003-05-07 Dan Winship <danw@ximian.com>
3089 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
3090 toggle the connection's in_use flag, and set up the death watch
3091 when it's not in use.
3092 (connection_death): This is only hooked up when the connection is
3093 not in use now, so don't need to check that. Should fix the
3094 infinite connection_death loop.
3095 (soup_connection_is_new): Keep a distinct "new" flag rather than
3096 defining "new" as "has been released at least once".
3097 (soup_connection_set_used): Mark a connection no-longer new.
3098 (soup_context_connect_cb): Mark the connection as new. Don't set
3099 up the death watch since it's in_use.
3100 (try_existing_connections): Use soup_connection_set_in_use.
3101 (soup_connection_release): Likewise
3103 * libsoup/soup-message.c (requeue_read_finished): Call
3104 soup_connection_set_used so that the connection isn't still
3105 considered new when we send the message the second time.
3107 * libsoup/soup-queue.c (soup_queue_error_cb): Call
3108 soup_connection_set_used (assuming we don't close the connection)
3109 (soup_queue_read_done_cb): Likewise.
3111 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
3112 nothing, call soup_transfer_read_error_cb rather than just
3113 cancelling, or else it will get cancelled again later.
3115 2003-05-07 Dan Winship <danw@ximian.com>
3117 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
3118 library doesn't depend on them, only the proxy does. #42473
3120 2003-05-06 Dan Winship <danw@ximian.com>
3122 * src/libsoup/soup-message.c (global_handlers): Change the
3123 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
3124 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
3125 for "Location" to get around the non-64-bit-clean union
3126 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
3127 (redirect_handler): Update for that.
3129 2003-04-28 Dan Winship <danw@ximian.com>
3131 * configure.in: 1.99.20
3133 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
3134 we always call UNIGNORE_CANCEL. Might fix #41971
3136 2003-04-25 Dan Winship <danw@ximian.com>
3138 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
3139 suddenly gets an io error while reading or writing, assume it's a
3140 timeout or something, close the connection, and requeue the
3143 2003-04-23 Dan Winship <danw@ximian.com>
3145 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
3146 soup-transfer callbacks to keep reading off the connection unless
3147 we're actually going to keep the connection around afterward.
3148 Otherwise we can just close it.
3150 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
3151 thingy so that it's possible to cancel a read from inside a
3152 callback so that the above change actually works instead of just
3155 2003-04-20 Rodney Dawes <dobey@ximian.com>
3157 * configure.in: Up version to 1.99.18
3158 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
3160 2003-04-11 Dan Winship <danw@ximian.com>
3162 * libsoup/soup-context.c (soup_connection_purge_idle): New
3163 function to close all idle connections. (Needed for #41117 or else
3164 there's no way to force-discard NTLM authentication.)
3166 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
3168 2003-04-10 Joe Shaw <joe@ximian.com>
3170 * libsoup/soup-queue.c (proxy_https_connect):
3171 proxy_https_connect_cb() might not get called if connecting to the
3172 proxy fails, and it causes us to double-free the connection.
3173 Always set the message's connection to NULL before freeing it.
3175 2003-04-09 Dan Winship <danw@ximian.com>
3177 * configure.in: 1.99.17
3179 2003-04-07 Dan Winship <danw@ximian.com>
3181 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
3182 We can't release the connection there because there may be
3183 SoupMessages still pointing to it. (Needs to be revisited.)
3185 2003-04-03 JP Rosevear <jpr@ximian.com>
3187 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
3188 error during waitpid
3190 * libsoup/soup-address.c: ditto
3192 2003-04-02 Joe Shaw <joe@ximian.com>
3194 * libsoup/soup-context.c (connection_death): Only drop the
3195 connection if we get an error condition on the channel. Fixes a
3198 2003-04-02 Joe Shaw <joe@ximian.com>
3200 * libsoup/soup-context.c (connection_death): Just call
3201 soup_connection_release() from here and return whether the
3202 connection is in use.
3204 2003-03-31 Ian Peters <itp@ximian.com>
3206 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
3207 case of EAGAIN or EINTR, since shutting down an SSL connection
3208 requires more than just closing a socket.
3210 2003-03-28 Dan Winship <danw@ximian.com>
3212 * libsoup/soup-message.c (soup_message_set_context): If the new
3213 context points to a different server from the old context, call
3214 soup_message_cleanup. Otherwise it tries to reuse the old
3217 2003-03-25 Joe Shaw <joe@ximian.com>
3219 * configure.in: Bump up to 1.99.16
3221 2003-03-24 Joe Shaw <joe@ximian.com>
3223 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
3224 slightly better error message on various SSL failures than the
3227 * soup-queue.c (soup_queue_error_cb): Throw the
3228 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
3230 2003-03-21 Joe Shaw <joe@ximian.com>
3232 * soup-server.c: Use non-deprecated g_main_loop_* calls
3234 (soup_server_unref): Don't unref the main loop if it's NULL.
3235 Fixes a glib warning.
3237 2003-03-18 Dan Winship <danw@ximian.com>
3239 * configure.in: comment out NSS checks. The NSS code doesn't work
3240 and there are no current plans to fix it.
3242 * README (Features): Mention GnuTLS, remove NSS and the rest of
3243 the "Planned Features" section.
3245 * MAINTAINERS: remove Alex
3247 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
3248 timeout to 10 seconds (and get rid of the 3 tries) so we don't
3249 fail to connect just because the server is slow/far away.
3251 2003-03-17 Joe Shaw <joe@ximian.com>
3253 * configure.in: Bump up to 1.99.15.
3255 2003-03-12 Ian Peters <itp@ximian.com>
3257 * libsoup/soup-gnutls.c: because creating client credentials is
3258 expensive, keep the same one around as long as possible, only
3259 recreating it if the ssl_ca_file changes. Wrap
3260 gnutls_certificate_credentials in a refcounted struct to avoid
3261 freeing it while another established connection may potentially
3262 need it (say, to rehandshake).
3264 2003-03-11 Frank Belew <frb@ximian.com>
3266 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
3269 2003-03-10 Joe Shaw <joe@ximian.com>
3271 * configure.in: Bump up to 1.99.14.
3273 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
3274 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
3277 2003-03-07 Joe Shaw <joe@ximian.com>
3279 * configure.in: Bump up to 1.99.13.
3281 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
3282 the list of conditions to watch. If the remote end hangs up the
3283 connection, we'll get a successful read of 0 bytes, not a HUP.
3284 The connection will have to be released by the point we check for
3285 it in connection_death().
3287 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
3288 (apparently) errant resetting of the read and write tags. I think
3289 this might have been causing some reentrancy and crashes.
3291 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
3292 channel to NULL encoding and not buffered.
3294 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
3297 2003-02-28 Joe Shaw <joe@ximian.com>
3299 * configure.in: Bump up to 1.99.12.
3301 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
3302 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
3303 this case we probably don't want to call the error callback, we
3304 just want to act like our transfer was cancelled.
3306 2003-02-27 Joe Shaw <joe@ximian.com>
3308 Try to apply some order to the iochannel refcounting...
3310 * configure.in: Bump up to 1.99.11.
3312 * libsoup/soup-context.c (soup_connection_get_iochannel): The
3313 connections needs to own a reference to the iochannel! If we're
3314 using HTTPS, release the ref we get from soup_socket_get_iochannel
3315 and replace it with the ref we get from soup_ssl_get_iochannel().
3316 Then, always ref the channel that we return (ugh, but that's the
3318 (connection_free): Release the connection's ref to the iochannel.
3320 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
3321 iochannel. The reference we pass back will be owned by the
3323 (soup_ssl_hup_waitpid): Release our ref.
3325 2003-02-27 Joe Shaw <joe@ximian.com>
3327 * configure.in: Bump up to 1.99.10.
3329 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
3330 iochannel, return to the status quo. Sigh.
3332 2003-02-26 Joe Shaw <joe@ximian.com>
3334 * configure.in: Bump up to 1.99.9.
3336 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
3337 it's causing problems with HTTPS and proxies; the iochannel
3338 refcounting is waaaaaay horked.
3340 2003-02-26 Frank Belew <frb@ximian.com>
3342 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
3344 2003-02-11 Joe Shaw <joe@ximian.com>
3346 * configure.in: Bump up to 1.99.8 for snaps.
3348 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
3349 It returns the address to the resulting hostent or NULL on failure,
3350 unlike Linux which returns an error code.
3352 2003-02-11 Joe Shaw <joe@ximian.com>
3354 * configure.in: Bump up to 1.99.7 for snaps.
3356 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
3357 the error string from OpenSSL if we can't establish a connection.
3359 2003-02-04 Joe Shaw <joe@ximian.com>
3361 * configure.in: Bump up to 1.99.6 for snaps.
3363 * libsoup/soup-server.c (destroy_message): We already assigned
3364 chan, so don't reassign it, and unref it in all cases.
3365 (issue_bad_request): Always unref after a call to
3366 soup_socket_get_iochannel(), because it refs it.
3367 (conn_accept): Fix some funky GIOChannel reffing here.
3369 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
3370 g_io_channel_ref() on the socket. This is the exact opposite of
3371 what we want to do. Create a temporary structure containing the
3372 parent pid and the old socket and unref the socket when our
3373 callback is called. This should fix GIOChannels being leaked on
3376 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
3379 2003-01-22 Joe Shaw <joe@ximian.com>
3381 * configure.in: Bump up to 1.99.5 for the snaps.
3383 * libsoup/soup-address.c (soup_address_new): If we found the
3384 address in our hash, we need to return NULL or else Soup will
3385 think we're doing an async lookup and do some cancellation on
3386 us. Besides, we were returning the wrong type anyway and it
3387 was crashing things.
3389 2003-01-17 Joe Shaw <joe@ximian.com>
3391 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
3392 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
3393 out, so keep trying until we succeed.
3395 2003-01-10 Joe Shaw <joe@ximian.com>
3397 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
3398 strings and print out the error when the cert can't verify.
3400 2003-01-09 Dan Winship <danw@ximian.com>
3402 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
3403 overrun noticed by valgrind
3405 2002-12-20 Joe Shaw <joe@ximian.com>
3407 * libsoup/soup-server.c (soup_server_new_with_host): Added.
3408 Starts a server only on the interface specified, instead of all
3411 2002-12-16 Jeremy Katz <katzj@redhat.com>
3413 * configure.in: use $libdir instead of /usr/lib when looking for
3416 2002-12-11 Joe Shaw <joe@ximian.com>
3418 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
3419 Don't set a variable to NULL and then immediately try to
3422 2002-12-09 Joe Shaw <joe@ximian.com>
3424 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
3425 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
3426 we don't hang forever if we don't get more data.
3428 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
3429 or else we'll hang forever in SSL_connect() if the other side
3432 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
3433 release the connection on message free, even if the connection was
3436 2002-12-03 Joe Shaw <joe@ximian.com>
3438 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
3439 g_io_channel_set_close_on_unref() on the second half of the socket
3440 pair so we don't leak file descriptors.
3442 2002-12-03 Frank Belew <frb@ximian.com>
3444 * libsoup/soup-address.c: add signal.h to the list of headers to
3447 2002-11-25 Joe Shaw <joe@ximian.com>
3449 * Makefile.am: Build the tests directory again
3451 2002-11-21 Rodney Dawes <dobey@ximian.com>
3453 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
3455 2002-11-20 Michael Meeks <michael@ximian.com>
3457 * configure.in: require autoconf 2.52 not 2.53.
3459 2002-11-18 Dan Winship <danw@ximian.com>
3461 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
3462 since it's apparently non-portable. Use s6_addr instead.
3463 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
3465 * libsoup/soup-error.c: Fix spelling of
3466 SOUP_ERROR_MOVED_PERMANENTLY and its description.
3468 * libsoup/soup-message.c (soup_message_get_request_header, etc):
3469 Remove long-deprecated API.
3471 * libsoup/soup-socket.c (soup_socket_connect): remove unused
3474 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
3475 * libsoup/soup-server.c (cgi_read): Likewise
3476 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
3478 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
3479 * libsoup/soup-transfer.c (soup_transfer_read_cb,
3480 soup_transfer_write_cb): Likewise.
3482 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
3483 instead of IPv4. (Tested on OS X.)
3485 2002-11-15 Dan Winship <danw@ximian.com>
3487 * libsoup/*: Change old Helix Code refs to Ximian (and update
3490 2002-11-15 Frank Belew <frb@ximian.com>
3492 * tests/Makefile.am: uncomment lines to make timeserver build
3495 2002-11-14 Joe Shaw <joe@ximian.com>
3497 * libsoup/soup-address.c (soup_address_new): When we get an
3498 address from the hash, call our address lookup callback or else
3499 the connection will hang.
3501 2002-11-13 Dan Winship <danw@ximian.com>
3503 * tests/timeserver.c: Oops, commit this.
3505 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
3507 2002-11-13 Joe Shaw <joe@ximian.com>
3509 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
3510 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
3513 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
3514 to properly shut down the SSL connection before closing the
3517 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
3518 iochannels before quitting the main loop.
3520 * tests/Makefile.am: disable building timeserver, the source file
3523 2002-11-12 Dan Winship <danw@ximian.com>
3525 * configure.in: Check for IPv6 support in networking headers.
3527 * libsoup/soup-address.c: Make the internal structure of
3528 SoupAddress entirely private, and make SoupAddress be more like a
3529 hostent and less like a sockaddr. (Ie, make it not have a port
3530 associated with it.) Document undocumented functions. Add
3531 completely-untested support for IPv6.
3532 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
3533 SoupAddress and a port.
3534 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
3535 addresses corresponding to the IPv6 and IPv6 "any" addresses.
3536 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
3537 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
3538 may be a sockaddr_in or sockaddr_in6.
3539 (soup_address_gethostname, soup_address_gethostaddr): Remove
3540 these. They aren't reliable, especially on multihomed hosts.
3541 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
3542 (soup_address_new): Keep pending lookups in a separate hash table
3543 from completed lookups. Fix a bug when canceling a lookup when
3544 there was more one outstanding request for it.
3545 (soup_address_lookup_in_cache): Removed.
3547 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
3548 it's not in SoupAddress any more).
3549 (soup_socket_connect): Simplify this. Don't use
3550 soup_address_lookup_in_cache, just call soup_address_new, since we
3551 already know the code can deal with the callback being invoked
3553 (soup_socket_new_sync, soup_socket_new): Take a port argument.
3554 (soup_socket_server_new): Take a SoupAddress to use as the local
3555 address to bind to. This lets the caller choose between the IPv4
3556 and IPv6 "any" addresses, and also lets you bind to a single
3557 interface of a multi-homed machine.
3558 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
3561 * libsoup/soup-server.c (soup_server_new): Pass
3562 soup_address_ipv4_any() to soup_socket_server_new().
3564 * libsoup/soup-socks.c (soup_connect_socks_proxy,
3565 soup_socks_write): Fix up for the API changes, but it won't work
3568 * tests/timeserver.c: Another really simple test, for the server
3571 * tests/Makefile.am: build timeserver
3573 2002-11-11 Dan Winship <danw@ximian.com>
3575 * libsoup/soup-address.c: Move the SoupAddress code from
3576 soup-socket.c and soup-socket-unix.c to here.
3578 * libsoup/soup-socket.c: Move the remaining code from
3579 soup-socket-unix.c here.
3581 * libsoup/soup-socket-unix.c: Gone
3583 * tests/get.c: really really trivial test program
3585 * configure.in (AC_OUTPUT):
3586 * Makefile.am (SUBDIRS): add tests/
3588 2002-11-05 Dan Winship <danw@ximian.com>
3590 * Split libsoup out of soup. ChangeLog.old contains the original
3593 * Makefile.am, etc: Fix things up to work with the new directory
3594 layout. Disable docs until we fix them.
3596 * autogen.sh: Use gnome-autogen.sh
3598 * configure.in: Require autoconf 2.53. Remove stuff that was only
3599 needed for httpd or wsdl code. Remove glib1 support. Bump version
3602 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
3603 in ${includedir}/soup-2.0
3605 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
3606 SOAP-specific stuff, Windows support, and other things that
3607 weren't being maintained.
3609 * soup-config.in, soupConf.sh: Kill these. We only support