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