Call soup_message_io_stop so we don't get a callback on the io after it's
[platform/upstream/libsoup.git] / ChangeLog
1 2004-02-03  Dan Winship  <danw@ximian.com>
2
3         * libsoup/soup-message-io.c (io_cleanup): Call
4         soup_message_io_stop so we don't get a callback on the io after
5         it's been cleaned up.
6
7         * libsoup/soup-session.c (add_auth): Only remove the Authorization
8         header if we have another one to add. (Otherwise it messes up
9         SoupConnectionNTLM.)
10
11         * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
12         memcpy here, since the source and destination will overlap if
13         *nread is small and read_buf->len is large. (Noticed by valgrind,
14         #53625.)
15
16 2004-02-02  Joe Shaw  <joe@ximian.com>
17
18         * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
19         with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
20         GNUTLS_E_INTERRUPTED.  GNUTLS_E_AGAIN will be returned by recv()
21         when there are no messages on the wire on a non-blocking socket.
22         This sends a SSL hangup message and then allows us to immediately
23         close the socket.
24
25 2004-01-30  Rodrigo Moya <rodrigo@ximian.com>
26
27         * configure.in: bumped version number to 2.1.6.
28
29 2004-01-29  Rodrigo Moya <rodrigo@ximian.com>
30
31         * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
32         new function.
33
34 2004-01-29  Rodrigo Moya <rodrigo@ximian.com>
35
36         * libsoup/soup-soap-response.[ch]
37         (soup_soap_parameter_get_string_value): removed 'const' from return
38         type.
39
40 2004-01-29  Joe Shaw  <joe@ximian.com>
41
42         * libsoup/soup-gnutls.c (verify_certificate): Initialize the
43         certificate before we try to use it.  Ahem.
44
45 2004-01-23  Joe Shaw  <joe@ximian.com>
46
47         * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
48
49 2004-01-21  Joe Shaw  <joe@ximian.com>
50
51         * configure.in: Require at least GnuTLS 1.0.0.
52
53         * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
54         functions.
55         (verify_certificate): Use gnutls_x509_crt_import() and
56         gnutls_x509_crt_check_hostname() instead of
57         gnutls_x509_check_certificates_hostname().
58         (init_dh_params): Use gnutls_dh_params_generate2() instead of
59         gnutls_dh_params_generate() and gnutls_dh_params_set().
60
61 2004-01-20  Joe Shaw  <joe@ximian.com>
62
63         * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
64         close the socket itself, so we need to do it or else our
65         connections stay in CLOSE_WAIT forever.
66
67 2004-01-16  Jason Leach  <leach@wam.umd.edu>
68
69         * libsoup/Makefile.am: builddir != srcdir fixes.
70
71 2004-01-14  Joe Shaw  <joe@ximian.com>
72
73         * libsoup/soup-gnutls.c (verify_certificate): Remove the
74         check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
75
76 2004-01-12  JP Rosevear  <jpr@ximian.com>
77
78         * configure.in: bump version and libtool revision
79
80 2004-01-12  Dan Winship  <danw@ximian.com>
81
82         * tests/simple-httpd.c (main): Add a g_thread_init() so this works
83         again.
84
85 2004-01-10  Larry Ewing  <lewing@ximian.com>
86
87         * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
88         string.
89
90 2004-01-09  Joe Shaw  <joe@ximian.com>
91
92         * acinclude.m4: Include the libgnutls.m4 file.
93
94         * configure.in: Remove manual checking for libgnutls-config and
95         use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
96         version, which is 0.9.7 for now.
97
98         * libsoup/Makefile.am: Some changes for the above change.
99
100         * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
101         HAVE_GNUTLS_GNUTLS_H.
102         (verify_certificate): Uncomment the SSL certificate hostname
103         check.
104
105         * libsoup/soup-session.c (set_property): Be smart about flushing
106         our SSL credentials only when the CA file is set to something
107         different than it was before.
108
109 2004-01-09  Harish K <kharish@novell.com>
110         * libsoup/soup-soap-response.c (soup_soap_response_from_string): 
111         added code to ignore Header element, if present, while creating 
112         response objects.  
113         
114 2004-01-05  Dan Winship  <danw@ximian.com>
115
116         * configure.in: Remove no-longer-relevant socklen_t check
117
118         * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
119         Marcus Clarke, #52566)
120
121         * libsoup/soup-dns.c: Likewise
122
123 2003-12-29  JP Rosevear <jpr@ximian.com>
124
125         * configure.in: bump version and libtool numbers
126
127 2003-12-22  Dan Winship  <danw@ximian.com>
128
129         * README, TODO: Update these
130
131 2003-12-22  Dan Winship  <danw@ximian.com>
132
133         * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
134         you can disconnect a socket from one thread while doing I/O in
135         another.
136
137         * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
138         soup_message_io_stop() and io_cleanup(), to separate out the "stop
139         reading/writing" and "free data" phases to allow thread-safe
140         synchronous cancellation.
141         (soup_message_io_finished): call both soup_message_io_stop() and
142         io_cleanup()
143         (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
144         doesn't already have a transport error status (eg, CANCELLED).
145         (new_iostate): Call io_cleanup() if needed.
146
147         * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
148         clearer that it's not a status.
149
150         * libsoup/soup-message.c (finalize, restarted, finished,
151         soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
152         (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
153
154         * libsoup/soup-connection.c (send_request): Remove
155         soup_message_io_cancel call.
156
157         * libsoup/soup-session-sync.c (send_message): Connect to the
158         connection's "disconnected" signal rather than using a weak ref,
159         since that's what we really care about, and it's possible that the
160         connection may have an extra ref on it somewhere that would keep
161         it from being destroyed even if it was disconnected.
162
163 2003-12-20  Joe Shaw  <joe@ximian.com>
164
165         * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
166         the non-proxy case, then use the root ("/").
167
168 2003-12-19  Dan Winship  <danw@ximian.com>
169
170         * libsoup/soup-message-filter.c: New. An interface for objects
171         that want to act on every message passing through a session.
172         (Initially being used for authentication, but could also be used
173         for cache handling, cookie management, etc.)
174
175         * libsoup/soup-connection.c (class_init, etc): Add a message
176         filter property.
177         (send_request): If the connection has a message filter set, run
178         it on the message before sending it.
179         (soup_connection_connect_async, etc): When setting up a tunnel, if
180         we get back a 407 and the session tries to requeue the message,
181         either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
182         whether or not the proxy closed the connection).
183         (soup_connection_connect_sync): Likewise
184         (send_request, request_done): Ref/unref the connection
185
186         * libsoup/soup-session.c (soup_session_get_type): Implement the
187         SoupMessageFilter interface.
188         (soup_session_get_connection): Use the session as the connection's
189         message filter
190         (soup_session_add_filter, soup_session_remove_filter): Add/remove
191         filters from the session
192         (setup_message): do auth handling, and call each of the session's
193         filters' setup_message methods as well.
194         (soup_session_send_message_via): No longer needed.
195         (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
196
197         * libsoup/soup-session-async.c (run_queue): Use
198         soup_connection_send_request, since soup_session_send_message_via
199         is gone now.
200
201         * libsoup/soup-session-sync.c (send_message): Likewise
202
203         * libsoup/soup-message.c (soup_message_is_keepalive): A successful
204         response to a CONNECT is always keepalive, even if it's HTTP/1.0
205         with no Connection header.
206
207         * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
208
209         * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
210         gobject interface types.
211
212         * tests/get.c (main): Add a -p flag to specify a proxy
213
214         * tests/simple-proxy.c: Fix #includes
215
216 2003-12-18  Dan Winship  <danw@ximian.com>
217
218         * libsoup/soup-connection.c (soup_connection_disconnect): Actually
219         disconnect the socket rather than just unreffing it, since the IO
220         code may be holding an extra ref on it.
221         (send_request): connect to the "restarted" signal too
222         (request_restarted): Deal with "Connection: close"
223
224         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
225         not go into an infinite loop if the server only supports Basic.
226
227 2003-12-17  Rodrigo Moya <rodrigo@ximian.com>
228
229         * libsoup/Makefile.am: install soup-message-queue.h with the rest
230         of the headers.
231
232 2003-12-17  Dan Winship  <danw@ximian.com>
233
234         * configure.in: Add gthread to glib check
235
236         * libsoup/soup-session.c: Make this an abstract class.
237
238         * libsoup/soup-session-async.c: A SoupSession class for
239         asynchronous gmain-based operation; replaces the old SoupSession.
240
241         * libsoup/soup-session-sync.c: A SoupSession class for synchronous
242         blocking operation for use with threaded apps.
243
244         * libsoup/soup-types.h, libsoup/soup.h: add the new session
245         subclasses
246
247         * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
248         try to unref the socket if the socket creation fails.
249         (soup_connection_reserve): New, to explicitly mark a connection as
250         being in use without queueing a message on it.
251
252         * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
253         "block" flag to not be reversed.
254
255         * libsoup/soup-message.c (finished): set status to FINISHED here.
256         (soup_message_cancel): Gone; needs to be done at the session
257         level.
258
259         * libsoup/soup-message-queue.c: Add a mutex and make all of the
260         operations thread-safe.
261
262         * libsoup/soup-socket.c (disconnect_internal): Make this
263         thread-safe.
264         (soup_socket_connect): Make the sync case work correctly.
265
266         * libsoup/Makefile.am: add the SoupSession subclasses
267
268         * tests/Makefile.am: libsoup depends on libgthread now, so
269         revserver doesn't need to explicitly.
270
271         * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
272         soup_session_async_new().
273
274 2003-12-16  Rodrigo Moya <rodrigo@ximian.com>
275
276         * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
277         new function.
278
279 2003-12-16  Joe Shaw  <joe@ximian.com>
280
281         * libsoup/soup-connection.c (socket_connect_result,
282         soup_connection_connect_sync): Only set up a tunnel if the
283         destination protocol is HTTPS.
284
285         * libsoup/soup-message.c (class_init): Add a default handler for
286         wrote_body.
287         (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
288         (soup_message_cancel): Don't set the status to
289         SOUP_STATUS_CANCELLED and call soup_message_finished() if the
290         status is already SOUP_MESSAGE_STATUS_FINISHED.
291
292         * libsoup/soup-session.c (set_property): Don't cancel the session
293         if the proxy URI set as a property isn't different from the old
294         one.
295         (get_host_for_message): Refactor some code so that we can easily
296         get the right SoupSessionHost for proxies as well as from the
297         message.
298         (authenticate_auth): Take a gboolean proxy parameter.  Check it to
299         see which URI (message URI or proxy URI) to use for
300         authentication.  Add a long comment about lack of clarity in RFC
301         2617 with respect to proxies and protection spaces.
302
303 2003-12-15  Dan Winship  <danw@ximian.com>
304
305         * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
306         soup_socket_write): s/guint/gsize/ to match the definitions in
307         soup-socket.c. #52167.
308
309 2003-12-12  Rodrigo Moya <rodrigo@ximian.com>
310
311         * libsoup/soup-soap-message.c: removed debugging of the messages here.
312
313 2003-12-12  Rodrigo Moya <rodrigo@ximian.com>
314
315         * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
316         added information for SOAP-ENV namespace.
317
318 2003-12-10  Dan Winship  <danw@ximian.com>
319
320         * libsoup/soup-message-client-io.c (parse_response_headers): if we
321         receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
322         message's http_version so the keep-alive handling is correct.
323         Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
324
325         * libsoup/soup-message.c (soup_message_restarted, etc): Add a
326         "restarted" signal as suggested by Joe.
327
328         * libsoup/soup-message-io.c (soup_message_io_finished): emit
329         either "restarted" or "finished" as appropriate
330
331         * libsoup/soup-session.c (soup_session_queue_message): Connect to
332         "restarted" and run the queue if a message gets restarted
333
334         * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
335         like.
336
337 2003-12-10  Tambet Ingo  <tambet@ximian.com>
338
339         * configure.in: Use autoconfig to check for socklen_t ...
340
341         * libsoup/soup-address.c: ... and remove it from here ...
342
343         * libsoup/soup-dns.c: ... and here.
344
345 2003-12-09  Rodrigo Moya <rodrigo@ximian.com>
346
347         * libsoup/soup-soap-message.c (soup_soap_message_persist):
348         (soup_soap_message_parse_response): print out request/response's
349         contents, if in debug mode.
350
351 2003-12-07  JP Rosevear  <jpr@ximian.com>
352
353         * configure.in: Bump version
354
355 2003-11-28  Rodrigo Moya <rodrigo@ximian.com>
356
357         * libsoup/soup-soap-response.[ch]
358         (soup_soap_parameter_get_first_child,
359         soup_soap_parameter_get_first_child_by_name,
360         soup_soap_parameter_get_next_child,
361         soup_soap_parameter_get_next_child_by_name): new functions to
362         manage SoupSoapParameter's children.
363         (soup_soap_response_get_first_parameter): dont return a GList, but
364         a SoupSoapParameter contained in the GList.
365
366 2003-11-26  Rodrigo Moya <rodrigo@ximian.com>
367
368         * libsoup/soup-soap-response.[ch]
369         (soup_soap_parameter_get_string_value): new function.
370
371 2003-11-26  Rodrigo Moya <rodrigo@ximian.com>
372
373         * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
374         structure, to "hide" the usage of xmlNode's.
375         (soup_soap_parameter_get_name): functions to manage SOAP
376         response parameters.
377         (soup_soap_response_get_first_parameter,
378         soup_soap_response_get_first_parameter_by_name,
379         soup_soap_response_get_next_parameter,
380         soup_soap_response_get_next_parameter_by_name):
381         new functions for an easy access to the response's parameters.
382         (soup_soap_response_from_string): removed warnings.
383
384 2003-11-25  Rodrigo Moya <rodrigo@ximian.com>
385
386         * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
387         fixed typo.
388
389 2003-11-25  Rodrigo Moya <rodrigo@ximian.com>
390
391         * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
392         soup_soap_response_set_method_name, soup_soap_message_get_parameters):
393         new functions.
394         (finalize): NULL out new private fields.
395         (soup_soap_response_from_string): added validation code.
396
397 2003-11-23  Rodrigo Moya <rodrigo@ximian.com>
398
399         * libsoup/soup-soap-response.[ch]: new class for managing SOAP
400         responses.
401
402         * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
403         new function.
404
405         * libsoup/Makefile.am: added new files.
406
407 2003-11-18  Rodney Dawes  <dobey@ximian.com>
408
409         * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
410
411 2003-11-18  Rodney Dawes  <dobey@ximian.com>
412
413         * acinclude.m4: Add GTK_DOC_CHECK
414
415 2003-11-18  Dan Winship  <danw@ximian.com>
416
417         * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
418         (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
419
420         * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
421
422         * Makefile.am: updates for gtk-doc
423         (SUBDIRS): add back "docs"
424
425         * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
426         aren't around any more
427
428         * docs/reference/*: set up gtk-doc
429
430         * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
431         "libsoup". Remove unused defines.
432
433         * libsoup/soup-connection.c: Fix doc comments
434         * libsoup/soup-message.c: Likewise
435         * libsoup/soup-misc.c: Likewise
436         * libsoup/soup-socket.c: Likewise
437         * libsoup/soup-uri.c: Likewise
438
439         * libsoup/soup-address.h: Fixes to please gtk-doc
440         * libsoup/soup-connection.h: Likewise
441         * libsoup/soup-message.h: Likewise
442         * libsoup/soup-message-private.h: Likewise
443         * libsoup/soup-misc.h: Likewise
444         * libsoup/soup-server-auth.h: Likewise
445         * libsoup/soup-socket.h: Likewise
446         * libsoup/soup-status.h: Likewise
447
448 2003-11-18  Dan Winship  <danw@ximian.com>
449
450         * configure.in: Fix up the SSL checks some. Remove some useless
451         old header checks.
452
453         * libsoup/soup-misc.h: declare soup_ssl_supported.
454
455         * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
456
457         * libsoup/soup-nossl.c: Not an SSL implementation, built if
458         HAVE_SSL is not defined.
459
460         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
461
462         * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
463         failure.
464         (listen_watch): Deal with soup_socket_start_ssl failing.
465
466         * libsoup/soup-connection.c (tunnel_connect_finished,
467         socket_connect_result, soup_connection_connect_sync): Deal with
468         the soup_socket_start_ssl failing.
469
470         * libsoup/soup-server.c (soup_server_new): Deal with
471         soup_ssl_get_server_credentials failing
472
473 2003-11-18  Rodrigo Moya <rodrigo@ximian.com>
474
475         * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
476         soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
477         soup_soap_message_end_fault_detail, soup_soap_message_start_header,
478         soup_soap_message_end_header,
479         soup_soap_message_start_header_element,
480         soup_soap_message_end_header_element, soup_soap_message_write_int,
481         soup_soap_message_write_double, soup_soap_message_write_base64,
482         soup_soap_message_write_time, soup_soap_message_write_string,
483         soup_soap_message_write_buffer, soup_soap_message_set_element_type,
484         soup_soap_message_set_null, soup_soap_message_add_attribute,
485         soup_soap_message_add_namespace,
486         soup_soap_message_set_default_namespace,
487         soup_soap_message_get_namespace_prefix,
488         soup_soap_message_set_encoding_style, soup_soap_message_reset,
489         soup_soap_message_persist): new functions from old SoupSerializer.
490
491 2003-11-17  Rodrigo Moya <rodrigo@ximian.com>
492
493         * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
494         soup_soap_message_new_from_uri): added a bunch of initialization
495         parameters.
496         (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
497         soup_soap_message_end_envelope, soup_soap_message_start_body,
498         soup_soap_message_end_body, soup_soap_message_start_element,
499         soup_soap_message_end_element):
500         new functions.
501
502         * configure.in: depend on libxml-2.0 for the SOAP code.
503
504         * libsoup/Makefile.am: use XML CFLAGS and LIBS.
505
506 2003-11-17  Joe Shaw  <joe@ximian.com>
507
508         * configure.in: Add in the --enable-libgpg-error flag from the 2.0
509         branch.
510
511         * acinclude.m4: Include the gpg-error macros.
512
513 2003-11-17  Rodrigo Moya <rodrigo@ximian.com>
514
515         * libsoup/soup-soap-message.[ch]: new class to make it easier to
516         build SOAP messages.
517
518         * libsoup/Makefile.am: added new files.
519
520         * configure.in: increased version number.
521
522 2003-10-24  Joe Shaw  <joe@ximian.com>
523
524         * libsoup/soup-address.c (update_address_from_entry): Call
525         soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
526         one in addr->priv->lookup.  Fixes a crash on synchronous DNS
527         lookups.
528
529         * libsoup/soup-server.c (soup_server_new): We need to ref the
530         address we're binding to, because soup_socket_get_local_address()
531         doesn't ref for us.
532
533 2003-10-23  Dan Winship  <danw@ximian.com>
534
535         * libsoup/soup-socket.c (init): Initialize flags to default
536         values.
537
538 2003-09-23  Dan Winship  <danw@ximian.com>
539
540         * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
541         note whether or not the CA file has been loaded.
542         (SoupGNUTLSChannel): add a "hostname" field.
543         (verify_certificate): Remove the comment about not being able to
544         verify the hostname because of soup problems. Now it's because of
545         GNUTLS problems instead.
546         (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
547         and takes a hostname and a creds argument now.
548         (soup_ssl_get_client_credentials,
549         soup_ssl_get_server_credentials): Return client/server credentials
550         structures.
551         (soup_ssl_free_client_credentials,
552         soup_ssl_free_server_credentials): and free them.
553
554         * libsoup/soup-session.c (class_init, set_property, get_property):
555         add ssl_ca_file property
556         (get_host_for_message): when returning an SSL host for the first
557         time, create a client credentials structure for the session.
558         (run_queue): Pass the ssl creds to the new connection. Also fix an
559         unrelated bug that caused infinite loops on "bad hostname".
560
561         * libsoup/soup-server.c: Use GObject properties, including
562         ssl_cert_file and ssl_key_file properties.
563         (soup_server_new): Remove "protocol" argument; if the cert file
564         and key file properties were set, create a server credential
565         structure from them and pass that to soup_socket_server_new.
566
567         * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
568         dest_uri to origin_uri to match RFC 2616 terminology. Add an
569         "ssl_creds" field.
570         (class_init, set_property, get_property): add SSL_CREDS property
571         (soup_connection_connect_async, soup_connection_connect_sync):
572         Pass ssl_creds to soup_socket_client_new calls.
573
574         * libsoup/soup-socket.c: Use GObject properties, including an
575         ssl_creds property
576         (soup_socket_set_flags): Gone (replaced with boolean properties)
577         (soup_socket_new): Make this take a list of properties
578         (listen_watch): copy ssl creds from listener to new socket
579         (soup_socket_start_ssl): Pass remote hostname and socket creds
580         structure to soup_ssl_wrap_iochannel.
581         (soup_socket_client_new_async, soup_socket_client_new_sync,
582         soup_socket_server_new): Replace the SSL boolean with an ssl_creds
583         structure.
584
585         * libsoup/soup-misc.c (soup_set_ssl_ca_file,
586         soup_set_ssl_cert_files, soup_get_ssl_ca_file,
587         soup_get_ssl_cert_files): Gone. SSL state is now per-session or
588         per-server.
589
590         * tests/get.c: add a "-c CAfile" argument, for loading a CA
591         certificate file to validate https connections against
592
593         * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
594         arguments for loading an SSL server certificate. Only start an SSL
595         server if those arguments were used.
596
597         * tests/test-cert.pem: 
598         * tests/test-key.pem: SSL certificate for testing simple-httpd
599
600         * tests/revserver.c: Update for API changes
601         * tests/simple-proxy.c: Likewise
602
603 2003-09-22  Dan Winship  <danw@ximian.com>
604
605         * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
606         from soup-private.h
607
608         * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
609         (soup_set_security_policy, soup_get_security_policy): Remove,
610         since the GNUTLS backend doesn't actually implement it.
611         (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
612
613         * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
614         stuff.
615
616         * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
617         soup-private.h
618
619         * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
620         soup_ssl_get_server_iochannel into a single function that takes a
621         SoupSSLType.
622
623         * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
624         (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
625         (soup_gnutls_set_security_policy): Gone
626
627         * libsoup/soup-gnutls.h
628         * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
629         soup-gnutls.c now
630
631         * libsoup/soup-socket.c: Move soup_sockaddr_max
632         #define here from soup-private.h
633         (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
634         prototype.
635
636         * libsoup/soup-private.h: Gone
637         
638         * libsoup/soup-address.c: Fix #includes for soup-private.h and
639         soup-misc.h changes
640         * libsoup/soup-auth-digest.c: Likewise
641         * libsoup/soup-auth.c: Likewise
642         * libsoup/soup-connection-ntlm.c: Likewise
643         * libsoup/soup-connection.c: Likewise
644         * libsoup/soup-dns.c: Likewise
645         * libsoup/soup-gnutls.c: Likewise
646         * libsoup/soup-headers.c: Likewise
647         * libsoup/soup-message-client-io.c: Likewise
648         * libsoup/soup-message-handlers.c: Likewise
649         * libsoup/soup-message-io.c: Likewise
650         * libsoup/soup-message-server-io.c: Likewise
651         * libsoup/soup-message.c: Likewise
652         * libsoup/soup-server-message.c: Likewise
653         * libsoup/soup-server.c: Likewise
654         * libsoup/soup-session.c: Likewise
655         * libsoup/soup-socket.c: Likewise
656         * tests/auth-test.c: Likewise
657
658 2003-09-19  Dan Winship  <danw@ximian.com>
659
660         * libsoup/soup-address.c (update_address_from_entry): free the
661         hostent.
662
663         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
664         the domain
665
666         * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
667         iochannel initialization. Not sure how this worked before...
668
669         * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
670         from soup_message_prepare (and a few things removed).
671
672         * libsoup/soup-message-client-io.c (soup_message_send_request):
673         s/soup_message_prepare/soup_message_cleanup_response/
674
675         * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
676         with "\0" on the headers before passing them to the parse
677         function.
678         (io_read): Call soup_message_cleanup_response after returning an
679         informational response so the data doesn't leak.
680
681         * libsoup/soup-headers.c (soup_headers_parse): Update for
682         soup-message-io.c:io_read change
683
684         * libsoup/soup-server.c (soup_server_new,
685         soup_server_new_with_host): Don't leak the SoupAddress.
686
687         * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
688         CONSTRUCT_ONLY.
689         (set_property): If the proxy uri changes, call
690         soup_session_abort() and cleanup_hosts().
691         (request_finished, final_finished): Fix a bug when requeuing
692         messages.
693
694         * tests/libsoup.supp: valgrind suppression file for soup tests
695
696         * tests/Makefile.am (EXTRA_DIST): dist it.
697         (noinst_PROGRAMS): move the former check_PROGRAMS to
698         noinst_PROGRAMS instead.
699
700 2003-09-18  Dan Winship  <danw@ximian.com>
701
702         * libsoup/soup-message.c: Add wrote_informational and
703         got_informational signals.
704
705         * libsoup/soup-message-client-io.c (get_request_headers): Set the
706         EXPECT_CONTINUE flag on the message if that header is set.
707
708         * libsoup/soup-message-server-io.c (parse_request_headers):
709         Likewise
710
711         * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
712         when blocking on an expect-continue. Emit wrote_informational
713         instead of wrote_headers in the 1xx case.
714         (io_read): Set read_state to BLOCKING, not NOT_STARTED after
715         reading a 100 Continue response. Emit got_informational instead of
716         got_headers in the 1xx case.
717
718         * libsoup/soup-session.c (soup_session_send_message): Reorder
719         things to deal with the fact that the message could finish right
720         away if there is a connection available and the server is very
721         close.
722
723         * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
724         SOUP_STATUS_CLASS_TRANSPORT_ERROR.
725
726 2003-09-17  Dan Winship  <danw@ximian.com>
727
728         * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
729         (one that pruned too little, one that pruned too much).
730         (queue_message): When requeuing, don't run the queue;
731         final_finished will take care of that later.
732         (soup_session_abort): New, to cancel all pending requests.
733
734         * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
735         the socket while waiting for the address to resolve
736
737 2003-09-17  Dan Winship  <danw@ximian.com>
738
739         * libsoup/soup-connection.c (soup_connection_new): Replaces the
740         three previous soup_connection_new* functions and uses gobject
741         properties to set the destination and proxy uris.
742         (class_init): set up two more signals, authenticate and
743         reauthenticate.
744         (soup_connection_send_request): virtualize
745         (send_request): Default implementation
746
747         * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
748         also handles NTLM authentication. Includes all of the NTLM code
749         formerly in soup-auth-ntlm.c.
750
751         * libsoup/soup-auth-ntlm.[ch]: Gone.
752
753         * libsoup/soup-auth.c: Remove NTLM refs
754
755         * libsoup/soup-session.c (class_init): Add gobject properties for
756         proxy, max_conns, use_ntlm. Change the "authenticate" and
757         "reauthenticate" signal prototypes to not pass a SoupAuth (so they
758         can be used for authenticating SoupConnectionNTLM as well, which
759         doesn't use a SoupAuth).
760         (soup_session_new): Renamed from soup_session_new_default.
761         (soup_session_new_with_options): Replaces
762         soup_session_new_with_proxy and soup_session_new_full. Takes
763         gobject properties.
764         (run_queue): Create a new connection of type SoupConnection or
765         SoupConnectionNTLM depending on our "use_ntlm" property. Connect
766         to its authenticate and reauthenticate signals.
767         (connection_authenticate, connection_reauthenticate): proxy these
768         signals.
769
770         * libsoup/soup-address.c (update_address_from_entry): Fix a
771         crasher when failing to resolve the address.
772
773         * libsoup/soup-dns.c (check_hostent): Fix some "how was this
774         working before" bugs.
775
776         * libsoup/soup-message-client-io.c (soup_message_send_request):
777         call soup_message_prepare() to clean up the existing response
778         state.
779
780         * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
781         when processing an OK EOF.
782
783         * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
784         these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
785
786         * tests/auth-test.c (authenticate, reauthenticate): Update for new
787         prototypes.
788         (main): Use soup_session_new.
789         * tests/get.c (main): Likewise.
790         * tests/simple-proxy.c (main): Likewise.
791
792 2003-09-10  Dan Winship  <danw@ximian.com>
793
794         * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
795         signals.
796         (invalidate_auth): Remove the call to soup_auth_invalidate.
797         (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
798         contain authentication, then emit "authenticate" or
799         "reauthenticate" (depending on whether or not this is the first
800         time we've asked for a password for this auth).
801         (update_auth_internal): If the server rejects our
802         username/password, don't bail out immediately. Try doing a
803         "reauthenticate" first.
804
805         * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
806
807         * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
808         "pref" arg.
809         (soup_auth_invalidate): Remove this; it doesn't actually do
810         anything useful for us.
811
812         * libsoup/soup-auth-basic.c (invalidate): Remove
813         * libsoup/soup-auth-digest.c: (invalidate): Remove
814         * libsoup/soup-auth-ntlm.c: (invalidate): Remove
815
816         * libsoup/soup-uri.c: Remove all references to "authmech".
817         (soup_uri_set_auth): Remove this too.
818
819         * tests/auth-test.c: Update to use the "authenticate" and
820         "reauthenticate" signals instead of encoding usernames and
821         passwords in the URIs. Add a few more test cases.
822
823 2003-09-10  Dan Winship  <danw@ximian.com>
824
825         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
826         "status" field from here, since it's mostly used by SoupSession,
827         which shouldn't need access to SoupMessagePrivate.
828
829         * libsoup/soup-message.h (SoupMessage): Move it here.
830         (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
831         (soup_message_set_uri): also moved from soup-message-private.h
832
833         * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
834
835         * libsoup/soup-message-handlers.c:
836         s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
837
838         * libsoup/soup-message-io.c (soup_message_io_client,
839         soup_message_io_server, soup_message_io_unpause): Don't set up an
840         idle handler, just jump right in to reading/writing; if this is a
841         synchronous socket, then the caller wants to block, and if it's
842         not, then we'll quickly get an EAGAIN anyway.
843
844         * libsoup/soup-session.c: (queue_message): Likewise.
845         (*) Update for SoupMessageStatus move and remove
846         soup-message-private.h include.
847
848         * libsoup/soup-server-message.c: Remove soup-message-private.h
849         include.
850
851         * libsoup/soup-server.c: Likewise.
852
853         * libsoup/soup-connection.c (soup_connection_is_connected,
854         soup_connection_is_new): Remove these, since they weren't being
855         used.
856
857         * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
858         avoid namespace pollution.
859
860         * libsoup/soup-auth-digest.c: Update for that.
861         * libsoup/soup-server-auth.c: Likewise
862
863         * tests/auth-test.c: Remove soup-message-private.h include
864
865 2003-09-09  Dan Winship  <danw@ximian.com>
866
867         Beginnings of improved synchronous API support
868
869         * libsoup/soup-dns.c: Simplify this by making it not automatically
870         return the result: force the caller to poll. (This isn't really a
871         performance issue: the results should come back quickly anyway.)
872         Also, make the cache thread-safe.
873         (soup_dns_entry_from_name): Was soup_gethostbyname
874         (soup_dns_entry_from_addr): Was soup_gethostbyaddr
875         (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
876         (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
877         blocks if it's not resolved yet).
878
879         * libsoup/soup-address.c: Update for soup-dns changes.
880         (soup_address_new): Don't automatically start resolving the
881         hostname now, since we don't know if the caller is going to want
882         it resolved synchronously or asynchronously.
883         (soup_address_resolve_async): Renamed from soup_address_resolve.
884         (soup_address_resolve_sync): New routine to do blocking
885         synchronous DNS.
886
887         * libsoup/soup-socket.c (soup_socket_connect): Now returns a
888         status value directly when connecting synchronously.
889         (soup_socket_client_new_async, soup_socket_client_new_sync):
890         Separate async/sync client socket functions.
891         (soup_socket_get_iochannel): Made static since it was not used
892         outside soup-socket.
893
894         * libsoup/soup-connection.c (soup_connection_new,
895         soup_connection_new_proxy, soup_connection_new_tunnel): Just set
896         up the data, don't actually start connecting.
897         (soup_connection_connect_async, soup_connection_connect_sync): New
898         async and sync SoupConnection connecting routines.
899         (soup_connection_get_socket): Remove this since it wasn't being
900         used.
901
902         * libsoup/soup-session.c (final_finished): Run the queue since a
903         connection is now freed up.
904         (run_queue): Update for soup_connection_new* changes.
905
906         * libsoup/soup-misc.c (soup_substring_index): Remove, since it
907         wasn't being used any more.
908
909         * libsoup/soup-private.h: Remove some prototypes for functions
910         that no longer exist.
911
912         * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
913         (copies the protocol, host, and port of a SoupUri).
914
915         * tests/auth-test.c:
916         * tests/get.c:
917         * tests/simple-proxy.c: belatedly update for soup-session change
918
919         * tests/revserver.c: Handle each new connection in its own thread,
920         using synchronous SoupSocket calls.
921
922 2003-09-05  Dan Winship  <danw@ximian.com>
923
924         * libsoup/soup-session.c: Move a bunch of logic here from
925         soup-context. Now the session keeps track of hosts (instead of
926         having a global soup_hosts hash) and their connections.
927         (soup_session_new_with_proxy, soup_session_new_full): New session
928         constructors to specify a proxy or a proxy and connection limits
929         (send_request): Add Authorization and Proxy-Authorization headers
930         before sending off the request.
931         (soup_session_queue_message, et al): Improve the way this works.
932         There's no need to use timeouts to wait for connections to become
933         free; we *know* when they become free.
934
935         * libsoup/soup-private.h: Remove SoupHost and some other
936         no-longer-used stuff.
937
938         * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
939         soup_set_connection_limit, soup_set_connection_limit): Gone. These
940         are all per-session now.
941
942         * libsoup/soup-message.c: Remove all SoupContext references
943         (mostly replaced with SoupUri references)
944         (cleanup_message): priv->connect_tag and priv->connection are gone
945         now, so this was just soup_message_io_cancel(). So remove
946         cleanup_message and replace it with that everywhere.
947         (soup_message_disconnect): Gone.
948         (soup_message_set_uri): Replaces soup_message_set_context.
949         (soup_message_set_connection, soup_message_get_connection): Gone
950
951         * libsoup/soup-message-server-io.c (parse_request_headers):
952         s/soup_message_set_context/soup_message_set_uri/
953
954         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
955         connect_tag, context, and connection.
956
957         * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
958
959         * libsoup/soup-context.c: Gone
960
961         * tests/auth-test.c (identify_auth): update for session/context
962         changes
963
964 2003-09-03  Dan Winship  <danw@ximian.com>
965
966         * libsoup/soup-status.h: Renamed from soup-error.h, with types
967         and defines renamed accordingly.
968
969         * libsoup/soup-message.h (SoupMessage): Rename errorcode to
970         status_code and errorphrase to reason_phrase. Remove errorclass.
971         (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
972         as being either "errors" or "not errors", so its semantics are
973         guaranteed to be wrong sometimes.
974
975         * libsoup/soup-message.c (soup_message_set_status,
976         soup_message_set_status_full): Renamed
977
978         * libsoup/soup-message-handlers.c
979         (soup_message_add_status_code_handler,
980         soup_message_add_status_class_handler): Rename.
981
982         * libsoup/soup-session.c (soup_session_send_message): Make this
983         return a status code rather than a status class.
984
985         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
986         unrelated unused fields (retries, callback, user_data).
987
988         * ...: Updates
989
990 2003-09-02  Dan Winship  <danw@ximian.com>
991
992         * libsoup/soup-session.c: First draft at the new object to
993         maintain formerly-global state. (Not yet complete; still need to
994         get rid of SoupContext).
995
996         * libsoup/soup-message-queue.c: Data structure used by SoupSession
997
998         * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
999         some bits went into soup-connection.
1000
1001         * libsoup/soup-connection.c (soup_connection_send_request): New,
1002         to send a request on a connection. The connection updates its
1003         internal state and then hands off to soup_message_send_request.
1004         (request_done): Callback set up by soup_connection_send_request.
1005         Marks the connection as no-longer-in-use, and disconnects it if
1006         the message says to.
1007         (soup_connection_set_in_use, soup_connection_mark_old): No longer
1008         needed; the connection takes care of this itself now.
1009         (soup_connection_new_proxy): New, to create a new connection that
1010         is explicitly marked as being through an HTTP proxy.
1011         (soup_connection_new_tunnel): New, to create a new HTTPS
1012         connection through a proxy. (Includes the code to send the
1013         CONNECT.)
1014
1015         * libsoup/soup-context.c (try_existing_connections): Don't need to
1016         call soup_connection_set_in_use.
1017         (try_create_connection): Use soup_connection_new,
1018         soup_connection_new_proxy, or soup_connection_new_tunnel as
1019         appropriate.
1020
1021         * libsoup/soup-message.c (soup_message_prepare): Replaces
1022         queue_message.
1023         (soup_message_queue, soup_message_requeue, soup_message_prepare):
1024         Gone. This must be done via a SoupSession now.
1025         (soup_message_set_connection): don't need to mark in_use/not
1026         in_use. Also, msg->priv->socket is gone now.
1027         (soup_message_get_socket): Gone.
1028
1029         * libsoup/soup-message-handlers.c (soup_message_run_handlers):
1030         Remove references to global handlers.
1031         (redirect_handler, authorize_handler): Moved to soup-session.c.
1032
1033         * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
1034         session to shut down now.
1035
1036         * libsoup/soup.h: add soup-session.h
1037
1038         * libsoup/Makefile.am: updates
1039
1040         * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
1041         SoupSession.
1042
1043 2003-08-29  Dan Winship  <danw@ximian.com>
1044
1045         * libsoup/soup-message-io.c: Major rewrite. There is now only a
1046         single IO state object (instead of one for reading and one for
1047         writing), and the IO code handles switching back and forth between
1048         reading and writing as appropriate (including handling the extra
1049         switches needed for "Expect: 100-continue").
1050         (soup_message_io_client, soup_message_io_server): The new entry
1051         points.
1052         (soup_message_io_cancel): If the caller cancels the IO when we
1053         were expecting to read more data, disconnect the socket.
1054
1055         * libsoup/soup-message.h (SoupMessageFlags): add
1056         SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
1057         do the special expect-continue handling.
1058
1059         * libsoup/soup-message.c: Move all the signal stuff here. Remove
1060         the "done_reading" and "done_writing" signals and replace them
1061         with a single "finished" signal. (A single signal. Say that 10
1062         times fast!)
1063         (soup_message_got_headers, etc): Functions to emit signals.
1064         (got_headers, got_chunk, got_body): Default signal methods that
1065         call soup_message_run_handlers.
1066         (finished): Default signal method that replaces
1067         soup_message_issue_callback.
1068         ([various]): s/soup_message_issue_callback/soup_message_finished/
1069         (soup_message_requeue): There's no soup_message_set_read_callbacks
1070         any more, so if the caller requeues while it's still reading, just
1071         cancel the read.
1072         (soup_message_add_chunk, soup_message_add_final_chunk,
1073         soup_message_pop_chunk): Moved here from soup-server-message,
1074         although we don't actually quite support using chunked encoding
1075         for requests yet.
1076
1077         * libsoup/soup-server-message.c (soup_server_message_new): No
1078         longer takes a socket argument.
1079         (soup_server_message_add_chunk, soup_server_message_get_chunk):
1080         Moved into SoupMessage.
1081
1082         * libsoup/soup-message-handlers.c (global_handlers): Make these
1083         POST_BODY rather than PRE_BODY, so they won't mess up the IO
1084         channel when the requeue the message.
1085         (soup_message_run_handlers): Don't need to issue the message
1086         callback from here any more.
1087         (authorize_handler): Just leave the error as 401 or 407 (see
1088         soup-error.h change)
1089
1090         * libsoup/soup-message-client-io.c (soup_message_send_request):
1091         Replaces soup_message_write_request and
1092         soup_message_read_response.
1093
1094         * libsoup/soup-message-server-io.c: Parallel to
1095         soup-message-client-io.c, this defines the server-side header
1096         handling.
1097         (soup_message_read_request): Its entry point.
1098
1099         * libsoup/soup-server.c: Lots of code moved into
1100         soup-message-server-io.c. Update for other changes.
1101
1102         * libsoup/soup-queue.c: Update for changes
1103
1104         * libsoup/soup-socket.c (read_from_network, soup_socket_write):
1105         Don't call soup_socket_disconnect() on an error, just return
1106         SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
1107         signals that will mess up the caller of the read/write function.
1108
1109         * libsoup/soup-connection.c (soup_connection_disconnect): When
1110         disconnecting the socket, disconnect from its signals first to
1111         prevent bad reentrancy.
1112
1113         * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
1114         SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
1115         anything that SOUP_ERROR_UNATHORIZED and
1116         SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
1117         "transport" errors actually are transport-related.)
1118
1119         * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
1120
1121         * tests/simple-proxy.c: Complicate this a bunch. In particular,
1122         use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
1123         pass the data back to the client in chunked format.
1124
1125 2003-08-27  Dan Winship  <danw@ximian.com>
1126
1127         * libsoup/soup-types.h: New header with typedefs, to avoid
1128         #include loops among other headers.
1129
1130         * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
1131
1132         * libsoup/*.[ch], tests/*.c: Update for soup-types.h
1133         
1134 2003-08-26  Dan Winship  <danw@ximian.com>
1135
1136         * libsoup/soup-message-client-io.c (soup_message_write_request,
1137         soup_message_read_response): Higher-than-soup-message-io-level
1138         functions to do client-side IO. (Code that used to be in
1139         soup-queue.c)
1140         (get_request_header_cb): Fix a bug in the generation of the Host:
1141         header; need to include the port number if it's not the default.
1142
1143         * libsoup/soup-message-io.c (soup_message_write,
1144         soup_message_write_simple): Take separate user_datas for the get_*
1145         callbacks and the done callbacks.
1146
1147         * libsoup/soup-queue.c: Update to use soup_message_write_request
1148         and soup_message_read_response.
1149
1150         * libsoup/soup-connection.c (soup_connection_new): Change the
1151         prototype to take a SoupUri and a callback.
1152
1153         * libsoup/soup-context.c (try_create_connection,
1154         soup_context_connect_cb): Update for soup_connection_new change.
1155
1156         * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
1157         for soup_message_write changes
1158
1159         * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
1160         function
1161
1162 2003-08-26  Dan Winship  <danw@ximian.com>
1163
1164         * libsoup/soup-message-private.h: Define SoupMessage signal stuff
1165         (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
1166         WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
1167
1168         * libsoup/soup-message.c (class_init): set up signals
1169         (requeue_read_finished): Update for changes.
1170
1171         * libsoup/soup-message-io.c (soup_message_read): Split out
1172         parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
1173         arg to say where to store the message body. Set up
1174         read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
1175         signal handlers.
1176         (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
1177         (read_body_chunk): emit READ_CHUNK.
1178         (issue_final_callback): Set r->body. emit READ_BODY.
1179         (failed_read): emit READ_ERROR.
1180         (soup_message_read_set_callbacks): Disconnect old signal handlers,
1181         connect new ones.
1182         (soup_message_read_cancel): Disconnect signal handlers.
1183         (soup_message_write, soup_message_write_simple): Set up
1184         wrote_body_cb and error_cb as signal handlers.
1185         (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
1186         nothing currently ever listens for them. emit WROTE_BODY when
1187         done.
1188         (failed_write): emit WRITE_ERROR
1189
1190         * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
1191         soup_queue_read_headers_cb): Split this into two unequal chunks.
1192         (read_header_cb only runs the pre-body handlers).
1193         (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
1194         prototypes.
1195         (soup_queue_write_done_cb): Update call to soup_message_read
1196
1197         * libsoup/soup-server.c (parse_headers_cb): Renamed from
1198         read_headers_cb
1199         (read_done_cb): Update prototype
1200         (start_request): Update soup_message_read call.
1201
1202 2003-08-25  Dan Winship  <danw@ximian.com>
1203
1204         * libsoup/soup-message-io.c (soup_message_read,
1205         soup_message_write, soup_message_write_simple): Add a "user_data"
1206         arg, pass it to the callbacks.
1207
1208         * libsoup/soup-message.c (soup_message_requeue,
1209         requeue_read_finished, requeue_read_error): Update for that
1210
1211         * libsoup/soup-queue.c: Likewise
1212
1213         * libsoup/soup-server.c: Likewise
1214
1215 2003-08-25  Dan Winship  <danw@ximian.com>
1216
1217         * libsoup/soup-message.c (soup_message_new): Take a uri string
1218         instead of a context. Also, swap the args (so the method comes
1219         before the URI, just like in the protocol).
1220         (soup_message_new_from_uri): Like soup_messgae_new, but takes a
1221         SoupUri instead of a string
1222         (soup_message_set_request, soup_message_set_response): Replace
1223         soup_message_new_full.
1224         (cleanup_message): Was soup_message_cleanup, but is static now.
1225         (queue_message): Do the pre-queuing message cleanup here instead
1226         of in soup_queue_message.
1227         (soup_message_queue): Set the callback and user_data, then call
1228         queue_message.
1229         (requeue_read_error, requeue_read_finished, soup_message_requeue):
1230         Use queue_message
1231         (soup_message_get_uri): Replaces soup_message_get_context.
1232
1233         * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
1234         part of SoupMessagePrivate now)
1235
1236         * libsoup/soup-context.c: #include soup-message-private
1237         (soup_context_from_uri): constify the uri arg.
1238
1239         * libsoup/soup-queue.c: Various context/uri fixes
1240         (proxy_https_connect): Use soup_message_new_from_uri.
1241         (soup_queue_message): Drastically simplified since most of the
1242         work is in soup-messsage.c:queue_message() now
1243
1244         * libsoup/soup-auth-digest.c (compute_response,
1245         get_authorization): Use soup_message_get_uri.
1246
1247         * libsoup/soup-server-auth.c (parse_digest): Likewise
1248
1249         * libsoup/soup-server.c (call_handler): Likewise
1250
1251         * tests/simple-httpd.c (server_callback): Likewise.
1252
1253         * tests/simple-proxy.c (server_callback): Likewise
1254
1255         * tests/get.c (got_url): Likewise.
1256         (get_url): Update soup_message_new usage.
1257
1258         * tests/auth-test.c: #include soup-message-private. Update for
1259         context changes and soup_message_new change.
1260
1261 2003-08-22  Dan Winship  <danw@ximian.com>
1262
1263         * libsoup/soup-message-private.h: New file containing
1264         SoupMessagePrivate and some other soup-message-internal
1265         types/functions. Also includes the new, expanded SoupMessageStatus
1266         enum.
1267
1268         * libsoup/soup-message-io.c: Replaces what used to be in
1269         soup-transfer, but now all the interfaces take SoupMessages
1270         instead of SoupReader/SoupWriter and deal with maintaining
1271         msg->priv->{read,write}_state themselves. Fixes up all the
1272         refcounting madness.
1273
1274         * libsoup/soup-message-handlers.c: Move the handler code here,
1275         mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
1276         to make the distinction from SoupHandlerKind clearer.)
1277
1278         * libsoup/soup-message.c: Update for soup-message-io and new
1279         SoupMessageStatus values. Remove handler code.
1280         (soup_message_cleanup): Remove the hack to try to preserve the
1281         connection if the message gets cleaned up before it finishes
1282         reading. soup_message_requeue handles this in the requeuing case,
1283         and there's no especially compelling reason to bother doing it in
1284         any other case. (And the soup-message-io api doesn't support
1285         having a read operation that's not connected to any message.)
1286
1287         * libsoup/soup-private.h: remove SoupMessagePrivate
1288
1289         * libsoup/soup-queue.c: Update for soup-message-io and new
1290         SoupMessageStatus values.
1291
1292         * libsoup/soup-server-message.c: Likewise
1293
1294         * libsoup/soup-server.c: Likewise
1295
1296         * libsoup/soup-transfer.c: Gone (yay)
1297
1298         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
1299
1300 2003-08-20  Dan Winship  <danw@ximian.com>
1301
1302         * libsoup/soup-message.c: Make this a GObject. (Note that since
1303         SoupMessage was not refcounted before, it's not really refcounted
1304         now either. TBF)
1305         (soup_message_free): Gone, replaced by g_object_unref
1306         (soup_message_copy, soup_message_foreach_remove_header): Remove
1307         these, since neither was currently functional.
1308         (soup_message_is_keepalive): New utility function to look at
1309         HTTP version and request/response headers to decide if a message
1310         indicates the connection should be kept alive.
1311         (soup_message_set_connection, soup_message_get_connection): New
1312         (soup_message_get_socket): New
1313
1314         * libsoup/soup-server-message.c: Make this a subclass of
1315         SoupMessage.
1316         (soup_server_message_new): Now takes a SoupServer and SoupSocket
1317         (soup_server_message_get_server): New
1318         (soup_server_message_set_encoding,
1319         soup_server_message_get_encoding): Get/set whether the message
1320         should be sent with content-length or chunked encoding
1321         (soup_server_message_is_started, soup_server_message_is_finished):
1322         Private member accessors.
1323         (soup_server_message_add_chunk): Renamed from add_data
1324         (soup_server_message_get_chunk): Pops a chunk from the list.
1325         (soup_server_message_get_source): Gone
1326
1327         * libsoup/soup-server.c: Update for SoupServerMessage changes.
1328         (error_cb, write_done_cb): All the cleanup stuff that used to be
1329         here happens automatically by unreffing the message now.
1330         (get_response_header): Remove some erroneous leftover CGI stuff
1331         (issue_bad_request): add "Connection: close" to the response.
1332         (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
1333         with no Host header as per RFC 2616.
1334
1335         * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
1336         (soup_connection_set_in_use): Let the caller set the connection to
1337         "not in use" even after the socket has been disconnected.
1338
1339         * libsoup/soup-context.c: Use soup_message_get_connection
1340
1341         * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
1342         check on request length, since it was rejecting
1343         "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
1344
1345         * libsoup/soup-queue.c: Use soup_message_get_connection and
1346         soup_message_get_socket.
1347         (soup_queue_read_done_cb): Use soup_message_is_keepalive
1348         (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
1349         soup_connection_start_ssl
1350
1351         * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
1352         handlers if the socket hasn't been disconnected yet.
1353
1354         * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
1355         reader_read): Fix these so that reader_read will exit properly if
1356         the read is cancelled.
1357
1358         * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
1359
1360         * tests/simple-httpd.c (server_callback): set the message to
1361         content-length encoding.
1362         * tests/simple-proxy.c (server_callback): Likewise
1363
1364 2003-08-19  Dan Winship  <danw@ximian.com>
1365
1366         * libsoup/soup-socket.c (soup_socket_read,
1367         soup_socket_read_until, soup_socket_write): New API for doing
1368         socket IO. Works both synchronously and asynchronously, and
1369         buffers data to prevent the "100 Continue" problem.
1370         (soup_socket_set_flag): Replaces formerly-private
1371         soup_set_sockopts. (primarily to let the caller turn off
1372         SOUP_SOCKET_FLAG_NONBLOCKING).
1373
1374         * libsoup/soup-transfer.c (soup_transfer_read,
1375         soup_transfer_write, soup_transfer_write_simple): Take a
1376         SoupSocket instead of a GIOChannel. Use the new socket IO api.
1377         Changed the prototypes of some of the callbacks to be less
1378         hackish.
1379
1380         * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
1381         soup_connection_get_iochannel.
1382
1383         * libsoup/soup-message.c: Fix up for soup-transfer changes
1384
1385         * libsoup/soup-queue.c: Likewise
1386
1387         * libsoup/soup-server.c: Likewise
1388
1389         * tests/revserver.c: A slightly more complicated replacement for
1390         timeserver. (Does both reads and writes)
1391
1392 2003-08-19  Dan Winship  <danw@ximian.com>
1393
1394         * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
1395         configure it, and no one has complained, and it looks like the
1396         SOCKS5 auth code doesn't actually work anyway...
1397
1398         * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
1399
1400         * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
1401         SOUP_PROTOCOL_SOCKS5
1402
1403         * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
1404
1405         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
1406         soup-socks.[ch]
1407
1408 2003-08-19  Dan Winship  <danw@ximian.com>
1409
1410         * libsoup/soup-server.c: Make this a GObject. Remove
1411         SoupServerMessage code (to soup-server-message.c). Remove CGI
1412         server code (for now?)
1413         (soup_server_add_handler, soup_server_remove_handler): Rename
1414         (from register/unregister) to make it clearer what they do.
1415
1416         * libsoup/soup-server-message.c: Moved out of soup-server.c
1417
1418         * libsoup/soup-private.h: Remove SoupServer def
1419
1420         * libsoup/Makefile.am (libsoupinclude_HEADERS,
1421         libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
1422
1423         * tests/simple-httpd.c: 
1424         * tests/simple-proxy.c: Update for SoupServer changes
1425
1426 2003-08-18  Dan Winship  <danw@ximian.com>
1427
1428         * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
1429         a struct sockaddr again (like it used to be). In particular, add
1430         back the "port" field. Add a bunch of macros to try (and fail) to
1431         simplify some of the code.
1432         (soup_address_new): Now returns a SoupAddress directly rather than
1433         a random handle, and the caller can just use g_object_unref to
1434         cancel the lookup. Also, the callback now uses a
1435         SoupKnownErrorCode rather than a special-purpose address-lookup
1436         error code.
1437         (soup_address_new_cancel): No longer needed.
1438         (soup_address_new_sync): Removed
1439         (soup_address_new_any): Replaces soup_address_ipv4_any and
1440         soup_address_ipv6_any.
1441         (soup_address_get_name, etc): Gone. Use soup_address_resolve()
1442         now.
1443         (soup_address_get_physical): Renamed from
1444         soup_address_get_canonical_name.
1445         (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
1446
1447         * libsoup/soup-socket.c: Update for SoupAddress changes and make
1448         similar changes here.
1449         (soup_socket_new): Just creates a generic SoupSocket now.
1450         (soup_socket_connect): Client setup
1451         (soup_socket_listen): Server setup. Now also sets up an iochannel
1452         listening for connects and emits a "new_connection" signal as they
1453         come in.
1454         (soup_socket_start_ssl): Turns on SSL.
1455         (soup_socket_client_new, soup_socket_server_new): Utility
1456         functions that wrap the above.
1457         (soup_socket_new_cancel, soup_socket_new_sync): Gone
1458         (soup_socket_server_accept, soup_socket_server_try_accept): No
1459         longer needed.
1460         (soup_socket_get_iochannel): No longer adds a ref when returning
1461         the iochannel. Also, we set it to "close_on_unref" so that if a
1462         caller adds a ref to it, the connection will actually remain open
1463         even after the SoupSocket is destroyed.
1464         (soup_socket_get_local_address, soup_socket_get_remote_address):
1465         Let the caller get both of these.
1466
1467         * libsoup/soup-connection.c: Don't keep a private copy of the
1468         socket's iochannel.
1469         (soup_connection_new): Don't need to set socket options here.
1470         SoupSocket does it.
1471         (soup_connection_start_ssl): Just call soup_socket_start_ssl.
1472         (soup_connection_get_iochannel): Just return the socket's
1473         iochannel (and don't ref it)
1474
1475         * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
1476         SOUP_ERROR_CANT_RESOLVE_PROXY
1477
1478         * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
1479         Remove the "FIXME add a CANT_RESOLVE error" and return
1480         SOUP_ERROR_CANT_RESOLVE instead.
1481
1482         * libsoup/soup-server.c: Update for socket/address changes. Don't
1483         poke into SoupSocket's private fields.
1484         (soup_server_run_async): Just connect to the socket's
1485         "new_connection" signal.
1486
1487         * libsoup/soup-context.c (try_create_connection,
1488         soup_context_connect_cb): Update for socket changes. Replace
1489         SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
1490
1491         * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
1492         to connect to a signal handler and connect another function to
1493         clean up the first signal handler after its first invocation.
1494         (Lets us use signals to replace one-off callbacks.)
1495
1496         * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
1497         actually private now.
1498         (struct _SoupServer): Remove accept_tag.
1499
1500         * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
1501         Don't unref the iochannel.
1502         (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
1503
1504         * libsoup/soup-socks.c: Update for socket/address changes
1505
1506         * tests/simple-httpd.c (main):
1507         s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
1508         * tests/simple-proxy.c (main): Likewise
1509
1510         * tests/timeserver.c: Update for SoupSocket's "new_connection"
1511         signal, and for SoupAddress changes.
1512
1513 2003-08-14  Dan Winship  <danw@ximian.com>
1514
1515         * libsoup/soup-connection.c: New, split out from soup-context and
1516         made into a GObject.
1517         (soup_connection_disconnect): Disconnects the connection and emits
1518         a signal. (Replaces the old "keep_alive" flag.)
1519         (soup_connection_is_connected): Checks if the connection is still
1520         connected
1521         (connection_died): Just disconnect, rather than freeing the
1522         connection. This way if anyone else is still referencing it they
1523         won't end up with an invalid pointer.
1524
1525         * libsoup/soup-context.c: Make this a GObject, remove all the
1526         SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
1527         SoupContext can keep track of connection auth stuff there without
1528         SoupConnection needing to care. Various other updates.
1529
1530         * libsoup/soup-private.h: Remove SoupContext and SoupConnection
1531         definitions.
1532
1533         * libsoup/*.c, tests/get.c: Update for context/connection changes
1534
1535         * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
1536         definition to deal with the fact that there's no
1537         soup_connection_get_context any more.
1538
1539         * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
1540         with connection persistence here.
1541         (soup_queue_read_done_cb): Do it here instead. Disconnect the
1542         connection when appropriate.
1543         (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
1544         Reference-count the connection properly. (I think.)
1545
1546         * libsoup/soup-marshal.list: New, for SoupConnection's
1547         "disconnected" signal.
1548
1549         * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
1550
1551         * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
1552         GLIB_GENMARSHAL gets set too.
1553
1554 2003-08-14  Dan Winship  <danw@ximian.com>
1555
1556         * libsoup/soup-error.c: Fix a spelling mistake.
1557
1558         * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
1559
1560 2003-08-12  Dan Winship  <danw@ximian.com>
1561
1562         * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
1563         of the interfaces around a little bit.
1564
1565         * libsoup/soup-auth-basic.c: subclass for Basic auth
1566
1567         * libsoup/soup-auth-digest.c: subclass for Digest auth
1568
1569         * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
1570         the code from soup-ntlm.c here, and make it private.
1571
1572         * libsoup/soup-ntlm.c: gone
1573
1574         * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
1575         here, and change the signature of SoupAuthorizeFn.
1576
1577         * libsoup/soup-context.c: Use g_object_unref to free auths, use
1578         methods instead of directly access private fields.
1579
1580         * libsoup/soup-queue.c: Likewise
1581
1582         * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
1583         NTLM references. We have no plans to implement server-side NTLM
1584         auth.
1585
1586         * tests/auth-test.c (identify_auth): Update for auth api changes
1587
1588 2003-08-12  Dan Winship  <danw@ximian.com>
1589
1590         * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
1591         call
1592
1593         * libsoup/soup-address.c: Make this a GObject.
1594         (soup_address_ref, soup_address_unref): Gone.
1595         (soup_address_copy): Gone. Wasn't being used anyway.
1596
1597         * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
1598         here from soup-address.c, so that soup-address doesn't need to
1599         worry about trying to cache zero-ref addresses.
1600
1601         * libsoup/soup-socket.c: Make this a GObject. Use "guint"
1602         consistently for port numbers.
1603         (soup_socket_ref, soup_socket_unref): Gone.
1604
1605         * libsoup/soup-private.h: Change the SoupSocket definition to be
1606         SoupSocketPrivate. (Still need to keep this here since soup-server
1607         pokes around in its internals.)
1608         (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
1609
1610         * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
1611         reader/writer rather than leaking them.
1612
1613         * libsoup/*: Use GObject methods for socket/address refcounting
1614         
1615         * tests/auth-test.c (main)
1616         * tests/timeserver.c (main): Call g_type_init.
1617
1618         * tests/get.c (main): Call g_type_init.
1619         (get_url, got_url): Fix some bugs that could make -r mode get into
1620         infinite loops downloading the same files over and over. Plug some
1621         memory leaks to make this more useful for valgrinding libsoup.
1622
1623         * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
1624         handler for SIGINT so we can exit cleanly, since valgrind won't
1625         give a leak report if you don't. Plug a few memory leaks.
1626
1627         * tests/simple-proxy.c (main): Likewise 
1628
1629 2003-08-12  Dan Winship  <danw@ximian.com>
1630
1631         Pull over some new test programs from the soup-refactoring branch,
1632         along with the SoupUri changes they depend on.
1633
1634         * tests/simple-httpd.c: A really simple HTTP server, to test the
1635         server code.
1636
1637         * tests/simple-proxy.c: An even simpler HTTP proxy
1638
1639         * tests/get.c: Add "-r" flag to recursively get files (thereby
1640         testing multiple-connections-at-once code). Also good for setting
1641         up a tree to use with simple-httpd.
1642
1643         * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
1644         normal case)
1645
1646         * tests/uri-parsing.c: Regression test for the new soup-uri.c
1647
1648         * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
1649         pull in some optimizations from camel-url. Also, make SoupProtocol
1650         a GQuark so we can still compare them with ==, but we can also
1651         recognize any protocol.
1652         (soup_uri_new_with_base): New, to merge base and relative URIs
1653         (soup_uri_to_string): Update this. Change the "show_password" flag
1654         (which we always passed FALSE for) to "just_path", for places that
1655         want the path+query without the protocol, host, etc.
1656
1657         * libsoup/soup-queue.c (soup_get_request_header): Just use
1658         soup_uri_to_string to generate the request URI.
1659
1660         * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
1661         "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
1662         the URI by hand badly.
1663         * libsoup/soup-server-auth.c (parse_digest): Likewise
1664
1665         * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
1666         switch() to an series of if()s since SOUP_PROTOCOL_* aren't
1667         constants any more.
1668
1669         * libsoup/soup-context.c (soup_context_uri_hash,
1670         soup_context_uri_equal): s/querystring/query/
1671
1672 2003-08-12  Dan Winship  <danw@ximian.com>
1673
1674         * configure.in: Bump API version to 2.2 and package version to
1675         2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
1676         libgnutls-config to find GNUTLS.
1677
1678         * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
1679
1680         * Makefile.am: Update for pc file rename
1681
1682         * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
1683         and libsoup-ssl-proxy stuff.
1684
1685         * libsoup/soup-ssl-proxy.c
1686         * libsoup/soup-nss.[ch]
1687         * libsoup/soup-openssl.[ch]: gone
1688
1689         * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
1690
1691         * tests/Makefile.am (get_LDADD, timeserver_LDADD,
1692         auth_test_LDADD): Update libsoup version
1693
1694 2003-08-07  Dan Winship  <danw@ximian.com>
1695
1696         * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
1697         soup_auth_invalidate): These are all really SoupContext functions,
1698         so move them to soup-context.c (and rename them appropriately).
1699         (soup_auth_get_protection_space): New method to get the
1700         "protection space" of an auth (paths where it is valid).
1701         (soup_auth_invalidate): New method to try to un-authenticate an
1702         auth (so we can keep the domain info cached even if the auth info
1703         is wrong).
1704         (basic_pspace_func): Basic protection space is all directories
1705         below the current one.
1706         (basic_invalidate_func): Clear the encoded username/password
1707         (digest_pspace_func): Digest protection space is either the whole
1708         server, or "what the domain parameter says" (though we don't deal
1709         with cross-host domains).
1710         (digest_invalidate_func): Return FALSE; bad digest auth info isn't
1711         cacheable.
1712         (digest_parse_func, digest_free): Set/free domain parameter
1713         (ntlm_pspace): NTLM protection space is always the whole server.
1714         (ntlm_invalidate): Clear the auth state.
1715         (soup_auth_new_ntlm): Make this non-static
1716         (SoupAuth): Replace the quad-state "status" field with an
1717         "authenticated" boolean.
1718         
1719         * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
1720         hash with separate "auth_realms" (path->realm) and "auths"
1721         (realm->auth) hashes. Also add a "use_ntlm" flag.
1722
1723         * libsoup/soup-context.c (soup_context_unref): Update SoupHost
1724         freeing code.
1725         (connection_free): Don't the connection's auth, just free it.
1726         (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
1727         does two-stage lookup (path->realm then realm->auth) and also
1728         deals with NTLM hacks.
1729         (soup_context_update_auth): Mostly formerly soup_auth_set_context,
1730         but also large parts of authorize_handler. Updates the auth hashes
1731         based on information from a 401 or 407 response. Does a better job
1732         than authorize_handler did of not throwing away good information.
1733         (soup_context_preauthenticate): New; fakes up auth info so that
1734         requests will end up using authentication without the server
1735         needing to return an error first.
1736         (soup_context_authenticate_auth): Moved out of authorize_handler
1737         so it can be used at request-sending time too, if we know that we
1738         need it. (That way we can avoid requeuing the request if it isn't
1739         going to be able to be authenticated.)
1740         (soup_context_invalidate_auth): Sort of like the old
1741         soup_auth_invalidate, but only destroys the auth data, while still
1742         remembering the path->realm mapping.
1743
1744         * libsoup/soup-message.c (authorize_handler): Mostly moved into
1745         soup_context_update_auth.
1746         (maybe_validate_auth): Remove this; it was only useful because of
1747         bugs elsewhere in the auth handling.
1748         
1749         * libsoup/soup-queue.c (soup_encode_http_auth): Update for
1750         soup_context_lookup_auth. If the returned auth isn't
1751         authenticated, call soup_context_authenticate_auth() on it.
1752
1753         * tests/auth-test.c: New (from soup-refactoring branch). Tests
1754         that the Basic/Digest auth code does the right thing. (TODO: find
1755         a good way to add NTLM tests too.)
1756
1757         * tests/Makefile.am (check_PROGRAMS): add auth-test
1758
1759 2003-07-29  Dan Winship  <danw@ximian.com>
1760
1761         * configure.in: 1.99.25 ("Potato and Leek Soup")
1762
1763         * libsoup/soup-message.c (requeue_read_finished,
1764         release_connection): Free the passed-in body data. Otherwise the
1765         response body ends up getting leaked on most 3xx and 4xx
1766         responses.
1767         (soup_message_cleanup): Remove a piece of code that didn't
1768         actually do anything and its associated confused comment.
1769
1770         * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
1771
1772         * libsoup/soup-context.c (connection_free): plug a non-occasional
1773         NTLM auth leak.
1774
1775 2003-06-26  Joe Shaw  <joe@ximian.com>
1776
1777         * configure.in: Version 1.99.24
1778
1779 2003-06-24  Dan Winship  <danw@ximian.com>
1780
1781         * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
1782         it, and (b) depends on lots of new things sometimes (like on RH9).
1783
1784         * libsoup/soup-openssl.c: 
1785         * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
1786         just #ifdef HAVE_OPENSSL since the header check doesn't get run in
1787         the pkgconfig case
1788
1789 2003-06-19  Dan Winship  <danw@ximian.com>
1790
1791         * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
1792         old read_tag before changing/clearing it.
1793         (soup_queue_write_done_cb): Likewise with the write_tag.
1794
1795         * libsoup/soup-transfer.c (issue_final_callback): ref the reader
1796         around the stop+callback.
1797         (soup_transfer_write_cb): Likewise.
1798
1799 2003-06-12  Dan Winship  <danw@ximian.com>
1800
1801         * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
1802         ref_count field.
1803         (soup_transfer_read, create_writer): Set initial ref_count to 2
1804         (one for soup-transfer, one for the caller).
1805         (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
1806         reader
1807         (soup_transfer_read_stop): Clears the GIOChannel callbacks and
1808         drops soup-transfer's ref.
1809         (soup_transfer_read_cancel): Now just a stop+unref
1810         (soup_transfer_write_ref, soup_transfer_write_unref,
1811         soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
1812
1813         * libsoup/soup-message.c (soup_message_cleanup): when setting up
1814         the "finish reading" callbacks, unref the reader so it will be
1815         destroyed once it's done reading.
1816         (soup_message_requeue): Likewise.
1817
1818         * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
1819         prototype change (no longer returns a SoupTransferDone).
1820         (soup_queue_read_chunk_cb): Likewise.
1821
1822         * libsoup/soup-server.c (read_headers_cb): Likewise
1823
1824 2003-06-11  Dan Winship  <danw@ximian.com>
1825
1826         * libsoup/soup-transfer.c: Change all functions to take a
1827         SoupReader * or SoupWriter * instead of a guint.
1828
1829         * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
1830         write_tag pointers instead of guints.
1831
1832 2003-06-02  Chris Toshok  <toshok@ximian.com>
1833
1834         * libsoup/soup-ssl.c: remove #include for soup-nss.h
1835
1836 2003-06-02  Chris Toshok  <toshok@ximian.com>
1837
1838         * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
1839         (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
1840         (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
1841
1842 2003-06-02  Chris Toshok  <toshok@ximian.com>
1843
1844         * configure.in: Bump version to 1.99.23.
1845
1846 2003-05-30  Chris Toshok  <toshok@ximian.com>
1847
1848         * libsoup/soup-queue.c (soup_queue_error_cb): always force a
1849         reconnect when there's an error with ssl connection.  This fixes
1850         #43387, but it runs the risk of sending requests multiple times to
1851         the exchange server, and it results in lots of shorter lived
1852         connections and more forking (in the ssl proxy case), depending on
1853         the length of the operation.
1854
1855 2003-05-21  Dan Winship  <danw@ximian.com>
1856
1857         * configure.in: 1.99.22 (codename: French Onion Soup)
1858
1859 2003-05-20  Dan Winship  <danw@ximian.com>
1860
1861         * libsoup/soup-message.c (soup_message_requeue): Clear the
1862         write_tag as well so we don't double-cancel it. #43395.
1863
1864         * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
1865         be destroyed by the end of the func, so we have to call
1866         soup_connection_set_used at the beginning.
1867
1868         * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
1869         Call g_set_error() so that we don't SEGV immediately after
1870         returning G_IO_STATUS_ERROR.
1871
1872 2003-05-08  Joe Shaw  <joe@ximian.com>
1873
1874         * configure.in: Bump version to 1.99.21
1875
1876         * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
1877         tunnelling fails, the other message which shares our same
1878         connection will free it first, so set ours to NULL.
1879
1880 2003-05-08  Dan Winship  <danw@ximian.com>
1881
1882         * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
1883         return an NTLM request string. Otherwise return the "response"
1884         field (which should include the NTLM authenticate message)
1885         (ntlm_init): Don't bother setting "response" to the NTLM request
1886         string. Just leave it NULL in that case.
1887
1888         * libsoup/soup-message.c (authorize_handler): Never try to reuse
1889         an NTLM auth returned from soup_auth_lookup. Only set the auth on
1890         the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
1891         call soup_auth_set_context() on it just like for non-NTLM auth.
1892         The net effect of all of this is that now we record when a context
1893         needs NTLM auth just like with non-NTLM auth, so that that info
1894         gets preserved across connections.
1895         (soup_message_requeue): No longer need the hackery here to
1896         preserve the connection auth state.
1897
1898 2003-05-07  Dan Winship  <danw@ximian.com>
1899
1900         * libsoup/soup-context.c (soup_connection_set_in_use): New, to
1901         toggle the connection's in_use flag, and set up the death watch
1902         when it's not in use.
1903         (connection_death): This is only hooked up when the connection is
1904         not in use now, so don't need to check that. Should fix the
1905         infinite connection_death loop.
1906         (soup_connection_is_new): Keep a distinct "new" flag rather than
1907         defining "new" as "has been released at least once".
1908         (soup_connection_set_used): Mark a connection no-longer new.
1909         (soup_context_connect_cb): Mark the connection as new. Don't set
1910         up the death watch since it's in_use.
1911         (try_existing_connections): Use soup_connection_set_in_use.
1912         (soup_connection_release): Likewise
1913
1914         * libsoup/soup-message.c (requeue_read_finished): Call
1915         soup_connection_set_used so that the connection isn't still
1916         considered new when we send the message the second time.
1917
1918         * libsoup/soup-queue.c (soup_queue_error_cb): Call
1919         soup_connection_set_used (assuming we don't close the connection)
1920         (soup_queue_read_done_cb): Likewise.
1921
1922         * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
1923         nothing, call soup_transfer_read_error_cb rather than just
1924         cancelling, or else it will get cancelled again later.
1925
1926 2003-05-07  Dan Winship  <danw@ximian.com>
1927
1928         * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
1929         library doesn't depend on them, only the proxy does. #42473
1930
1931 2003-05-06  Dan Winship  <danw@ximian.com>
1932
1933         * src/libsoup/soup-message.c (global_handlers): Change the
1934         redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
1935         SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
1936         for "Location" to get around the non-64-bit-clean union
1937         initialization pointed out by Jeremy Katz <katzj@redhat.com>.
1938         (redirect_handler): Update for that.
1939
1940 2003-04-28  Dan Winship  <danw@ximian.com>
1941
1942         * configure.in: 1.99.20
1943
1944         * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
1945         we always call UNIGNORE_CANCEL. Might fix #41971
1946
1947 2003-04-25  Dan Winship  <danw@ximian.com>
1948
1949         * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
1950         suddenly gets an io error while reading or writing, assume it's a
1951         timeout or something, close the connection, and requeue the
1952         message.
1953
1954 2003-04-23  Dan Winship  <danw@ximian.com>
1955
1956         * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
1957         soup-transfer callbacks to keep reading off the connection unless
1958         we're actually going to keep the connection around afterward.
1959         Otherwise we can just close it.
1960
1961         * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
1962         thingy so that it's possible to cancel a read from inside a
1963         callback so that the above change actually works instead of just
1964         crashing.
1965
1966 2003-04-20  Rodney Dawes  <dobey@ximian.com>
1967
1968         * configure.in: Up version to 1.99.18
1969         * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
1970         
1971 2003-04-11  Dan Winship  <danw@ximian.com>
1972
1973         * libsoup/soup-context.c (soup_connection_purge_idle): New
1974         function to close all idle connections. (Needed for #41117 or else
1975         there's no way to force-discard NTLM authentication.)
1976
1977         * libsoup/soup-queue.c (soup_queue_shutdown): Use it
1978
1979 2003-04-10  Joe Shaw  <joe@ximian.com>
1980
1981         * libsoup/soup-queue.c (proxy_https_connect):
1982         proxy_https_connect_cb() might not get called if connecting to the
1983         proxy fails, and it causes us to double-free the connection.
1984         Always set the message's connection to NULL before freeing it.
1985
1986 2003-04-09  Dan Winship  <danw@ximian.com>
1987
1988         * configure.in: 1.99.17
1989
1990 2003-04-07  Dan Winship  <danw@ximian.com>
1991
1992         * libsoup/soup-context.c (connection_death): Revert Joe's changes.
1993         We can't release the connection there because there may be
1994         SoupMessages still pointing to it. (Needs to be revisited.)
1995
1996 2003-04-03  JP Rosevear  <jpr@ximian.com>
1997
1998         * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
1999         error during waitpid
2000
2001         * libsoup/soup-address.c: ditto
2002
2003 2003-04-02  Joe Shaw  <joe@ximian.com>
2004
2005         * libsoup/soup-context.c (connection_death): Only drop the
2006         connection if we get an error condition on the channel.  Fixes a
2007         double-free.
2008
2009 2003-04-02  Joe Shaw  <joe@ximian.com>
2010
2011         * libsoup/soup-context.c (connection_death): Just call
2012         soup_connection_release() from here and return whether the
2013         connection is in use.
2014
2015 2003-03-31  Ian Peters  <itp@ximian.com>
2016
2017         * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
2018         case of EAGAIN or EINTR, since shutting down an SSL connection
2019         requires more than just closing a socket.
2020
2021 2003-03-28  Dan Winship  <danw@ximian.com>
2022
2023         * libsoup/soup-message.c (soup_message_set_context): If the new
2024         context points to a different server from the old context, call
2025         soup_message_cleanup. Otherwise it tries to reuse the old
2026         connection...
2027
2028 2003-03-25  Joe Shaw  <joe@ximian.com>
2029
2030         * configure.in: Bump up to 1.99.16
2031
2032 2003-03-24  Joe Shaw  <joe@ximian.com>
2033
2034         * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
2035         slightly better error message on various SSL failures than the
2036         previous message.
2037
2038         * soup-queue.c (soup_queue_error_cb): Throw the
2039         SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
2040
2041 2003-03-21  Joe Shaw  <joe@ximian.com>
2042
2043         * soup-server.c: Use non-deprecated g_main_loop_* calls
2044         throughout.
2045         (soup_server_unref): Don't unref the main loop if it's NULL.
2046         Fixes a glib warning.
2047
2048 2003-03-18  Dan Winship  <danw@ximian.com>
2049
2050         * configure.in: comment out NSS checks. The NSS code doesn't work
2051         and there are no current plans to fix it.
2052
2053         * README (Features): Mention GnuTLS, remove NSS and the rest of
2054         the "Planned Features" section.
2055
2056         * MAINTAINERS: remove Alex
2057
2058         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
2059         timeout to 10 seconds (and get rid of the 3 tries) so we don't
2060         fail to connect just because the server is slow/far away.
2061
2062 2003-03-17  Joe Shaw  <joe@ximian.com>
2063
2064         * configure.in: Bump up to 1.99.15.
2065
2066 2003-03-12  Ian Peters  <itp@ximian.com>
2067
2068         * libsoup/soup-gnutls.c: because creating client credentials is
2069         expensive, keep the same one around as long as possible, only
2070         recreating it if the ssl_ca_file changes.  Wrap
2071         gnutls_certificate_credentials in a refcounted struct to avoid
2072         freeing it while another established connection may potentially
2073         need it (say, to rehandshake).
2074
2075 2003-03-11  Frank Belew  <frb@ximian.com>
2076
2077         * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't 
2078         use pkgconfig
2079
2080 2003-03-10  Joe Shaw  <joe@ximian.com>
2081
2082         * configure.in: Bump up to 1.99.14.
2083
2084         * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
2085         libsoup/soup-ssl.c: Add support for GnuTLS.  Patch from Ian
2086         Peters.
2087
2088 2003-03-07  Joe Shaw  <joe@ximian.com>
2089
2090         * configure.in: Bump up to 1.99.13.
2091
2092         * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
2093         the list of conditions to watch.  If the remote end hangs up the
2094         connection, we'll get a successful read of 0 bytes, not a HUP.
2095         The connection will have to be released by the point we check for
2096         it in connection_death().
2097
2098         * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
2099         (apparently) errant resetting of the read and write tags.  I think
2100         this might have been causing some reentrancy and crashes.
2101
2102         * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
2103         channel to NULL encoding and not buffered.
2104
2105         * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
2106         incorrect comments.
2107
2108 2003-02-28  Joe Shaw  <joe@ximian.com>
2109
2110         * configure.in: Bump up to 1.99.12.
2111
2112         * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
2113         header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
2114         this case we probably don't want to call the error callback, we
2115         just want to act like our transfer was cancelled.
2116
2117 2003-02-27  Joe Shaw  <joe@ximian.com>
2118
2119         Try to apply some order to the iochannel refcounting...
2120
2121         * configure.in: Bump up to 1.99.11.
2122
2123         * libsoup/soup-context.c (soup_connection_get_iochannel): The
2124         connections needs to own a reference to the iochannel!  If we're
2125         using HTTPS, release the ref we get from soup_socket_get_iochannel
2126         and replace it with the ref we get from soup_ssl_get_iochannel().
2127         Then, always ref the channel that we return (ugh, but that's the
2128         soup way).
2129         (connection_free): Release the connection's ref to the iochannel.
2130
2131         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
2132         iochannel. The reference we pass back will be owned by the
2133         connection.
2134         (soup_ssl_hup_waitpid): Release our ref.
2135
2136 2003-02-27  Joe Shaw  <joe@ximian.com>
2137
2138         * configure.in: Bump up to 1.99.10.
2139
2140         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
2141         iochannel, return to the status quo.  Sigh.
2142
2143 2003-02-26  Joe Shaw  <joe@ximian.com>
2144
2145         * configure.in: Bump up to 1.99.9.
2146
2147         * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
2148         it's causing problems with HTTPS and proxies; the iochannel
2149         refcounting is waaaaaay horked.
2150
2151 2003-02-26  Frank Belew  <frb@ximian.com>
2152
2153         * libsoup/Makefile.am: added workaround to link ssl-proxy statically
2154
2155 2003-02-11  Joe Shaw  <joe@ximian.com>
2156
2157         * configure.in: Bump up to 1.99.8 for snaps.
2158
2159         * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
2160         It returns the address to the resulting hostent or NULL on failure,
2161         unlike Linux which returns an error code.
2162
2163 2003-02-11  Joe Shaw  <joe@ximian.com>
2164
2165         * configure.in: Bump up to 1.99.7 for snaps.
2166
2167         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
2168         the error string from OpenSSL if we can't establish a connection.
2169
2170 2003-02-04  Joe Shaw  <joe@ximian.com>
2171
2172         * configure.in: Bump up to 1.99.6 for snaps.
2173
2174         * libsoup/soup-server.c (destroy_message): We already assigned
2175         chan, so don't reassign it, and unref it in all cases.
2176         (issue_bad_request): Always unref after a call to
2177         soup_socket_get_iochannel(), because it refs it.
2178         (conn_accept): Fix some funky GIOChannel reffing here.
2179
2180         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
2181         g_io_channel_ref() on the socket.  This is the exact opposite of
2182         what we want to do.  Create a temporary structure containing the
2183         parent pid and the old socket and unref the socket when our
2184         callback is called.  This should fix GIOChannels being leaked on
2185         SSL connections.
2186
2187         * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
2188         main loop quits.
2189
2190 2003-01-22  Joe Shaw  <joe@ximian.com>
2191
2192         * configure.in: Bump up to 1.99.5 for the snaps.
2193
2194         * libsoup/soup-address.c (soup_address_new): If we found the
2195         address in our hash, we need to return NULL or else Soup will
2196         think we're doing an async lookup and do some cancellation on
2197         us.  Besides, we were returning the wrong type anyway and it
2198         was crashing things.
2199
2200 2003-01-17  Joe Shaw  <joe@ximian.com>
2201
2202         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
2203         uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
2204         out, so keep trying until we succeed.
2205
2206 2003-01-10  Joe Shaw  <joe@ximian.com>
2207
2208         * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
2209         strings and print out the error when the cert can't verify.
2210
2211 2003-01-09  Dan Winship  <danw@ximian.com>
2212
2213         * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
2214         overrun noticed by valgrind
2215
2216 2002-12-20  Joe Shaw  <joe@ximian.com>
2217
2218         * libsoup/soup-server.c (soup_server_new_with_host): Added.
2219         Starts a server only on the interface specified, instead of all
2220         network interfaces.
2221
2222 2002-12-16  Jeremy Katz  <katzj@redhat.com>
2223
2224         * configure.in: use $libdir instead of /usr/lib when looking for
2225         libraries
2226
2227 2002-12-11  Joe Shaw  <joe@ximian.com>
2228
2229         * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
2230         Don't set a variable to NULL and then immediately try to
2231         dereference it.
2232
2233 2002-12-09  Joe Shaw  <joe@ximian.com>
2234
2235         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
2236         timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
2237         we don't hang forever if we don't get more data.
2238
2239         * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
2240         or else we'll hang forever in SSL_connect() if the other side
2241         hangs up.
2242
2243         * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
2244         release the connection on message free, even if the connection was
2245         unsuccessful.
2246
2247 2002-12-03  Joe Shaw  <joe@ximian.com>
2248
2249         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
2250         g_io_channel_set_close_on_unref() on the second half of the socket
2251         pair so we don't leak file descriptors.
2252
2253 2002-12-03  Frank Belew  <frb@ximian.com>
2254
2255         * libsoup/soup-address.c: add signal.h to the list of headers to 
2256         pick up SIGKILL
2257         
2258 2002-11-25  Joe Shaw  <joe@ximian.com>
2259
2260         * Makefile.am: Build the tests directory again
2261
2262 2002-11-21  Rodney Dawes  <dobey@ximian.com>
2263
2264         * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
2265         
2266 2002-11-20  Michael Meeks  <michael@ximian.com>
2267
2268         * configure.in: require autoconf 2.52 not 2.53.
2269
2270 2002-11-18  Dan Winship  <danw@ximian.com>
2271
2272         * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
2273         since it's apparently non-portable. Use s6_addr instead.
2274         (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
2275
2276         * libsoup/soup-error.c: Fix spelling of
2277         SOUP_ERROR_MOVED_PERMANENTLY and its description.
2278
2279         * libsoup/soup-message.c (soup_message_get_request_header, etc):
2280         Remove long-deprecated API.
2281
2282         * libsoup/soup-socket.c (soup_socket_connect): remove unused
2283         variable.
2284
2285         * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
2286         * libsoup/soup-server.c (cgi_read): Likewise
2287         * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
2288         Likewise.
2289         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
2290         * libsoup/soup-transfer.c (soup_transfer_read_cb,
2291         soup_transfer_write_cb): Likewise.
2292
2293         * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
2294         instead of IPv4. (Tested on OS X.)
2295
2296 2002-11-15  Dan Winship  <danw@ximian.com>
2297
2298         * libsoup/*: Change old Helix Code refs to Ximian (and update
2299         copyright dates).
2300
2301 2002-11-15  Frank Belew  <frb@ximian.com>
2302
2303         * tests/Makefile.am: uncomment lines to make timeserver build 
2304         correctly
2305         
2306 2002-11-14  Joe Shaw  <joe@ximian.com>
2307
2308         * libsoup/soup-address.c (soup_address_new): When we get an
2309         address from the hash, call our address lookup callback or else
2310         the connection will hang.
2311
2312 2002-11-13  Dan Winship  <danw@ximian.com>
2313
2314         * tests/timeserver.c: Oops, commit this.
2315
2316         * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
2317
2318 2002-11-13  Joe Shaw  <joe@ximian.com>
2319
2320         * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
2321         (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
2322         instead of bindir.
2323
2324         * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
2325         to properly shut down the SSL connection before closing the
2326         socket.
2327
2328         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
2329         iochannels before quitting the main loop.
2330
2331         * tests/Makefile.am: disable building timeserver, the source file
2332         wasn't added.
2333
2334 2002-11-12  Dan Winship  <danw@ximian.com>
2335
2336         * configure.in: Check for IPv6 support in networking headers.
2337
2338         * libsoup/soup-address.c: Make the internal structure of
2339         SoupAddress entirely private, and make SoupAddress be more like a
2340         hostent and less like a sockaddr. (Ie, make it not have a port
2341         associated with it.) Document undocumented functions. Add
2342         completely-untested support for IPv6.
2343         (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
2344         SoupAddress and a port.
2345         (soup_address_ipv4_any, soup_address_ipv6_any): Return static
2346         addresses corresponding to the IPv6 and IPv6 "any" addresses.
2347         (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
2348         (soup_address_make_sockaddr): Now constructs a new sockaddr, which
2349         may be a sockaddr_in or sockaddr_in6.
2350         (soup_address_gethostname, soup_address_gethostaddr): Remove
2351         these. They aren't reliable, especially on multihomed hosts.
2352         (soup_gethostbyname, soup_gethostbyaddr): support IPv6
2353         (soup_address_new): Keep pending lookups in a separate hash table
2354         from completed lookups. Fix a bug when canceling a lookup when
2355         there was more one outstanding request for it.
2356         (soup_address_lookup_in_cache): Removed.
2357
2358         * libsoup/soup-socket.c: Add a port field to SoupSocket (since
2359         it's not in SoupAddress any more).
2360         (soup_socket_connect): Simplify this. Don't use
2361         soup_address_lookup_in_cache, just call soup_address_new, since we
2362         already know the code can deal with the callback being invoked
2363         immediately.
2364         (soup_socket_new_sync, soup_socket_new): Take a port argument.
2365         (soup_socket_server_new): Take a SoupAddress to use as the local
2366         address to bind to. This lets the caller choose between the IPv4
2367         and IPv6 "any" addresses, and also lets you bind to a single
2368         interface of a multi-homed machine.
2369         (soup_socket_server_accept, soup_socket_server_try_accept): Merge
2370         the common code.
2371
2372         * libsoup/soup-server.c (soup_server_new): Pass
2373         soup_address_ipv4_any() to soup_socket_server_new().
2374
2375         * libsoup/soup-socks.c (soup_connect_socks_proxy,
2376         soup_socks_write): Fix up for the API changes, but it won't work
2377         with IPv6 yet.
2378
2379         * tests/timeserver.c: Another really simple test, for the server
2380         socket code.
2381
2382         * tests/Makefile.am: build timeserver
2383
2384 2002-11-11  Dan Winship  <danw@ximian.com>
2385
2386         * libsoup/soup-address.c: Move the SoupAddress code from
2387         soup-socket.c and soup-socket-unix.c to here.
2388
2389         * libsoup/soup-socket.c: Move the remaining code from
2390         soup-socket-unix.c here.
2391
2392         * libsoup/soup-socket-unix.c: Gone
2393
2394         * tests/get.c: really really trivial test program
2395
2396         * configure.in (AC_OUTPUT):
2397         * Makefile.am (SUBDIRS): add tests/
2398
2399 2002-11-05  Dan Winship  <danw@ximian.com>
2400
2401         * Split libsoup out of soup. ChangeLog.old contains the original
2402         soup ChangeLog.
2403
2404         * Makefile.am, etc: Fix things up to work with the new directory
2405         layout. Disable docs until we fix them.
2406
2407         * autogen.sh: Use gnome-autogen.sh
2408
2409         * configure.in: Require autoconf 2.53. Remove stuff that was only
2410         needed for httpd or wsdl code. Remove glib1 support. Bump version
2411         to 2.0.
2412
2413         * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
2414         in ${includedir}/soup-2.0
2415         
2416         * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
2417         SOAP-specific stuff, Windows support, and other things that
2418         weren't being maintained.
2419
2420         * soup-config.in, soupConf.sh: Kill these. We only support
2421         pkg-config now.