Change the SoupURI properties to SoupAddress properties.
[platform/upstream/libsoup.git] / ChangeLog
1 2008-10-03  Dan Winship  <danw@gnome.org>
2
3         * libsoup/soup-connection.c: Change the SoupURI properties to
4         SoupAddress properties.
5
6         * libsoup/soup-address.c (soup_address_resolve_async)
7         (soup_address_resolve_sync): Redo slightly so that multiple
8         simultaneous attempts to resolve the same address won't cause
9         problems.
10         (soup_address_hash_by_name, soup_address_equal_by_name):
11         (soup_address_hash_by_ip, soup_address_equal_by_ip): methods to
12         hash addresses by name or IP address
13
14         * libsoup/soup-message.c (soup_message_get_address): gets a
15         SoupAddress corresponding to the message's URI
16
17         * libsoup/soup-auth-manager.c (SoupAuthHost): hash hosts by
18         soup_address_hash_by_name() rather than by URI.
19
20         * libsoup/soup-session.c (soup_session_get_connection): pass
21         addresses to soup_connection_new(), not URIs.
22         (SoupSessionHost): hash hosts by soup_address_hash_by_ip() rather
23         than by URI. This requires that the addresses will have already
24         been resolved by the SoupSession subclasses before calling
25         soup_session_get_connection(), but also means that now requests
26         made to different virtual hosts on the same IP address can share a
27         connection.
28
29         * libsoup/soup-message-queue.c (SoupMessageQueueItem): add
30         address-resolving state
31
32         * libsoup/soup-session-sync.c (process_queue_item): resolve the
33         message's address before getting a connection
34
35         * libsoup/soup-session-async.c (run_queue, resolve_msg_addr)
36         (resolved_msg_addr): resolve the message's address before getting
37         a connection
38         (request_restarted): if the message gets requeued to a different
39         host, we'll need to re-resolve the address.
40
41         * libsoup/soup-uri.c (soup_uri_copy_root, soup_uri_host_hash)
42         (soup_uri_host_equal): No longer needed
43
44         * libsoup/soup-dns.c (do_async_callback): disconnect from the
45         cancellable before invoking the callback
46
47         * tests/proxy-test.c (tests): fix the 403 example; hostnames are
48         resolved by the session now, even when sending to a proxy, so we
49         need to use a hostname that actually exists
50
51 2008-10-03  Dan Winship  <danw@gnome.org>
52
53         * libsoup/soup-message-queue.c: Make this more complicated, with a
54         SoupMessageQueueItem to keep track of the session's per-message
55         state. (Part of the process of moving session-related state out of
56         SoupMessagePrivate.)
57
58         * libsoup/soup-session.c: Update to work in terms of
59         SoupMessageQueueItem
60
61         * libsoup/soup-session-async.c:
62         * libsoup/soup-session-sync.c: use SoupMessageQueueItem (and get
63         rid of SoupSessionAsyncQueueData and SoupSessionSyncAsyncData).
64
65 2008-10-01  Dan Winship  <danw@gnome.org>
66
67         * libsoup/soup-multipart.c: New type and methods for working with
68         multipart HTTP bodies (eg, multipart/form-data and
69         multipart/byte-ranges)
70
71         * libsoup/soup-message-headers.c (soup_message_headers_get_ranges)
72         (soup_message_headers_set_ranges)
73         (soup_message_headers_set_range)
74         (soup_message_headers_get_content_range)
75         (soup_message_headers_set_content_range): New methods for dealing
76         with the Range and Content-Range headers.
77
78         * libsoup/soup-form.h (SOUP_FORM_MIME_TYPE_URLENCODED)
79         (SOUP_FORM_MIME_TYPE_MULTIPART): #define these MIME types here
80
81         * libsoup/soup-form.c (soup_form_decode_multipart): new utility
82         for parsing multipart/form-data forms.
83         (soup_form_request_new_from_multipart): new utility for
84         constructing multipart/form-data forms
85
86         * libsoup/soup-headers.c (soup_headers_parse): this is now
87         non-static, for use by soup-multipart
88
89         * libsoup/soup-message-server-io.c (get_response_headers)
90         (handle_partial_get): if the client requested a partial GET, and
91         the SoupServer is returning the full body, rebuild the response to
92         include only the requested range instead
93
94         * tests/forms-test.c: renamed from query-test and updated to do
95         both application/x-www-form-urlencoded and multipart/form-data
96         tests
97
98         * tests/range-test.c: test of Range/Content-Range functionality
99
100 2008-10-01  Dan Winship  <danw@gnome.org>
101
102         * libsoup/soup-headers.c (soup_header_parse_param_list)
103         (soup_header_parse_semi_param_list): Update these to deal with
104         RFC2231-encoded UTF-8 header params
105         (soup_header_g_string_append_param): new utility method to do
106         parameters with quoted-strings (handling escaping) and RFC2231.
107
108         * libsoup/soup-auth-digest.c (get_authorization):
109         * libsoup/soup-auth-domain-basic.c (challenge):
110         * libsoup/soup-auth-domain-digest.c (challenge): use
111         soup_header_g_string_append_param so we handle escaping correctly
112
113         * libsoup/soup-message-headers.c
114         (soup_message_headers_get_content_type)
115         (soup_message_headers_set_content_type)
116         (soup_message_headers_get_content_disposition)
117         (soup_message_headers_set_content_disposition): New convenience
118         methods.
119
120         * tests/header-parsing.c (do_rfc2231_tests): new test of RFC2231
121         encoded header parsing in Content-Disposition.
122
123         * tests/get.c (get_url): use
124         soup_message_headers_get_content_type()
125
126         * docs/reference/libsoup-2.4-sections.txt: update
127
128 2008-10-01  Dan Winship  <danw@gnome.org>
129
130         * tests/xmlrpc-test.c (main): add a new -s flag to indicate that
131         it's being run from inside xmlrpc-server-test.
132         (test_echo): if we aren't running inside xmlrpc-server-test, and
133         the response strings don't match the request strings, then compare
134         them to echo_strings_broken instead; a bug in php-xmlrpc manifests
135         when using libxml2 >= 2.7.1, resulting in incorrect responses. :-/
136
137         * tests/xmlrpc-server-test.c (do_xmlrpc_tests): Pass -s to
138         xmlrpc-test
139
140 2008-10-01  Dan Winship  <danw@gnome.org>
141
142         * configure.in: bump version to 2.25.0
143
144 2008-10-01  Dan Winship  <danw@gnome.org>
145
146         * libsoup/soup-cookie-jar.c:
147         * libsoup/soup-cookie.c:
148         * libsoup/soup-cookie.h:
149         * libsoup/soup-headers.c:
150         * libsoup/soup-logger.c:
151         * libsoup/soup-session-feature.c:
152         * libsoup/soup-session-feature.h:
153         * libsoup/soup-session.c: doc fixups
154
155         * docs/reference/libsoup-2.4-docs.sgml:
156         * docs/reference/libsoup-2.4-sections.txt:
157         * docs/reference/libsoup-2.4.types: Add missing bits
158
159 2008-09-30  Dan Winship  <danw@gnome.org>
160
161         * libsoup/soup-xmlrpc.c (parse_value):
162         soup_value_hash_insert_value() copies the value, so we have to
163         g_value_unset() our copy.
164
165         * tests/chunk-test.c:
166         * tests/misc-test.c:
167         * tests/ntlm-test.c: fix leaks
168
169         * tests/libsoup.supp: update
170
171 2008-09-30  Dan Winship  <danw@gnome.org>
172
173         * libsoup/soup-session-async.c (do_idle_run_queue): store the
174         GSource in priv, don't ref the session. Otherwise the session
175         won't get destroyed if you abort it and then don't return to its
176         main loop. (addendum to #498509, Arnout Vandecappelle)
177         (finalize): Destroy the idle_run_queue source when finalizing.
178         (run_queue, got_connection): Ref the session when calling
179         soup_connection_connect_async(), and do a
180         do_idle_run_queue()+unref in got_connection, to ensure correct
181         handling regardless of what the application does with its own ref
182         on the session.
183         (final_finished): Likewise, ref/do_idle_run_queue/unref rather
184         than calling run_queue directly and playing with weak pointers.
185
186         * libsoup/soup-session.c (connect_result): ref the session around
187         the cancel-if-error loop
188
189         Fixes #533473, crash in seahorse when connecting to a
190         non-responsive key server.
191
192         * tests/misc-test.c (do_callback_unref_test): Add a test for the
193         bug in #533473.
194
195         * tests/test-utils.c (soup_test_session_abort_unref): abort and
196         unref a SoupSession, and consider it an error if the session still
197         exists afterward. Suggested by Arnout Vandecappelle.
198         (test_server_shutdown): Likewise, consider it an error if the
199         server is leaked.
200
201         * tests/*.c: Use soup_test_session_abort_unref().
202
203 2008-09-26  Dan Winship  <danw@gnome.org>
204
205         * libsoup/soup-auth-manager-ntlm.c
206         * libsoup/soup-auth-manager.c
207         * libsoup/soup-cookie-jar.c
208         * libsoup/soup-dns.c
209         * libsoup/soup-logger.c:
210         * libsoup/soup-message-body.h:
211         * libsoup/soup-message.h
212         * libsoup/soup-misc.h:
213         * libsoup/soup-xmlrpc.h:
214
215         * tests/continue-test.c:
216         * tests/ntlm-test.c: Fix warnings pointed out by gcc -pedantic.
217         #553976, Sander Dijkhuis.
218
219 2008-09-23  Dan Winship  <danw@gnome.org>
220
221         * configure.in: 2.24.0.1
222
223         * NEWS: Update
224
225         * libsoup/soup-session.c (redirect_handler):
226         * libsoup/soup-message.c (soup_message_new):
227         (soup_message_new_from_uri, soup_message_set_uri): Revert the
228         2008-08-25 change; it breaks the rhythmbox DAAP plugin. #553466.
229         To be revisited.
230
231 2008-09-22  Dan Winship  <danw@gnome.org>
232
233         * configure.in: 2.24.0
234
235 2008-09-08  Dan Winship  <danw@gnome.org>
236
237         * configure.in: 2.23.92
238
239         * NEWS: update
240
241 2008-09-07  Dan Winship  <danw@gnome.org>
242
243         * libsoup/soup-session.c (redirect_handler): a 302 response to
244         HEAD (or any other safe method) should be treated like a 307, not
245         a 303. #551190, Jonathan Matthew.
246
247         * tests/redirect-test.c: test that
248
249 2008-09-01  Dan Winship  <danw@gnome.org>
250
251         * configure.in: 2.23.91
252
253         * NEWS: update
254
255 2008-08-25  Dan Winship  <danw@gnome.org>
256
257         * libsoup/soup-uri.h (SOUP_URI_VALID_FOR_HTTP): new macro to check
258         if a URI is a valid http or https URI.
259
260         * libsoup/soup-uri.c (soup_uri_new_with_base): Update http/https
261         check to use SOUP_URI_VALID_FOR_HTTP().
262
263         * libsoup/soup-session.c (redirect_handler): Check
264         SOUP_URI_VALID_FOR_HTTP() and call it an error if the check fails.
265
266         * libsoup/soup-message.c (soup_message_new): Remove the uri->host
267         check from here. Update docs to clarify that @uri must be an
268         http/https URI.
269         (soup_message_new_from_uri): Check SOUP_URI_VALID_FOR_HTTP().
270         Update docs.
271         (soup_message_set_uri): Check SOUP_URI_VALID_FOR_HTTP(). Update
272         docs.
273
274         Should prevent the crash in #528882, but there's still something
275         going wrong there at a higher level.
276
277 2008-08-22  Bastien Nocera  <hadess@hadess.net>
278
279         * libsoup/soup-date.c (soup_date_to_time_t),
280         (soup_date_to_timeval):
281         * libsoup/soup-date.h: Add a SoupDate to GTimeVal conversion
282         function, for use in gvfs. #549006, with help from Dan Winship
283         <danw@gnome.org>
284
285 2008-08-18  Dan Winship  <danw@gnome.org>
286
287         * libsoup.pc.in (Requires): Revert previous commit; that would
288         still fail in the case of an application linking against a library
289         that privately links against libsoup. The only correct solution in
290         the face of --as-needed (or on OSes where the linker always works
291         that way) is for the module that actually calls g_thread_init() to
292         explicitly link against libgthread.
293
294 2008-08-14  Dan Winship  <danw@gnome.org>
295
296         * libsoup.pc.in (Requires): Add gthread-2.0; the app must call
297         g_thread_init(), but libsoup won't pull it in itself if built with
298         --as-needed, so make sure it gets pulled in from here. Noted by
299         Zeeshan Ali.
300
301         * libsoup/soup-auth.c (soup_auth_authenticate): g_return_if_fail
302         if either username or password is NULL. Noted on the mailing list.
303
304         * libsoup/soup-auth-basic.c (authenticate): remove redundant check
305
306 2008-08-04  Dan Winship  <danw@gnome.org>
307
308         * configure.in: 2.23.6
309
310         * NEWS: update
311
312 2008-07-26  Dan Winship  <danw@gnome.org>
313
314         * libsoup/soup-misc.c (soup_add_completion): Add this to schedule
315         a callback in a GMainContext "right away", as opposed to
316         soup_add_idle(), which uses a lower priority and therefore may not
317         end up calling the callback for a long time if the application is
318         busy with I/O. #536676, Benjamin Otte.
319
320         * libsoup/soup-dns.c (resolver_thread, async_cancel)
321         (soup_dns_lookup_resolve_async):
322         * libsoup/soup-message-io.c (soup_message_io_unpause):
323         * libsoup/soup-session-sync.c (queue_message_thread):
324         * libsoup/soup-session-async.c (do_idle_run_queue):
325         * libsoup/soup-socket.c (async_cancel)
326         (soup_socket_connect_async):
327         * tests/test-utils.c (test_server_shutdown): Use
328         soup_add_completion() rather than soup_add_idle().
329
330         * docs/reference/libsoup-2.4-sections.txt: add soup_add_completion
331
332 2008-07-26  Dan Winship  <danw@gnome.org>
333
334         * libsoup/soup-message-client-io.c (get_request_headers): don't
335         add a Host header to the message if the caller already added one.
336         #539803, Marc Maurer.
337
338         * libsoup/soup-logger.c (print_request): likewise
339
340         * tests/misc-test.c: new test file for small miscellaneous test
341         cases.
342         (do_host_test): test Host-header overriding
343
344 2008-07-26  Dan Winship  <danw@gnome.org>
345
346         * tests/Makefile.am (LIBS): add $(GLIB_LIBS) so this still works
347         when building with weird LDFLAGS. #541506, Götz Waschk.
348
349         * docs/reference/Makefile.am (GTKDOC_LIBS): likewise
350
351         * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm):
352         if the server response doesn't include an algorithm, it is
353         supposed to default to MD5. #544681, Mads Chr. Olesen.
354
355         * libsoup/soup-message-io.c (SoupMessageIOData): change
356         read_length, write_length, and written to goffset so we can
357         properly handle message bodies > 4G. #539861, Peter Christensen.
358
359         * libsoup/soup-gnutls.c: Fix horrible bizarre brokenness in
360         GIOChannel subclassing. #536417, Tor Lillqvist.
361
362 2008-06-04  Tor Lillqvist  <tml@novell.com>
363
364         * libsoup/soup-socket.c (set_fdflags): The SO_RCVTIMEO and
365         SO_SNDTIMEO options to setsockopt() take int values, in
366         milliseconds, on Windows. Not struct timeval. Eek. So passing a
367         struct timeval meant that the tv_sec value (which is first in the
368         struct) is interpreted as milliseconds. setsockopt apparently
369         doesn't even get upset by the fact that the option size doesn't
370         match the sizeof(int) it should expect.
371
372 2008-05-02  Dan Winship  <danw@gnome.org>
373
374         * libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path
375         checking
376
377 2008-04-29  Tor Lillqvist  <tml@novell.com>
378
379         * libsoup/soup-dns.c (soup_dns_is_ip_address): Fix compilation
380         error in the !HAVE_IPV6 && !HAVE_INET_PTON && !HAVE_INET_ATON
381         case.
382
383 2008-04-21  Dan Winship  <danw@gnome.org>
384
385         * configure.in: 2.23.1, bump AGE and CURRENT
386
387         * NEWS: update
388
389 2008-04-20  Dan Winship  <danw@gnome.org>
390
391         Fixes for GnuTLS support on Win32. #528752, patch from Marc Maurer
392
393         * libsoup/soup-gnutls.c (soup_ssl_wrap_iochannel): add an argument
394         saying whether or not the socket is non-blocking, since there's no
395         way to determine this from the fd in WinSock.
396         (do_handshake, soup_gnutls_read, soup_gnutls_write): Update for
397         that.
398
399         * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Update for
400         that
401
402         * libsoup/soup-nossl.c (soup_ssl_wrap_iochannel): update the
403         declaration here too
404
405         * tests/ssl-test.c: Some updates to get this closer to working on
406         Windows...
407
408 2008-04-14  Chris Lord  <chrislord.net@gmail.com>
409
410         reviewed by: Dan Winship <danw@gnome.org>
411
412         * libsoup/soup-cookie-jar.c (soup_cookie_jar_set_cookie):
413         Check that the cookie was parsed successfully before setting it
414
415 2008-04-08  Dan Winship  <danw@gnome.org>
416
417         Initial HTTP cookie support imported from development git repo,
418         including patches from Xan Lopez.
419
420         TODO: make sure the logic in soup_cookie_jar_get_cookies() is
421         right. Add a test program to tests/.
422
423         * libsoup/soup-cookie.c: Code for parsing and generating HTTP
424         cookies.
425
426         * libsoup/soup-cookie-jar.c: Code for managing SoupCookies and
427         integrating cookie management with a SoupSession.
428
429         * libsoup/soup-date.c (soup_date_is_past): New, checks if a
430         SoupDate refers to a time in the past
431
432         * libsoup/soup-dns.c (soup_dns_is_ip_address): New, checks if a
433         string is a valid IP address
434
435         * libsoup/soup-headers.c (soup_header_parse_semi_param_list): New,
436         like soup_header_parse_param_list, but for semicolon-delimited
437         data.
438
439 2008-04-08  Dan Winship  <danw@gnome.org>
440
441         * libsoup/soup-auth-manager.c: Make this a GObject and
442         specifically a SoupSessionFeature. Add an "authenticate" signal,
443         and emit that rather than explicitly calling into the SoupSession
444         and telling it when to emit its own authenticate signal.
445
446         * libsoup/soup-auth-manager-ntlm.c: Make this a subclass of
447         SoupAuthManager, with NTLM support controllable via a property.
448
449         * libsoup/soup-session.c (soup_session_init): create an
450         auth_manager of type SOUP_TYPE_AUTH_MANAGER_NTLM, but defaulting
451         to USE_NTLM=FALSE. Connect to its "authenticate" signal, and call
452         soup_session_add_feature() on it.
453         (set_property, get_property): proxy the USE_NTLM property to the
454         auth manager.
455         (auth_manager_authenticate): signal handler for SoupAuthManager
456         "authenticate" signal. (Replaces soup_session_emit_authenticate(),
457         which is no longer needed)
458
459 2008-04-08  Dan Winship  <danw@gnome.org>
460
461         * libsoup/soup-session-feature.c: New interface type representing
462         a feature that can be added to a SoupSession.
463
464         * libsoup/soup-session.c (soup_session_add_feature): Add a feature
465         to the session by prepending it to priv->features and calling
466         soup_session_feature_attach() on it.
467         (soup_session_add_feature_by_type): Add a feature to the session
468         by creating an object of the indicated type and passing it to
469         soup_session_add_feature.
470         (soup_session_remove_feature)
471         (soup_session_remove_feature_by_type): Likewise, remove features
472         (soup_session_class_init, set_property): register/handle
473         construct-time feature adding/removing properties
474         (dispose): cleanup features
475
476         * libsoup/soup-logger.c: port to SoupSessionFeature
477
478         * tests/test-utils.c (soup_test_session_new): Use
479         soup_session_add_feature rather than soup_logger_attach.
480
481 2008-04-08  Dan Winship  <danw@gnome.org>
482
483         * configure.in: Having branched for gnome-2-22, bump version to
484         2.23.0 for the GNOME 2.23 series. SOUP_API_VERSION will stay at
485         2.4, which is confusing but seemed like the best solution at this
486         point.
487
488 2008-04-07  Dan Winship  <danw@gnome.org>
489
490         * configure.in: 2.4.1. Bump AGE and CURRENT.
491
492         * NEWS: update
493
494         * docs/reference/libsoup-2.4-sections.txt: add new symbols
495
496 2008-04-07  Dan Winship  <danw@gnome.org>
497
498         * libsoup/soup-message-io.c (soup_message_io_pause): If pausing a
499         message that was waiting to unpause, cancel the unpause.
500
501 2008-04-05  Dan Winship  <danw@gnome.org>
502
503         * libsoup/soup-dns.c (resolve_address, resolve_name): Don't
504         cache negative results, even if the DNS server explicitly states
505         that the host does not exist; some servers give different answers
506         to clients inside and outside their firewall. #523269, Jörgen
507         Scheibengruber.
508
509 2008-04-05  Dan Winship  <danw@gnome.org>
510
511         * libsoup/soup-message-body.c (soup_message_body_set_accumulate)
512         (soup_message_body_get_accumulate): New, replaces
513         SOUP_MESSAGE_OVERWRITE_CHUNKS, but can be set on either the
514         incoming or outgoing message body.
515         (soup_message_body_get_chunk): update to still dtrt if !accumulate
516         (soup_message_body_got_chunk, soup_message_body_wrote_chunk): New
517         methods to handle accumulating/discarding chunks.
518
519         * libsoup/soup-message-io.c (read_body_chunk): Use
520         soup_message_body_got_chunk.
521         (io_write): Use soup_message_body_wrote_chunk, to discard unneeded
522         chunks after writing them. Fixes most of #522146.
523
524         * libsoup/soup-message.c (soup_message_class_init): add a new
525         flag, "server-side", to indicate whether the message is
526         client-side or server-side, and update several methods to use it.
527         (got_body): Update for accumulate
528         (soup_message_set_flags): If the caller changes OVERWRITE_CHUNKS,
529         update the corresponding accumulate flag.
530
531         * libsoup/soup-message.h (SOUP_MESSAGE_OVERWRITE_CHUNKS):
532         deprecated now
533
534         * tests/chunk-test.c (do_request_test): Use
535         soup_message_body_set_accumulate() now, and verify that the chunks
536         are being discarded appropriately.
537         (do_response_test): Use
538         soup_message_body_set_accumulate() instead of OVERWRITE_CHUNKS.
539
540         * tests/pull-api.c (do_fully_async_test)
541         (do_synchronously_async_test): Use
542         soup_message_body_set_accumulate().
543
544 2008-04-05  Dan Winship  <danw@gnome.org>
545
546         * libsoup/soup-dns.c (resolve_address): fix test for
547         AI_ADDRCONFIG. Noticed while looking at #526321.
548
549 2008-04-05  Dan Winship  <danw@gnome.org>
550
551         * libsoup/soup-socket.c (soup_socket_class_init)
552         (soup_socket_write): globally ignore SIGPIPE rather than only
553         doing it around socket write calls, since with SSL even socket
554         read calls may need to write, and also because SIGPIPE is
555         completely moronic and no one should be using it, and the previous
556         "solution" wasn't thread-safe anyway. Fixes #524397, reported by
557         Curtis Magyar.
558
559 2008-04-05  Dan Winship  <danw@gnome.org>
560
561         Misc fixes noticed by "sparse" or by running gcc with additional
562         -W flags
563
564         * libsoup/soup-auth-manager-ntlm.c (ntlm_authorize_post): fix a
565         potentially uninitialized variable. (Grumble. gcc needs
566         -Wdo-optimization-so-you-can-generate-code-flow-related-warnings-
567         but-then-emit-unoptimized-code-for-ease-of-debugging)
568
569         * libsoup/soup-gnutls.c (soup_gnutls_channel_funcs): make this
570         static
571
572         * libsoup/soup-uri.c (uri_decoded_copy, uri_normalized_copy): add
573         "static". (This doesn't change the generated code; the prototype
574         was already declared static and so gcc was treating the function
575         as static even though the main declaration *wasn't* declared
576         static. I'm not sure if this is a bug in gcc or an oddity of the
577         spec, but it's confusing, so...)
578
579         * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_method_response):
580         s/FALSE/NULL/
581
582         * libsoup/soup-xmlrpc.h: add G_GNUC_PRINTF to
583         soup_xmlrpc_build_format
584
585         * tests/*.c: misc minor fixes, mostly involving missing "const"s
586         and "static"s to get better warnings, and then remove some unused
587         variables.
588
589         * tests/continue-test.c (do_message): fix a crash when the test
590         fails
591
592         * tests/test-utils.h (debug_printf): add G_GNUC_PRINTF to
593         prototype
594
595 2008-04-05  Dan Winship  <danw@gnome.org>
596
597         * libsoup/soup-method.c: Explicitly assign each of the variables
598         to NULL, because that apparently causes the OS X linker to treat
599         them differently than if they are left implicitly NULL. #522957.
600
601 2008-04-04  Dan Winship  <danw@gnome.org>
602
603         * libsoup/soup-message.c: add a new signal "wrote-body-data" to
604         address the problem that "wrote-chunk" is not usable for progress
605         info (especially with non-chunked encoding). #525101, suggested by
606         Christian Kellner.
607
608         * libsoup/soup-message-io.c (write_data): emit wrote-body-data as
609         appropriate.
610         (io_write): update so that (a) Content-Length writes can be done
611         in multiple chunks (as long as the caller explicitly sets the
612         Content-Length header beforehand), and (b) the body data doesn't
613         get copied an extra time. Based on a patch from Christian.
614
615         * libsoup/soup-message-client-io.c (get_request_headers): Don't
616         update the Content-Length header if it's already set, even if it
617         doesn't match the (current) body length.
618
619         * tests/chunk-test.c: test some chunk-encoding-related behavior
620
621 2008-04-03  Dan Winship  <danw@gnome.org>
622
623         Be more aggressive about closing unused persistent connections
624         when needed, to avoid slow load times in WebKit.
625
626         * libsoup/soup-session-async.c (run_queue): Remove the
627         "try_pruning" flag from here and from all the callers, and
628         *always* try pruning idle connections if it would help.
629
630         * libsoup/soup-session.c (soup_session_try_prune_connection):
631         Rather than only closing a single connection, close all idle
632         connections.
633
634 2008-03-29  Dan Winship  <danw@gnome.org>
635
636         * libsoup/soup-message.h (SoupMessage): de-constify
637         msg->reason_phrase; it's no more const than any other struct
638         field.
639
640         * libsoup/soup-message.c (finalize)
641         (soup_message_cleanup_response, soup_message_set_status)
642         (soup_message_set_status_full): don't need to cast reason_phase to
643         non-const when freeing it now
644
645         * libsoup/soup-message-client-io.c (parse_response_headers):
646         Likewise, remove reason-phrase non-const casts
647
648 2008-03-29  Dan Winship  <danw@gnome.org>
649
650         * libsoup/soup-date.c (parse_day): fix the test for no-day-parsed
651         (parse_year): likewise fix the test for no-year-parsed
652         (parse_time): don't accept empty components here
653         (parse_textual_date): don't accept a comma if it wasn't preceded
654         by a weekday
655         (soup_date_weekday): Fix leap year handling here; the code this
656         was originally based on only had to work between 1970 and 2038, so
657         it didn't worry about the mod 100 and mod 400 rules...
658
659         * tests/date.c: Add date/string conversion tests (in particular,
660         to make sure soup_date_weekday is working). Also add test cases
661         with missing components and make sure they *don't* parse.
662
663 2008-03-25  Dan Winship  <danw@gnome.org>
664
665         * libsoup/soup-auth-domain-digest.c (accepts): don't crash if the
666         auth_callback returns NULL (meaning "unrecognized user").
667
668         * tests/server-auth-test.c (do_test, do_auth_tests): Test bad
669         usernames as well as bad passwords.
670         (main): Remove erroneous local run_tests variable.
671
672         Pointed out by Curtis Magyar.
673
674 2008-03-19  Dan Winship  <danw@gnome.org>
675
676         * libsoup/soup-auth.c (soup_auth_new): compare WWW-Authenticate
677         auth schemes case-insensitively.
678
679         * libsoup/soup-auth-digest.c (update): allow Digest
680         WWW-Authenticate header with no "qop" option. (The original RFC
681         2069 style of Digest auth.)
682         (soup_auth_digest_parse_qop): this returns a bitfield, so don't
683         return -1 if there are no recognized values.
684
685         * tests/httpd.conf.in: use "AuthDigestQop none" in /Digest/realm3
686         so we test that
687
688         Fixes #498484 (Digest auth against Apple's Calendar Server).
689
690 2008-03-18  Dan Winship  <danw@gnome.org>
691
692         * libsoup/soup-session.c (soup_session_class_init): Add a new
693         property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
694         which idle connections should be closed.
695         (soup_session_get_connection): pass the idle_timeout value on to
696         the connection.
697
698         * libsoup/soup-connection.c (soup_connection_class_init): Add
699         SOUP_CONNECTION_IDLE_TIMEOUT.
700         (start_idle_timer, stop_idle_timer): add/remove a timeout to call
701         soup_connection_disconnect().
702         (socket_connect_result, soup_connection_connect_sync): start the
703         idle timer after connection is complete
704         (set_current_request): call stop_idle_timer() when starting a new
705         request
706         (clear_current_request): call start_idle_timer() when finishing a
707         request
708         (dispose): call stop_idle_timer() when destroying the connection
709
710         #518214, based on a patch from Jorn Baayen.
711
712 2008-03-18  Dan Winship  <danw@gnome.org>
713
714         * libsoup/soup-message-io.c (soup_message_io_unpause): if delaying
715         the unpause to idle time, we need to keep track of the idle source
716         (soup_message_io_stop): if the message is waiting to unpause
717         itself, cancel that
718
719         * libsoup/soup-server.c (soup_server_pause_message): call
720         soup_message_io_pause(), not soup_message_io_unpause(). Duh.
721
722 2008-03-15  Dan Winship  <danw@gnome.org>
723
724         * libsoup/soup-session.c: Define two new signals, request_queued
725         and request_unqueued, to provided a clearer (and
726         clearly-documented) lifecycle for messages, helping us (and other
727         people) avoid bugs like #522601, SoupSession::authenticate signal
728         emitted multiple times per message (reported and analyzed by Tommi
729         Komulainen).
730
731         * libsoup/soup-logger.c:
732         * libsoup/soup-auth-manager.c:
733         * libsoup/soup-auth-manager-ntlm.c: Use request_queued/unqueued
734
735         * tests/auth-test.c (do_async_auth_test): add a regression test
736
737 2008-03-14  Dan Winship  <danw@gnome.org>
738
739         * libsoup/soup-message-client-io.c (get_request_headers): Fix Host
740         header syntax when the host is an IPv6 address literal. Noticed
741         while poking at #522519.
742
743 2008-03-14  Dan Winship  <danw@gnome.org>
744
745         * libsoup/soup-message-private.h (SoupMessagePrivate): add
746         an orig_http_version field.
747
748         * libsoup/soup-message.c (soup_message_init): initialize
749         orig_http_version.
750         (soup_message_set_http_version): If called before the status code
751         is received, set orig_http_version too.
752         (soup_message_cleanup_response): Restore orig_http_version, so
753         that we don't send an HTTP/1.0 request in response to an HTTP/1.0
754         redirect. #521848, Tommi Komulainen.
755
756         * libsoup/soup-message-server-io.c (get_response_headers):
757         actually output "HTTP/1.0", not "HTTP/1.1", if the message's http
758         version is 1.0.
759
760         * tests/redirect-test.c (server_callback): Add a regression test;
761         set http_version to 1.0 when returning a redirect, but require it
762         to be 1.1 when processing the following request
763
764 2008-03-13  Xan Lopez  <xan@gnome.org>
765
766         * libsoup/soup-address.c:
767         * libsoup/soup-auth-domain-basic.c:
768         * libsoup/soup-auth-domain-digest.c:
769         * libsoup/soup-auth-domain.c:
770         * libsoup/soup-auth.c:
771         * libsoup/soup-connection.c:
772         * libsoup/soup-message.c:
773         * libsoup/soup-server.c:
774         * libsoup/soup-session.c:
775         * libsoup/soup-socket.c:
776
777         Use G_OBJECT_WARN_INVALID_PROPERTY_ID in all get/set_property functions.
778
779         Bug #522115
780         
781 2008-03-13  Xan Lopez  <xan@gnome.org>
782
783         * tests/dns.c: (main):
784         * tests/get.c: (main):
785         * tests/getbug.c: (main):
786         * tests/simple-httpd.c: (main):
787         * tests/simple-proxy.c: (main):
788         * tests/ssl-test.c: (main):
789         * tests/test-utils.c: (test_init):
790
791         g_thread_init should be called before any other glib function. (#522117)
792
793 2008-03-10  Dan Winship  <danw@gnome.org>
794
795         * configure.in: 2.4.0!
796
797         * NEWS: update
798
799 2008-02-28  Dan Winship  <danw@gnome.org>
800
801         * libsoup/soup-session.c (finalize): free priv->user_agent.
802         #518798, Wouter Cloetens.
803         (redirect_handler): PROPFIND is defined to be "safe and
804         idempotent", so allow automatic redirects of it. (Pointed out by
805         Christian Kellner. FIXME: need a way for apps to declare
806         additional safe methods). Also, treat 302 like 307, not like 303,
807         because that behavior is universal in the real world, despite the
808         spec's protests.
809
810         * tests/redirect-test.c (tests): update POST 302 behavior check
811
812         * tests/Makefile.am (TESTS): oops, add redirect-test so it gets
813         run by "make check"/"make distcheck"
814
815         * tests/ssl-test.c: Re-revert the change from 2008-02-09; the
816         problem with ssl-test.c was not that soup_gnutls_init() wasn't
817         thread-safe, it's that the server thread doesn't do anything that
818         would ever cause soup_gnutls_init() to be called, and so if the
819         client thread doesn't start first, the server thread will run
820         without initializing GNUTLS.
821
822 2008-02-27  Benjamin Otte  <otte@gnome.org>
823
824         * libsoup/soup-socket.c: (read_from_network), (soup_socket_read),
825         (soup_socket_read_until), (soup_socket_write):
826         ensure that nread/nwrote parameters aren't NULL. They are also
827         properly set on error paths now.
828
829 2008-02-25  Dan Winship  <danw@gnome.org>
830
831         * configure.in: 2.3.4
832
833         * NEWS: Update
834
835 2008-02-25  Dan Winship  <danw@gnome.org>
836
837         * docs/reference/Makefile.am (DOC_MODULE): rename from libsoup to
838         libsoup-2.4
839         (TARGET_DIR): don't need to override this now
840
841         * docs/reference/libsoup-2.4.types:
842         * docs/reference/libsoup-2.4-docs.txt:
843         * docs/reference/libsoup-2.4-overrides.txt:
844         * docs/reference/libsoup-2.4-sections.txt: Rename these from
845         unversioned, to match DOC_MODULE
846
847         Fixes doc installation to work with devhelp again. #518384, Mart
848         Raudsepp.
849
850 2008-02-25  Benjamin Otte  <otte@gnome.org>
851
852         * libsoup/soup-address.h:
853         * libsoup/soup-auth-domain.h:
854         * libsoup/soup-auth.h:
855         * libsoup/soup-message.h:
856         * libsoup/soup-server.h:
857         * libsoup/soup-session-async.h:
858         * libsoup/soup-session-sync.h:
859         * libsoup/soup-session.h:
860         * libsoup/soup-socket.h:
861         * libsoup/soup-types.h:
862         * libsoup/soup-uri.h:
863         use an underscore for struct definitions. Fixes bug #518317.
864
865 2008-02-20  Sebastian Dröge  <slomo@circular-chaos.org>
866
867         * libsoup.pc.in: Add gobject-2.0 and gio-2.0 to Requires.
868         Move libxml-2.0 and the SSL dependency to Requires.private
869         as no header is including them. Fixes bug #517631.
870
871 2008-02-11  Dan Winship  <danw@gnome.org>
872
873         * configure.in: post-release bump to 2.3.3
874
875 2008-02-11  Dan Winship  <danw@gnome.org>
876
877         * configure.in: 2.3.2
878         (SOUP_CURRENT): bump for API changes
879
880         * NEWS: update
881
882 2008-02-09  Dan Winship  <danw@gnome.org>
883
884         * Misc gtk-doc fix-ups
885
886 2008-02-09  Dan Winship  <danw@gnome.org>
887
888         * libsoup/soup-misc.h: remove prototype for
889         soup_signal_connect_once, which is only used by soup-connection
890         now, and will go away once that code is rewritten.
891
892         * libsoup/soup-connection.c: prototype it here now (the definition
893         is still in soup-misc.c)
894
895 2008-02-09  Dan Winship  <danw@gnome.org>
896
897         * libsoup/soup-auth-manager-ntlm.c: mark the DES magic number
898         arrays const
899
900         * libsoup/soup-date.c (months, days): add an extra "const" to each
901         of these declarations, as one "const" is apparently not enough.
902         (soup_date_to_time_t): remove redundant copy of days_before array.
903
904         * libsoup/soup-dns.c (soup_dns_init): use g_once_init_enter/leave
905
906         * libsoup/soup-gnutls.c (soup_ssl_supported)
907         (soup_gnutls_channel_funcs): Mark these const
908         (soup_gnutls_init, init_dh_params): Use g_once_init_enter/leave
909
910         * libsoup/soup-status.c (reason_phrases): mark this const
911
912         * tests/ssl-test.c: Remove the workaround for soup_gnutls_init()
913         not being thread-safe, since it is now.
914
915 2008-02-08  Dan Winship  <danw@gnome.org>
916
917         * libsoup/soup-message-headers.c (SoupMessageHeadersIter)
918         (soup_message_headers_iter_init, soup_message_headers_iter_next):
919         Add an iterator type for SoupMessageHeaders.
920
921         * libsoup/soup-message-client-io.c (get_request_headers):
922         * libsoup/soup-message-server-io.c (get_response_headers): Use
923         SoupMessageHeadersIter.
924
925         * libsoup/soup-logger.c (print_request, print_response): Use
926         SoupMessageHeadersIter. And take advantage of the simplification
927         to fix the kludge where 'direction' was stored as a field in
928         SoupLoggerPrivate rather than being an argument to
929         soup_logger_print.
930
931         * tests/get.c (get_url):
932         * tests/header-parsing.c (check_headers):
933         * tests/simple-httpd.c (server_callback): Use
934         SoupMessageHeadersIter
935
936 2008-02-06  Dan Winship  <danw@gnome.org>
937
938         * libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
939         auth domain when adding it.
940
941         * tests/continue-test.c (setup_server):
942         * tests/server-auth-test.c (main): Add unrefs here to avoid
943         leaking now
944
945 2008-02-06  Dan Winship  <danw@gnome.org>
946
947         * libsoup/soup-message.c (soup_message_set_chunk_allocator): New
948         method that lets the application set a callback function to use to
949         allocate SoupBuffers for reading into, so as to avoid needing
950         extra copies.
951
952         * libsoup/soup-message-body.c (soup_buffer_new_with_owner): new,
953         to create a SoupBuffer pointing to memory owned by another object,
954         with a GDestroyNotify to unref/free that object when the
955         SoupBuffer is freed.
956         (soup_buffer_get_owner): Returns the owner of a buffer created
957         with soup_buffer_new_with_owner.
958         (soup_buffer_free, etc): update SoupBuffer code for owned buffers.
959
960         Suggested by Wouter Cloetens, #513810.
961
962         * tests/simple-httpd.c (do_get): Use mmap() and
963         soup_buffer_new_with_owner(), as a demo/test.
964
965 2008-02-06  Dan Winship  <danw@gnome.org>
966
967         * libsoup/soup-date.c (soup_date_to_time_t): clamp the result to
968         the time_t range, and document that. Remove the #ifdef HAVE_TIMEGM
969         branch.
970
971         * configure.in: remove check for timegm
972
973 2008-02-04  Dan Winship  <danw@gnome.org>
974
975         * libsoup/Makefile.am: Fix the handling of soup-enum-types.h to
976         ensure that it gets built before the things that depend on it.
977
978 2008-02-03  Benjamin Otte  <otte@gnome.org>
979
980         * libsoup/soup-socket.c: update documentation to new API
981
982 2008-02-02  Dan Winship  <danw@gnome.org>
983
984         * libsoup/soup-session.c: fix default connections-per-host again;
985         it was defined in two places. Add SOUP_SESSION_USER_AGENT property
986         (setup_message): set the User-Agent request header on the request
987
988         * libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property
989         (start_request): set the Server response header on the request.
990
991         * tests/get.c:
992         * tests/simple-httpd.c: set the User-Agent/Server headers
993
994 2008-02-02  Dan Winship  <danw@gnome.org>
995
996         * libsoup/soup-headers.c (soup_headers_parse_request): if the
997         request headers contain an unrecognized Expect: header, return
998         SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers
999         in HTTP/1.0 messages as required by 2616 14.10.
1000         (soup_headers_parse_response): Likewise handle Connection headers
1001         in HTTP/1.0 messages
1002
1003         * tests/header-parsing.c: test those things
1004
1005 2008-02-02  Dan Winship  <danw@gnome.org>
1006
1007         * libsoup/soup-session.c (redirect_handler): Misc fixes: don't
1008         redirect on "300 Multiple Choices", "304 Not Modified", "305 Use
1009         Proxy", or any unrecognized status code. Don't redirect unsafe
1010         methods on 301, 302, or 307. Redirect POST to GET on 303.
1011
1012         * tests/redirect-test.c: test of redirection handling behavior.
1013
1014 2008-02-02  Dan Winship  <danw@gnome.org>
1015
1016         * libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that
1017         direct comparisons against them actually *are* faster than doing
1018         strcmp, as the docs claim.
1019
1020         * libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP,
1021         SOUP_URI_SCHEME_HTTPS): likewise
1022
1023 2008-02-01  Dan Winship  <danw@gnome.org>
1024
1025         * libsoup/soup-address.c: Use GObject properties.
1026         (soup_address_new, soup_address_new_from_sockaddr)
1027         (soup_address_new_any): Make these just wrappers around
1028         g_object_new.
1029
1030         * libsoup/soup-message-body.c (soup_message_body_get_type):
1031         * libsoup/soup-message-headers.c (soup_message_headers_get_type):
1032         * libsoup/soup-server.c (soup_client_context_get_type): 
1033         Register these as boxed types, for language bindings.
1034
1035         * libsoup/soup-date.c (soup_date_get_type):
1036         * libsoup/soup-message-body.c (soup_buffer_get_type):
1037         * libsoup/soup-value-utils.c (soup_byte_array_get_type):
1038         * libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest
1039         yummiest type-registering idiom.
1040
1041 2008-02-01  Dan Winship  <danw@gnome.org>
1042
1043         * libsoup/soup-connection.c (soup_connection_disconnect):
1044         Reorganize this; emitting DISCONNECTED may cause the session to
1045         unref the connection, causing it to be destroyed, so do everything
1046         else before that. #437835 and dups. Also, call
1047         soup_message_cleanup_response() when requeuing an IO_ERROR-ed
1048         message, so soup_session_send_message() will requeue it rather
1049         than treating it as failed.
1050
1051         * docs/reference/Makefile.am (TARGET_DIR): override this to
1052         include the API version, to fix the last remaining parallel
1053         install issue between libsoup 2.2 and 2.4. #512810, Daniel
1054         Gryniewicz.
1055
1056         * tests/query-test.c (do_test): don't use "stdout" as a variable
1057         name; it's allowed to be a macro  (and it is one on Solaris).
1058         #513602, patch from Jeff Cai.
1059
1060 2008-01-31  Dan Winship  <danw@gnome.org>
1061
1062         * libsoup/soup-date.c (soup_date_to_time_t): new
1063
1064         * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded"
1065         from name. (And add back-compat #define.)
1066         (soup_form_encode): New, takes varargs parameters for each form
1067         construction.
1068         (soup_form_encode_hash, soup_form_encode_datalist): renamed, with
1069         back-compat #defines
1070         (soup_form_request_new, soup_form_request_new_from_hash)
1071         (soup_form_request_new_from_datalist): New methods to construct a
1072         GET or POST message with form data.
1073
1074         * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes
1075         varargs like soup_form_encode().
1076
1077         * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals)
1078         (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New
1079         routines to work with multiple value hash values at once.
1080         (soup_value_array_new): tiny wrapper, for naming consistency
1081         (soup_value_array_new_with_vals, soup_value_array_append_vals):
1082         New routines to work with multiple value array values at once.
1083
1084 2008-01-28  Dan Winship  <danw@gnome.org>
1085
1086         * configure.in: post-release bump to 2.3.1
1087
1088 2008-01-28  Dan Winship  <danw@gnome.org>
1089
1090         * configure.in: Bump version to 2.3.0.1
1091
1092         * NEWS: Update
1093
1094         * docs/reference/Makefile.am (content_files): include
1095         porting-2.2-2.4.xml
1096
1097 2008-01-28  Dan Winship  <danw@gnome.org>
1098
1099         * libsoup/soup-message.c (soup_message_set_auth)
1100         (soup_message_set_proxy_auth): Use soup_message_headers_replace(),
1101         not soup_message_headers_append(), since only a single
1102         Authorization/Proxy-Authorization header is allowed. #512517.
1103
1104         * libsoup/soup-auth-manager-ntlm.c (ntlm_request_started): Don't
1105         set an NTLM Authorization header if the message already has a
1106         Basic or Digest one.
1107
1108         * tests/ntlm-test.c: Add some Basic auth and mixed NTLM/Basic auth
1109         tests
1110
1111 2008-01-28  Wouter Bolsterlee  <wbolster@svn.gnome.org>
1112
1113         * docs/reference/libsoup-docs.sgml:
1114
1115         Changed section titles so that they actually show
1116         something useful in DevHelp.
1117
1118 2008-01-27  Dan Winship  <danw@gnome.org>
1119
1120         * libsoup/soup-dns.c (resolver_thread): fix mutex use to avoid a
1121         race condition
1122
1123         * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_faultv):
1124         (soup_xmlrpc_set_response, soup_xmlrpc_set_fault):
1125         (soup_xmlrpc_parse_method_call): Fix misc server-side stuff
1126         (soup_xmlrpc_parse_method_response): Fix fault parsing
1127
1128         * libsoup/soup-xmlrpc.h (SoupXMLRPCFault): add semi-standard fault
1129         codes from
1130         http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
1131
1132         * tests/xmlrpc-server.php (sum): return a <fault> if the arguments
1133         are wrong (so that xmlrpc-test can test that case).
1134         (dateChange): change to take two parameters, a date and a struct,
1135         instead of putting the date in the struct, since we weren't
1136         previously testing multiple parameter handling.
1137
1138         * tests/xmlrpc-test.c (main): Add a -u flag to specify an
1139         alternate URL.
1140         (do_xmlrpc): Remove level 3 debug output, which is now redundant
1141         with the SoupLogger stuff.
1142         (test_dateChange): update for dateChange prototype change
1143         (test_fault_malformed, test_fault_method, test_fault_args): test
1144         handling of faults
1145
1146         * tests/xmlrpc-server-test.c: Test the server-side XML-RPC API (by
1147         implementing the same methods as xmlrpc-server.php and then
1148         using xmlrpc-test)
1149
1150 2008-01-27  Dan Winship  <danw@gnome.org>
1151
1152         * libsoup/soup-headers.c (soup_header_parse_quality_list): fix to
1153         not sometimes read beyond the end of the string.
1154
1155         * libsoup/soup-message-body.c (soup_message_body_append): When
1156         appending a 0-length SOUP_MEMORY_TAKE buffer, we need to free the
1157         passed-in buffer rather than just ignoring it.
1158
1159         * libsoup/soup-message-headers.c (soup_message_headers_free): Fix
1160         leak introduced by patch for 511980.
1161
1162         * libsoup/soup-server.c (got_headers): fix leak when decoding path
1163
1164         * libsoup/soup-session.c (finalize): free ntlm_manager
1165
1166         * tests/libsoup.supp: update for libsoup 2.4, glib 2.14, etc
1167
1168         * tests/header-parsing.c (do_qvalue_tests):
1169         * tests/uri-parsing.c (main): more cleanup
1170
1171 2008-01-27  Dan Winship  <danw@gnome.org>
1172
1173         * libsoup/soup-logger.c (soup_logger_attach): Fix session ids by
1174         using weak refs for the logger cleanup rather than trying to use
1175         the same qdata for two different things.
1176         (print_request, print_response): use full type names in the
1177         Soup-Debug line, since SoupSessionSync and SoupSessionAsync get
1178         numbered separately.
1179
1180 2008-01-27  Dan Winship  <danw@gnome.org>
1181
1182         * libsoup/soup-session-async.c (final_finished): Don't run the
1183         queue again if the callback destroyed the session. #511868, Stef
1184         Walter.
1185
1186 2008-01-25  Srinivasa Ragavan  <sragavan@novell.com>
1187
1188         ** Fix for bug #511980
1189
1190         * libsoup/soup-message-headers.c: (soup_message_headers_clear):
1191         Instead of destroying the hashtable, just remove the contents of the
1192         table.
1193
1194 2008-01-23  Tor Lillqvist  <tml@novell.com>
1195
1196         * configure.in: Allow autogening even without AM_PATH_LIBGCRYPT
1197         available
1198
1199         * libsoup/soup-date.c (soup_date_new_from_time_t): Correct use of
1200         gmtime().
1201
1202         * libsoup/soup-headers.c (soup_headers_parse_status_line): Return
1203         FALSE if neither HTTP nor ICY. Avoids crash in
1204         tests/header-parsing.
1205
1206         * libsoup/soup-socket.c: On Windows SHUT_RDWR is called SD_BOTH.
1207         (set_nonblocking): Fix typo.
1208
1209         * tests/continue-test.c: Seems to build fine without <pthread.h>,
1210         so drop that.
1211
1212 2008-01-18  Dan Winship  <danw@gnome.org>
1213
1214         * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH
1215
1216 2008-01-18  Dan Winship  <danw@gnome.org>
1217
1218         * configure.in: require glib 2.15.3, not 2.15.0, since
1219         AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
1220         out by Matthew Barnes, #510216.
1221
1222 2008-01-18  Dan Winship  <danw@gnome.org>
1223
1224         * libsoup/soup-auth-domain.c
1225         (soup_auth_domain_set_generic_auth_callback):
1226         (soup_auth_domain_check_password): add a new generic auth callback
1227         that can be used with any subclass to do cleartext password
1228         checking against messages. Suggested by Mathias Hasselmann.
1229
1230         * libsoup/soup-auth-domain-basic.c: Implement generic auth
1231
1232         * libsoup/soup-auth-domain-digest.c: Implement generic auth.
1233         (soup_auth_domain_digest_evil_check_password): Gone, use the
1234         generic version now.
1235
1236 2008-01-17  Dan Winship  <danw@gnome.org>
1237
1238         * libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
1239         (soup_auth_digest_compute_hex_a1)
1240         (soup_auth_digest_compute_response): cast the second arg to
1241         g_checksum_update to (guchar *) to avoid warnings
1242
1243 2008-01-16  Dan Winship  <danw@gnome.org>
1244
1245         * libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
1246         with Shoutcast servers, which return "ICY 200 OK", but are
1247         otherwise straight HTTP/1.0. #502325, Wouter Cloetens.
1248
1249         * tests/header-parsing.c (resptests): add a test for it
1250
1251 2008-01-16  Dan Winship  <danw@gnome.org>
1252
1253         * libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
1254         session authenticate signal to be handled asynchronously, by
1255         pausing the message and then authenticating the auth later.
1256         (auth_type_compare_func): make this work. oops.
1257         (extract_challenge): plug leak
1258
1259         * libsoup/soup-auth-manager-ntlm.c: Make this work async too.
1260
1261         * libsoup/soup-headers.c (soup_header_parse_list):
1262         (soup_header_parse_param_list): plug leaks
1263
1264         * tests/auth-test.c (do_async_auth_test): test async auth
1265
1266         * docs/reference/client-howto.xml (Handling Authentication):
1267         mention async auth
1268
1269 2008-01-16  Dan Winship  <danw@gnome.org>
1270
1271         * configure.in: Bomb out if glib 2.15.0 isn't found.
1272         (AM_PATH_GLIB_2_0 doesn't do this itself.)
1273
1274 2008-01-15  Dan Winship  <danw@gnome.org>
1275
1276         * libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
1277         now works as a SoupSession::request_started watcher.
1278
1279         * libsoup/soup-connection.c: remove the no-longer-needed
1280         "authenticate" signal
1281
1282         * libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
1283         set. Remove connection-authenticate-signal references.
1284
1285 2008-01-15  Dan Winship  <danw@gnome.org>
1286
1287         * Merge libsoup-2.4 branch to trunk
1288         
1289 2008-01-15  Dan Winship  <danw@gnome.org>
1290
1291         * libsoup/soup-dns.c (resolve_status): Fix the logic here
1292
1293 2008-01-15  Dan Winship  <danw@gnome.org>
1294
1295         * docs/reference/porting-2.2-2.4.xml: add a few more updates
1296
1297 2008-01-15  Dan Winship  <danw@gnome.org>
1298
1299         * libsoup/soup-auth-digest.c: Use GChecksum for MD5
1300
1301         * libsoup/soup-md5-utils.[ch]: gone
1302
1303 2008-01-15  Dan Winship  <danw@gnome.org>
1304
1305         * libsoup/soup-server.c (soup_server_run_async):
1306         (soup_server_quit): Don't ref/unref the server here. It doesn't
1307         match the way other things work. #494128, Mathias Hasselmann.
1308
1309 2008-01-14  Dan Winship  <danw@gnome.org>
1310
1311         * libsoup/soup-address.h:
1312         * libsoup/soup-auth-domain-basic.h:
1313         * libsoup/soup-auth-domain-digest.h:
1314         * libsoup/soup-auth-domain.h:
1315         * libsoup/soup-auth.h:
1316         * libsoup/soup-logger.h:
1317         * libsoup/soup-message.h:
1318         * libsoup/soup-server.h:
1319         * libsoup/soup-session-async.h:
1320         * libsoup/soup-session-sync.h:
1321         * libsoup/soup-session.h:
1322         * libsoup/soup-socket.h: Add padding for future expansion to class
1323         structs
1324
1325 2008-01-14  Dan Winship  <danw@gnome.org>
1326
1327         * libsoup/soup-uri.c: Add more documentation.
1328         (soup_uri_is_https): gone, replaced by SOUP_URI_SCHEME_HTTP /
1329         SOUP_URI_SCHEME_HTTPS
1330         (soup_uri_new): allow passing NULL to get back an "empty" SoupURI.
1331         (soup_uri_to_string): rename just_path to just_path_and_query, to
1332         avoid fooling people.
1333         (soup_uri_decode, soup_uri_normalize): Change these to return the
1334         decoded/normalized string rather than modifying it in place.
1335         (soup_uri_set_scheme, etc): provide setters for SoupURI parts.
1336         (soup_uri_set_query_from_form): set uri->query via
1337         soup_form_encode_urlencoded().
1338
1339 2008-01-14  Dan Winship  <danw@gnome.org>
1340
1341         * configure.in: require glib 2.15.0, and gio
1342
1343         * libsoup/soup-dns.c (soup_dns_lookup_resolve)
1344         (soup_dns_lookup_resolve_async): Add GCancellables, and support
1345         cancellation of DNS lookups.
1346         (resolve_address, resolve_name): If we get a DNS failure (eg,
1347         because we're disconnected from the network), don't cache that
1348         result, just try again next time someone asks. [#508593]
1349
1350         * libsoup/soup-address.c (soup_address_resolve_async)
1351         (soup_address_resolve_sync): Add GCancellables, pass them to
1352         soup-dns.
1353
1354         * libsoup/soup-socket.c (soup_socket_connect_async)
1355         (soup_socket_connect_sync): Add GCancellables and implement
1356         cancellation.
1357         (soup_socket_start_ssl, soup_socket_start_proxy_ssl)
1358         (soup_socket_read, soup_socket_read_until, soup_socket_write): add
1359         GCancellables, though these routines don't actually implement
1360         cancellation yet.
1361         (soup_socket_disconnect): Don't close() the socket if someone is
1362         doing I/O on it, as that creates a race condition. (The fd number
1363         might be quickly recycled.) Instead, keep the socket open but
1364         dead, via shutdown().
1365
1366 2008-01-14  Benjamin Otte  <otte@gnome.org>
1367
1368         * libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for
1369         new-connection signal.
1370
1371 2008-01-14  Dan Winship  <danw@gnome.org>
1372
1373         * tests/test-utils.c: renamed from apache-wrappers and expanded.
1374         (test_init): do option parsing and general setup
1375         (test_cleanup): print error count and do cleanup
1376         (debug_printf): define here rather than in each test, and rename
1377         from dprintf [#501631]
1378         (soup_test_server_new): create a SoupServer, optionally in its own
1379         thread, and clean it up when exiting.
1380         (soup_test_session_new): create a SoupSession, optionally with
1381         an attached SoupLogger (if requested via command line)
1382         
1383         * tests/*.c: use test-utils
1384
1385 2008-01-13  Dan Winship  <danw@gnome.org>
1386
1387         * libsoup/soup-logger.c: New HTTP debug logging object. (Based on
1388         E2K_DEBUG and its clones.)
1389
1390         * libsoup/soup-message.c (soup_message_class_init)
1391         (soup_message_add_header_handler)
1392         (soup_message_add_status_code_handler): Change things around a
1393         little; remove the "requeuing or cancelling the message stops
1394         signal emission" rule, and instead make that be a feature of just
1395         the header and status code handlers. (Makes the basic signal
1396         handlers behave more predictably.)
1397
1398 2008-01-11  Dan Winship  <danw@gnome.org>
1399
1400         * libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
1401         * libsoup/soup-auth-domain-basic.c
1402         (soup_auth_domain_basic_set_auth_callback):
1403         * libsoup/soup-auth-domain-digest.c
1404         (soup_auth_domain_digest_set_auth_callback):
1405         * libsoup/soup-message.c (soup_message_cleanup_response)
1406         (soup_message_set_flags, soup_message_set_http_version)
1407         (soup_message_set_uri, soup_message_set_status)
1408         (soup_message_set_status_full): 
1409         * libsoup/soup-message-client-io.c (parse_response_headers): 
1410         * libsoup/soup-message-server-io.c (parse_request_headers):
1411         Call g_object_notify() when changing properties.        
1412
1413         * libsoup/soup-session.c (soup_session_class_init): bump the
1414         default value of SOUP_SESSION_MAX_CONNS_PER_HOST down to 2, per
1415         RFC 2616.
1416
1417         * libsoup/soup-message-body.c (soup_buffer_copy): When copying a
1418         TEMPORARY buffer, keep a reference to the copy, so that a second
1419         copy will get that same buffer, rather than actually copying it
1420         again.
1421
1422         * libsoup/soup-types.h: remove SoupMessageFilter, which doesn't
1423         exist any more
1424
1425 2008-01-07  Dan Winship  <danw@gnome.org>
1426
1427         * libsoup/soup-session.c (soup_session_class_init): Change
1428         request_started signal to have a SoupSocket as its last parameter.
1429
1430         * libsoup/soup-server.c: Fix request_* signals to all be (server,
1431         msg, client) rather than (server, client, msg).
1432
1433 2008-01-07  Dan Winship  <danw@gnome.org>
1434
1435         * docs/reference/porting-2.2-2.4.xml: Notes on porting from 2.2 to
1436         2.4
1437
1438 2008-01-07  Dan Winship  <danw@gnome.org>
1439
1440         * libsoup/*.c: Move gtk-doc stuff from docs/reference/tmpl/ to the
1441         C files themselves. Some updates.
1442
1443         * docs/reference/Makefile.am: fix (kludge?) this up to not require
1444         tmpl/ to exist
1445
1446         * docs/reference/client-howto.xml: 
1447         * docs/reference/server-howto.xml: update
1448
1449 2008-01-06  Dan Winship  <danw@gnome.org>
1450
1451         * libsoup/soup-soap-message.c:
1452         * libsoup/soup-soap-response.c: For the second time, remove SOAP
1453         support from libsoup... These APIs are not really all that helpful
1454         in the grand scheme of SOAPiness, and are only used by the
1455         Evolution GroupWise backend, which can just import this code and
1456         integrate it better there.
1457
1458         * libsoup/soup-misc.c (soup_xml_real_node): 
1459         * libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
1460         to soup-xmlrpc, and make it private. libxml is no longer exposed
1461         in the public API.
1462
1463 2008-01-06  Dan Winship  <danw@gnome.org>
1464
1465         * libsoup/soup-date.c (soup_date_new_from_now): new method to
1466         generate a date relative to now.
1467         (soup_date_new, etc): document SoupDate methods
1468
1469         * libsoup/soup-server.c (got_headers): set Date header, as
1470         required by RFC 2616
1471
1472 2008-01-06  Dan Winship  <danw@gnome.org>
1473
1474         * libsoup/soup-server.c (got_headers): if raw_paths isn't set,
1475         decode the request's uri->path before doing anything else
1476         (soup_server_class_init): add "raw-paths" property, to tell
1477         SoupServer to NOT decode the Request-URI path.
1478
1479         * libsoup/soup-auth-domain.c (soup_auth_domain_covers): Revert
1480         earlier path-decoding change; that happens at the SoupServer level
1481         now.
1482
1483 2008-01-06  Dan Winship  <danw@gnome.org>
1484
1485         * libsoup/soup-message-body.c (soup_buffer_get_type): Register
1486         SoupBuffer as a boxed type.
1487
1488         * libsoup/soup-message.c (soup_message_class_init): Use
1489         SOUP_TYPE_BUFFER in got_chunk signal definition
1490
1491         * libsoup/soup-server.c (soup_client_context_get_type): Register
1492         SoupClientContext as a pointer type
1493         (soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
1494         definitions.
1495
1496         * libsoup/soup-marshal.list: clean this up
1497
1498 2008-01-06  Dan Winship  <danw@gnome.org>
1499
1500         * libsoup/soup-server.c (SoupClientContext): Make this opaque.
1501         (soup_client_context_get_socket)
1502         (soup_client_context_get_auth_domain)
1503         (soup_client_context_get_auth_user): New accessors
1504         (soup_server_class_init): Make the signals take a
1505         SoupClientContext rather than a SoupSocket.
1506         (start_request, check_auth, call_handler, request_finished): Clean
1507         these up by using a SoupClientContext to communicate between them.
1508         (soup_server_add_handler): tweak the argument order to match the
1509         gtk standard (callback, user_data, destroynotify).
1510
1511 2008-01-06  Dan Winship  <danw@gnome.org>
1512
1513         * libsoup/soup-address.c: remove the "dns_result" signal, which
1514         was just an implementation detail of soup_address_resolve_async().
1515
1516 2008-01-06  Dan Winship  <danw@gnome.org>
1517
1518         * libsoup/*.c: misc documentation updates/gtk-doc fixes
1519
1520         * libsoup/soup-server.c: finally start documenting this properly.
1521
1522         * libsoup/soup-status.h (SoupStatusClass): kill this, since
1523         soup_message_add_status_class_handler() is gone now.
1524
1525         * libsoup/soup-status.c (soup_status_get_phrase): Update docs to
1526         explain that you probably don't want to use this.
1527
1528         * libsoup/soup-misc.h (SOUP_SSL_ERROR, SoupSSLError): Move these
1529         here, since soup-ssl.h isn't installed.
1530
1531         * docs/references: start updating this...
1532
1533 2008-01-04  Dan Winship  <danw@gnome.org>
1534
1535         * libsoup/soup-message-body.c (soup_buffer_new)
1536         (soup_message_body_append): Reorder the arguments to match
1537         soup_message_set_request/response, so it's not confusing.
1538
1539         * libsoup/soup-message.c (wrote_chunk): remove the "chunk" arg
1540         from the signal, as it turns out to be *in*convenient, since most
1541         callers use this signal to mean "need another chunk", so they want
1542         it to have the same prototype as "wrote_headers", which means
1543         "need first chunk".
1544
1545 2008-01-04  Dan Winship  <danw@gnome.org>
1546
1547         * libsoup/soup-auth-domain.c: add documentation
1548         (soup_auth_domain_set_filter): take a GDestroyNotify, for better
1549         bindability
1550
1551         * libsoup/soup-auth-domain-basic.c:
1552         * libsoup/soup-auth-domain-digest.c: Add documentation. Replace
1553         authentication signals with more-easily-bindable authentication
1554         callbacks (with GDestroyNotifys).
1555         (soup_auth_domain_digest_evil_check_password): Add this for the
1556         benefit of code that depends on being able to do the equivalent
1557         of the old soup_server_auth_check_passwd().
1558
1559 2008-01-02  Dan Winship  <danw@gnome.org>
1560
1561         * libsoup/soup-message-body.h (SoupMessageBody): add data and
1562         length parameters like SoupBuffer, to make this easier for callers
1563         to use.
1564
1565         * libsoup/soup-message-body.c (soup_message_body_append)
1566         (soup_message_body_append_buffer)
1567         (soup_message_body_truncate): Update body->length
1568         (soup_message_body_flatten): Fill in body->data (and NUL-terminate
1569         it as an added bonus).
1570
1571         * libsoup/soup-message.c (got_body): flatten the newly-gotten
1572         body.
1573         (soup_message_get_request, soup_message_get_response): gone
1574         
1575         * libsoup/soup-message-client-io.c (get_request_headers): 
1576         * libsoup/soup-message-server-io.c (get_response_headers): 
1577         * libsoup/soup-soap-message.c (soup_soap_message_parse_response):
1578         * tests/*.c: simplify
1579
1580 2008-01-02  Dan Winship  <danw@gnome.org>
1581
1582         * libsoup/Makefile.am (soup_headers): oops, move soup-auth.h here
1583
1584 2008-01-02  Dan Winship  <danw@gnome.org>
1585
1586         * libsoup/soup-form.c: new HTML-form-related methods (just URI
1587         decoding/encoding at the moment).
1588
1589         * libsoup/soup-server.h (SoupServerCallback): change the prototype
1590         to include the decoded path and query rather than the undecoded
1591         URI.
1592
1593         * libsoup/soup-server.c (call_handler): %-decode the URI path
1594         before looking up a handler. Decode query if available. Pass path
1595         and query to the callback.
1596
1597         * libsoup/soup-auth-domain.c (soup_auth_domain_covers): fix this
1598         to %-decode the URI path before testing it
1599
1600         * libsoup/soup-message-body.c (soup_message_body_append): allow
1601         0-length appends
1602
1603         * tests/query-test.c: URI query parsing test
1604
1605 2008-01-02  Dan Winship  <danw@gnome.org>
1606
1607         * libsoup/soup-uri.c:
1608         * libsoup/soup-uri.h: Change all the "const SoupURI *" to just
1609         "SoupURI *", since the const is just there to be annoying.
1610
1611         * */*.c: update
1612
1613 2008-01-02  Dan Winship  <danw@gnome.org>
1614
1615         * libsoup/soup-message-body.c (soup_message_body_get_length)
1616         (soup_message_body_get_chunk): Use goffset rather than gsize for
1617         references to the entire size of the message body. (SoupBuffer
1618         still uses gsize, so individual chunks can only be G_MAXSIZE
1619         long.)
1620         
1621         * libsoup/soup-message-headers.c
1622         (soup_message_headers_get_content_length):
1623         (soup_message_headers_set_content_length): Likewise, use goffset.
1624
1625 2008-01-02  Dan Winship  <danw@gnome.org>
1626
1627         * libsoup/soup-message-headers.c (soup_message_headers_get):
1628         Renamed from soup_message_headers_find, and with new behavior; now
1629         multiple headers with the same name are automatically merged
1630         together into a single comma-separated value, to ensure that apps
1631         treat multivalued headers the same regardless of how upstream
1632         servers generate them.
1633         (soup_message_headers_find_nth): no longer needed/wanted
1634
1635         * libsoup/soup-auth-manager.c: Update to deal with
1636         SoupMessageHeaders change. (Ugh.)
1637
1638         * tests/header-parsing.c: Update multiple-values test, and undo a
1639         change that mistakenly got committed while debugging something
1640         earlier.
1641
1642 2008-01-01  Dan Winship  <danw@gnome.org>
1643
1644         * libsoup/soup-auth-manager.c:
1645         * libsoup/soup-dns.c: 
1646         * libsoup/soup-gnutls.c: 
1647         * libsoup/soup-message.c: 
1648         * libsoup/soup-message-io.c: 
1649         * libsoup/soup-message-queue.c: 
1650         * libsoup/soup-misc.c: 
1651         * libsoup/soup-path-map.c: 
1652         * libsoup/soup-server.c: 
1653         * libsoup/soup-session.c: 
1654         * libsoup/soup-session-sync.c: 
1655         * libsoup/soup-socket.c: Use g_slice.
1656
1657 2008-01-01  Dan Winship  <danw@gnome.org>
1658
1659         * libsoup/soup-session.c (soup_session_cancel_message): add a
1660         "status_code" argument rather than having the caller set the
1661         status code separately, to prevent a race condition.
1662
1663 2008-01-01  Dan Winship  <danw@gnome.org>
1664
1665         * libsoup/soup-session.c (soup_session_queue_message): change the
1666         callback type to include the SoupSession as a parameter as well.
1667
1668         * *.c: update
1669
1670 2007-12-31  Dan Winship  <danw@gnome.org>
1671
1672         * libsoup/soup-session.c (soup_session_class_init): change
1673         the "authenticate" signal to include a SoupAuth rather than its
1674         components, and to have a "retrying" parameter rather than
1675         separating "authenticate" and "reauthenticate".
1676
1677         * libsoup/soup-connection.c (soup_connection_class_init): Likewise
1678
1679         * libsoup/soup-auth-manager.c (authenticate_auth): update
1680
1681         * libsoup/soup-auth.c: make various attributes into gobject
1682         properties.
1683         (soup_auth_is_for_proxy): check whether an auth is plain or proxy
1684         (soup_auth_get_host): get the hostname associated with an auth
1685
1686         * libsoup/soup-auth-ntlm.c: dummy class used by SoupConnectionNTLM
1687         in the authenticate signal
1688
1689         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): update for
1690         authenticate signals changes; use a fake SoupAuthNTLM to assist.
1691
1692 2007-12-20  Dan Winship  <danw@gnome.org>
1693
1694         * libsoup/soup-message.c (soup_message_add_header_handler)
1695         (soup_message_add_status_code_handler): Make these be wrappers
1696         around g_signal_connect() rather than having a completely separate
1697         system.
1698         (soup_message_class_init): improve signal docs. Use
1699         "got_foo_signal_wrapper" to wrap the got-foo signals.
1700         (got_foo_signal_wrapper): Wraps the marshaller for the got-foo
1701         signals and cancels the signal emission if the message gets
1702         cancelled or requeued.
1703         (got_informational, got_headers, got_chunk, got_body): remove
1704         no-longer-needed default implementations.
1705
1706         * libsoup/soup-message-handlers.c: gone
1707
1708         * tests/ntlm-test.c (do_message): Simplify now that callback
1709         processing doesn't happen in two separate phases.
1710
1711 2007-12-20  Dan Winship  <danw@gnome.org>
1712
1713         * libsoup/soup-auth-domain.c:
1714         * libsoup/soup-auth-domain-basic.c:
1715         * libsoup/soup-auth-domain-digest.c: New server-side auth system.
1716
1717         * libsoup/soup-server.c: remove SoupServerAuth / SoupAuthContext
1718         stuff, add SoupAuthDomain support.
1719         (SoupServerCallbackFn): improve the args here
1720         (SoupClientContext): renamed from SoupServerContext and made less
1721         redundant
1722
1723         * libsoup/soup-server-auth.c: gone!
1724
1725         * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm)
1726         (soup_auth_digest_get_algorithm, soup_auth_digest_parse_qop)
1727         (soup_auth_digest_get_qop, soup_auth_digest_compute_hex_urp)
1728         (soup_auth_digest_compute_hex_a1)
1729         (soup_auth_digest_compute_response): New routines shared between
1730         client-side and server-side digest auth.
1731
1732         * tests/server-auth-test.c: test server-side auth, using curl for
1733         the client side
1734
1735         * configure.in: check for curl, for server-auth-test
1736
1737 2007-12-20  Dan Winship  <danw@gnome.org>
1738
1739         * libsoup/soup-headers.c (soup_header_parse_list)
1740         (soup_header_parse_quality_list): New methods to parse list-type
1741         headers (with optional qvalues) correctly.
1742         (soup_header_parse_param_list): Rename to match the other methods,
1743         and update the semantics a bit.
1744         (soup_header_contains): Correctly check for a token in a list
1745
1746         * libsoup/soup-message.c (soup_message_is_keepalive):
1747         * libsoup/soup-message-client-io.c (get_request_headers):
1748         * libsoup/soup-message-server-io.c (parse_request_headers): Use
1749         soup_header_contains() with Connection headers.
1750
1751         * tests/header-parsing.c (do_qvalue_tests): add
1752         soup_header_parse_quality_list() test
1753
1754 2007-12-20  Dan Winship  <danw@gnome.org>
1755
1756         * libsoup/soup-auth-manager.c: Move auth-related code from
1757         SoupSession and SoupAuth here, and make various cleanups and
1758         beginnings of cleanups.
1759
1760         * libsoup/soup-session.c: lots of stuff moved to
1761         soup-auth-manager.c
1762
1763         * libsoup/soup-auth.c (soup_auth_new_from_headers): partly moved
1764         to soup-auth-manager.c, partly renamed to soup_auth_new().
1765         (soup_auth_update): new method to update an existing auth based on
1766         a new WWW-Authenticate/Proxy-Authenticate header. Also replaces
1767         the old "construct" method.
1768
1769         * libsoup/soup-auth-digest.c (update): Implement. If the new auth
1770         has stale=true, don't invalidate the auth, just update the nonce.
1771         (get_authorization): add a header handler to the message to catch
1772         Authentication-Info/Proxy-Authentication-Info headers so that if
1773         there's a nextnonce, we can start using it. #471380.
1774
1775         * libsoup/soup-auth-basic.c (update): Implement. (Updating an
1776         existing Basic auth always invalidates it.)
1777
1778         * tests/http.conf.in:
1779         * tests/auth-test.c: add a test for digest nonce handling
1780
1781 2007-12-20  Dan Winship  <danw@gnome.org>
1782
1783         * libsoup/soup-path-map.c: New type representing a sparse
1784         path->something mapping
1785
1786         * libsoup/soup-server.c: Use SoupPathMap to record handlers. Make
1787         SoupServerHandler a private type.
1788         (soup_server_new): Rewrite this to just be a thin wrapper, and put
1789         all of the code into a constructor override. #491653
1790         (soup_server_add_handler): Turn the "unregister" arg into a
1791         GDestroyNotify, for better bindability.
1792
1793 2007-12-19  Dan Winship  <danw@gnome.org>
1794
1795         * libsoup/soup-server.c: define new request_started, request_read,
1796         request_finished, and request_aborted signals, for finer-grained
1797         tracking than normal handlers allow.
1798         (check_auth): split this out of call_handler, and run it
1799         immediately after "got_headers", not "got_body", so that we can
1800         preemptively reject "Expect: 100-continue" messages that will
1801         require auth.
1802
1803         * libsoup/soup-message-io.c (io_write, io_read): Fix up
1804         100-continue processing
1805
1806         * tests/continue-test.c: new test of client/server 100-continue
1807         processing
1808
1809 2007-12-19  Dan Winship  <danw@gnome.org>
1810
1811         * libsoup/soup-socket.c: Cleanup. Remove the "connect_result"
1812         signal. Make local_address and remote_address
1813         into (construct-only) properties.
1814         (soup_socket_connect_async, soup_socket_connect_sync): Replace
1815         soup_socket_connect. _async takes a callback+user_data (like the
1816         old soup_socket_client_new_async), but doesn't implement the
1817         callback in terms of a connect_result signal.
1818         (soup_socket_client_new_async, soup_socket_client_new_sync): Gone.
1819         (Unused since the async_context addition anyway). Replaced by the
1820         new construct properties and connect methods.
1821         (soup_socket_read, soup_socket_read_until, soup_socket_write):
1822         Make these actually take a GError rather than doing an ugly hack
1823         to preserve the old API.
1824         (SOUP_SOCKET_FLAG_NODELAY, SOUP_SOCKET_FLAG_REUSEADDR)
1825         (SOUP_SOCKET_FLAG_CLOEXEC): kill these off (all three are always
1826         TRUE now); SoupSocket is libsoup's socket API; it's not
1827         necessarily intended to be generically useful for everyone.
1828
1829         * *.c: Update for SoupSocket changes
1830
1831 2007-12-19  Dan Winship  <danw@gnome.org>
1832
1833         * libsoup/soup-server-message.c: Kill!
1834
1835         * libsoup/soup-message-server-io.c (parse_request_headers):
1836         Generate the full request URL from the socket's data, since we no
1837         longer have soup_server_message_get_server().
1838
1839         * libsoup/soup-server.c (request_finished, call_handler)
1840         (start_request, new_connection): update
1841
1842 2007-12-19  Dan Winship  <danw@gnome.org>
1843
1844         * libsoup/soup-message-headers.c: Add some more fields to
1845         SoupMessageHeaders, and start caching the parsed values of certain
1846         important headers.
1847         (soup_message_headers_get/set_encoding): replaces old SoupMessage
1848         methods, and only deals with the declared transfer encoding, not
1849         the wire encoding.
1850         (soup_message_headers_get/set_content_length): Handle
1851         Content-Length.
1852         (soup_message_headers_get_expectations): Handle Expect. (Replaces
1853         the SOUP_MESSAGE_EXPECT_CONTINUE flag).
1854
1855         * libsoup/soup-message.c (soup_message_get_request_encoding):
1856         (soup_message_get_response_encoding):
1857         (soup_message_set_response_encoding): replaced by
1858         SoupMessageHeaders methods.
1859
1860         * libsoup/soup-message-client-io.c:
1861         * libsoup/soup-message-server-io.c:
1862         * libsoup/soup-message-io.c: Update for SoupMessageHeaders changes
1863         with encoding/content-length stuff.
1864
1865 2007-12-19  Dan Winship  <danw@gnome.org>
1866
1867         * libsoup/soup-message-body.c (SoupMessageBody): new opaque type
1868         for request/response bodies allowing less hacky handling of
1869         chunked encoding.
1870         (SoupBuffer): refcounted buffer type
1871
1872         * libsoup/soup-message.h (SoupMessage): turn request and response
1873         members into SoupMessageBody.
1874         (SoupOwnership, SoupDataBuffer): gone, replaced by
1875         SoupMessageBody/SoupBuffer.
1876
1877         * libsoup/soup-message.c (soup_message_wrote_chunk)
1878         (soup_message_got_chunk): add the chunk as a signal param rather
1879         than having it be visible in msg->request/response.
1880         (soup_message_add_chunk, soup_message_add_final_chunk)
1881         (soup_message_pop_chunk): replaced by SoupMessageBody methods now.
1882
1883 2007-12-19  Dan Winship  <danw@gnome.org>
1884
1885         * libsoup/soup-xmlrpc.c:
1886         * libsoup/soup-value-utils.c: Oops. Change the API a bunch so this
1887         works on x86; apparently I was doing illegal things with va_lists
1888         before that only work on x86_64.
1889
1890 2007-12-14  Dan Winship  <danw@gnome.org>
1891
1892         * libsoup/soup-message.c: use GObject properties for SoupMessage
1893         fields.
1894
1895         * libsoup/soup-message-server-io.c: 
1896         * libsoup/soup-soap-message.c: update for that
1897
1898 2007-12-14  Dan Winship  <danw@gnome.org>
1899
1900         * libsoup/soup-uri.c: Rename from SoupUri to SoupURI. Use the
1901         slice allocator and register as a boxed type.
1902         (SoupURI): Rename "protocol" field to "scheme" and "passwd" to
1903         "password". Make scheme an interned string. Replace
1904         SOUP_PROTOCOL_HTTPS with soup_uri_is_https().
1905
1906         * *.c: update
1907         
1908 2007-12-14  Dan Winship  <danw@gnome.org>
1909
1910         * libsoup/Makefile.am: Use glib-mkenums to build soup-enum-types.c
1911         and soup-enum-types.h
1912
1913         * libsoup/soup-address.h (SoupAddressFamily): redo this definition
1914         again, to make glib-mkenums happy.
1915
1916 2007-12-13  Dan Winship  <danw@gnome.org>
1917
1918         * libsoup/soup-xmlrpc.c: New easier-to-use and
1919         easier-to-do-language-bindings-of XML-RPC code.
1920
1921         * libsoup/soup-xmlrpc-message.c: 
1922         * libsoup/soup-xmlrpc-response.c: gone
1923
1924         * libsoup/soup-value-utils.c: Utilites for working with
1925         GValueArray, and GHashTables of GValues, used by soup-xmlrpc.
1926
1927         * tests/getbug.c: 
1928         * tests/xmlrpc-test.c: Update to use new XML-RPC stuff
1929
1930 2007-12-13  Dan Winship  <danw@gnome.org>
1931
1932         * libsoup/soup-date.c: Make a SoupDate type, and redo in terms of
1933         that rather than struct tm and time_t. Also be much more liberal
1934         when parsing.
1935
1936         * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_write_datetime): 
1937         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_datetime):
1938         Use SoupDate.
1939
1940         * tests/date.c: Use SoupDate, test parsing lots more formats
1941
1942         * tests/xmlrpc-test.c: update for SoupDate
1943
1944 2007-12-12  Dan Winship  <danw@gnome.org>
1945
1946         * libsoup/soup-message.c: 
1947         * libsoup/soup-message-private.h: Remove SoupMessageStatus,
1948         msg->status, and soup_message_io_* from the public API, as they
1949         all really belong to the session, not the message. (For now
1950         they've just been moved to soup-message-private.h, but some day
1951         they'll be fully refactored away from SoupMessage.)
1952
1953         * libsoup/soup-server.c (soup_server_pause_message)
1954         (soup_server_unpause_message): 
1955         * libsoup/soup-session.c (soup_session_pause_message)
1956         (soup_session_unpause_message): session/server-level methods to
1957         replace soup_message_io_pause() and soup_message_io_unpause().
1958
1959         * libsoup/soup-server-message.c: Remove some unused methods
1960
1961         * */*.c: Update
1962
1963 2007-12-05  Dan Winship  <danw@gnome.org>
1964
1965         * libsoup/soup-connection.c:
1966         * libsoup/soup-session.c: replace message filters with a
1967         "request_started" signal
1968
1969         * libsoup/soup-message-filter.c: gone
1970
1971         * libsoup/soup-types.h (SOUP_MAKE_INTERFACE): no longer needed
1972
1973 2007-12-05  Dan Winship  <danw@gnome.org>
1974
1975         * libsoup/soup-uri.c: Update for RFC 3986 changes, bgo 266516, and
1976         general conformance
1977         (soup_uri_get_protocol): match protocols case-insensitively
1978         (soup_uri_new_with_base): Don't fully %-decode the fragment,
1979         query, and path, but do %-decode anything which isn't supposed to
1980         be encoded. Recognize IPv6 address literals. Use stricter
1981         "../"-stripping rules on the path. Reject URIs with junk between
1982         the port number and the path.
1983         (soup_uri_to_string): Update for the fact that the host might be
1984         an IPv6 literal, and for the fact that path, query, and fragment
1985         are now pre-escaped.
1986         (soup_uri_equal): compare hostnames case-insensitively
1987         (uri_encoded_char): update to match RFC 3986
1988         (append_uri_encoded): use uppercase hex letters as recommended by
1989         RFC 3986.
1990         (soup_uri_normalize): decode only %-escapes that don't belong
1991         there.
1992
1993         * docs/reference/tmpl/soup-uri.sgml: add some more SoupUri docs
1994
1995         * tests/uri-parsing.c: Add new tests from RFC 3986, RFC 2732, RFC
1996         2616, bgo 266516, and elsewhere. Update some tests to match new
1997         parsing/unparsing rules.
1998
1999 2007-12-05  Dan Winship  <danw@gnome.org>
2000
2001         * libsoup/soup-message.c (soup_message_new)
2002         (soup_message_new_from_uri): g_intern_string() the method name
2003         rather than assuming it's static. Also remove the NULL==GET
2004         assumption.
2005
2006         * libsoup/soup-method.c:
2007         * libsoup/soup-method.h: remove the SOUP_METHOD_ID_* macros, and
2008         have the SOUP_METHOD_* macros return interned strings
2009
2010         * libsoup/soup-server.h (SoupServerContext): remove method_id
2011         field.
2012
2013         * libsoup/soup-server-message.c (finalize): no longer needed,
2014         since smsg->method is now an interned string just like with a
2015         normal SoupMessage.
2016
2017         * libsoup/soup-soap-message.c (soup_soap_message_new_from_uri):
2018         remove NULL==GET assumption
2019
2020         * *.c: update
2021
2022 2007-12-05  Dan Winship  <danw@gnome.org>
2023
2024         * libsoup/soup-message.h (SoupHTTPVersion): rename (from
2025         SoupHttpVersion)
2026
2027         * libsoup/soup-message-headers.c: New opaque type representing
2028         message headers, and new methods that work on it. Uses an array
2029         rather than a hash table, to preserve header ordering as required
2030         by RFC 2616. (Also fixes the API wart that
2031         "soup_message_get_header", etc, did not actually take a
2032         SoupMessage.)
2033
2034         * libsoup/soup-message.c: Kill off old header-manipulating
2035         methods.
2036
2037         * libsoup/soup-headers.c (soup_headers_parse_request): return a
2038         guint rather than gboolean, so we can properly return
2039         SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED where appropriate. Also fix
2040         up HTTP-Version parsing to conform with the RFC.
2041         (soup_headers_parse_status_line): Likewise update HTTP-Version
2042         parsing.
2043         
2044         * libsoup/soup-message-server-io.c (parse_request_headers): set
2045         return status appropriately on parse errors
2046
2047         * tests/header-parsing.c: update / add more tests
2048
2049         * *.c: update
2050
2051 2007-12-05  Dan Winship  <danw@gnome.org>
2052
2053         * libsoup/soup-misc.c: remove deprecated base64 methods
2054
2055         * tests/auth-test.c (identify_auth): oops, update to use
2056         g_base64_decode.
2057
2058 2007-12-05  Dan Winship  <danw@gnome.org>
2059
2060         * libsoup/Makefile.am (libsoupinclude_HEADERS): remove
2061         soup-connection.h and soup-message-queue.h
2062
2063         * libsoup/soup-types.h: remove SoupConnection and SoupMessageQueue
2064         which are no longer public
2065
2066         * libsoup/soup.h: sync this to reality for the first time in years
2067
2068         * libsoup/soup-session.c (soup_session_get_queue): Add this, for
2069         subclasses, as the queue is no longer a public part of the session
2070         struct.
2071
2072         * libsoup/soup-message.h:
2073         * libsoup/soup-message-private.h: Move soup_message_send_request()
2074         and soup_message_receive_request() to soup-message-private.h,
2075         remove soup_message_send_request_internal().
2076
2077         * libsoup/soup-session-private.h: Move "protected" SoupSession
2078         methods (soup_session_get_connection,
2079         soup_session_try_prune_connection) here from soup-session.h
2080         Add soup_session_get_queue.
2081
2082 2007-12-05  Dan Winship  <danw@gnome.org>
2083
2084         * configure.in: bump version to 2.3.0 and SOUP_API_VERSION to 2.4,
2085         and drop AGE/CURRENT/REVISION all to 0.
2086
2087         * libsoup/Makefile.am: Rename library to libsoup-2.4.la
2088
2089         (start of libsoup-2.4 branch)
2090
2091 2007-11-26  Dan Winship  <danw@gnome.org>
2092
2093         * configure.in: 2.2.104
2094
2095         * NEWS: update
2096
2097 2007-11-21  Dan Winship  <danw@gnome.org>
2098
2099         * libsoup/soup-message-io.c (soup_message_io_cleanup): make this
2100         non-static.
2101
2102         * libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
2103         rather than soup_message_io_stop(), to avoid leaks when finalizing
2104         an unfinished message. (Another part of #498509, Wouter Cloetens.)
2105
2106 2007-11-20  Dan Winship  <danw@gnome.org>
2107
2108         Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens
2109
2110         * libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
2111         the async_context
2112
2113         * libsoup/soup-server.c (soup_server_quit): disconnect the
2114         "new_connection" handler.
2115         (soup_server_get_async_context): Convenience method to return the
2116         server's async_context.
2117
2118         * libsoup/soup-server-message.c: don't circularly ref the server,
2119         there's no need anyway.
2120
2121         * libsoup/soup-session.c (soup_session_get_async_context):
2122         Convenience method to return the session's async_context.
2123
2124         * libsoup/soup-session-async.c (queue_message): call run_queue in
2125         the session's async_context, not the main context.
2126         (send_message): don't leak the async_context
2127
2128         * libsoup/soup-session-sync.c (queue_message_thread): don't leak
2129         the async_context
2130
2131         * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
2132         and doesn't leak
2133
2134 2007-11-20  Dan Winship  <danw@gnome.org>
2135
2136         * libsoup/soup-connection.c (soup_connection_connect_async): don't
2137         leak the SoupAddress.
2138
2139         * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
2140         when re-looking up an address
2141
2142         * libsoup/soup-session.c (soup_session_abort): close all
2143         connections in addition to cancelling messages (needed because
2144         connections currently end up holding a ref on their session,
2145         preventing them from being destroyed).
2146
2147         * tests/auth-test.c:
2148         * tests/ntlm-test.c:
2149         * tests/proxy-test.c:
2150         * tests/pull-api.c:
2151         * tests/ssl-test.c:
2152         * tests/xmlrpc-test.c: clean up more memory on exit, to help find
2153         leaks in the library
2154
2155         * tests/libsoup.supp: add a zillion new suppressions so we
2156         can use --leak-resolution=med
2157
2158 2007-11-16  Dan Winship  <danw@gnome.org>
2159
2160         * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
2161         around the got_chunk emission so that it doesn't get messed up if
2162         you pause the I/O from the got_chunk handler. (#452280, Marco
2163         Barisione).
2164         (soup_message_io_pause, soup_message_io_unpause): Update docs
2165         again; these are now allowed with client-side I/O as well. Fix
2166         unpause() to unpause asynchronously on async sockets.
2167         
2168         * libsoup/soup-session-async.c (send_message): Iterate session's
2169         async_context, not the default main context.
2170
2171         * tests/pull-api.c: Test/sample of creating a pull-style API using
2172         SoupSessionAsync.
2173
2174         * tests/index.txt: new file to act as DirectoryIndex for the
2175         tests. (In particular, pull-api wants this to be largeish.)
2176
2177 2007-10-28  Dan Winship  <danw@gnome.org>
2178
2179         * configure.in: 2.2.103
2180
2181         * NEWS: update
2182
2183 2007-10-28  Dan Winship  <danw@gnome.org>
2184
2185         * libsoup/soup-server.c (start_request, request_finished): ref the
2186         socket around the processing of the message, since otherwise it
2187         might already be freed when request_finished runs. #459896.
2188
2189         * libsoup/soup-message-io.c (soup_message_io_pause)
2190         (soup_message_io_unpause): Clarify the docs here; this is for
2191         server-side use only. Inspired by #452280.
2192
2193         * docs/reference/server-howto.xml: You need to watch the
2194         "finished" signal on the message if using soup_message_io_pause()
2195         or chunked encoding, because the client might disconnect while
2196         you're paused. Clarification inspired by #471385.
2197
2198         * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
2199         server-howto.xml points to it as an example of what to do.
2200
2201 2007-10-28  Dan Winship  <danw@gnome.org>
2202
2203         * libsoup/soup-session.c (finalize): free proxy-related stuff
2204
2205         * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
2206         pointer. (From the dev repo, but identical to a patch from Rob
2207         Bradford in #484988.)
2208
2209         * tests/*.c: fix leaks
2210
2211 2007-10-28  Dan Winship  <danw@gnome.org>
2212
2213         * tests/auth-test.c:
2214         * tests/date.c:
2215         * tests/header-parsing.c:
2216         * tests/ntlm-test.c:
2217         * tests/proxy-test.c:
2218         * tests/uri-parsing.c:
2219         * tests/xmlrpc-test.c: Make these less verbose by default (to make
2220         it easier to see what failed when a "make check" fails).
2221
2222 2007-10-15  Dan Winship  <danw@gnome.org>
2223
2224         * configure.in: 2.2.102
2225
2226         * NEWS: update
2227
2228 2007-10-08  Dan Winship  <danw@gnome.org>
2229
2230         * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
2231
2232         * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
2233
2234 2007-10-05  Dan Winship  <danw@gnome.org>
2235
2236         * configure.in: 2.2.101
2237
2238         * NEWS: update
2239
2240         * tests/httpd.conf.in: 
2241         * tests/Makefile.am: 
2242         * tests/ssl-test.c: srcdir != builddir fixes
2243
2244 2007-10-05  Dan Winship  <danw@gnome.org>
2245
2246         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
2247         if the authenticate callback returns a username and no password
2248         (even though it's not supposed to do that). #480987
2249
2250 2007-09-24  Dan Winship  <danw@gnome.org>
2251
2252         * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
2253         (SoupAuthClass) remove "get_realm" virtual method.
2254
2255         * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
2256         WWW-Authenticate/Proxy-Authenticate header here, set realm, and
2257         pass the params hash to the construct method.
2258         (soup_auth_get_info): Return an identifier for the auth:
2259         "SCHEME:REALM"
2260
2261         * libsoup/soup-auth-basic.c:
2262         * libsoup/soup-auth-digest.c: update
2263
2264         * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
2265         use soup_auth_get_info().
2266
2267 2007-09-24  Dan Winship  <danw@gnome.org>
2268
2269         * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
2270         improvement suggested by RFC2616 19.3.
2271
2272         * libsoup/soup-headers.c (soup_headers_parse_request): allow
2273         erroneous trailing whitespace after HTTP version. #475169
2274
2275         * libsoup/soup-message-server-io.c (parse_request_headers): fix
2276         the parsing of the Host header to assume it already includes the
2277         port (which it should; the only reason this ever worked is because
2278         SoupUri ignores the second port number when parse_request_headers
2279         generates a URL like "http://localhost:9999:9999/").
2280
2281         * tests/header-parsing.c (reqtests): add a test for #475169
2282
2283 2007-09-23  Dan Winship  <danw@gnome.org>
2284
2285         * libsoup/soup-message.c (soup_message_class_init): remove a
2286         mysterious partial sentence in the ::wrote-chunk docstring.
2287         #458116
2288
2289         * docs/reference/libsoup-sections.txt: Remove documentation of MD5
2290         methods, which are not public. #440092
2291
2292 2007-09-23  Dan Winship  <danw@gnome.org>
2293
2294         * libsoup/soup-message.c (soup_message_set_auth)
2295         (soup_message_set_proxy_auth): Only remove the Authorization /
2296         Proxy-Authorization header from the message if it was previously
2297         set by soup_message_set_auth(). (Eg, not if it was added by
2298         SoupConnectionNTLM.) #471389
2299
2300         * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
2301
2302         * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
2303         test the crypto/encoding bits, just that the right headers are
2304         being sent at the right times.
2305
2306 2007-09-14  Dan Winship  <danw@gnome.org>
2307
2308         Make "make check" pass on Fedora 7:
2309
2310         * configure.in: update apache/php tests with additional filenames
2311
2312         * tests/httpd.conf.in: updates for configure.in changes and
2313         slightly-more-recent apache
2314
2315         * tests/ssl-test.c (start_writing): fix uninitialized struct field
2316         (main): start server after setting up client since otherwise
2317         there's a race condition since soup_gnutls_init() isn't actually
2318         thread-safe. (FIXME)
2319
2320         * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
2321         (which only exists if register_globals is set)
2322
2323 2007-06-01  Dan Winship  <danw@novell.com>
2324
2325         * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
2326         fix. noted by "cascardo" on libsoup-list.
2327
2328 2007-05-16  Jonathon Jongsma  <jjongsma@gnome.org>
2329
2330         * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
2331         headers so that libsoup can be used from C++ programs. #438776
2332
2333 2007-04-16  Dan Winship  <danw@novell.com>
2334
2335         * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
2336         than just using gpointer
2337
2338         * libsoup/soup-server.c (SoupServerPrivate): use it
2339
2340         * libsoup/soup-session.c (SoupSessionPrivate): use it
2341
2342         * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
2343         rather than "cred" as the abbreviation for "credentials".
2344
2345         * docs/reference/libsoup-sections.txt:
2346         * docs/reference/tmpl/soup-misc.sgml: 
2347         * docs/reference/tmpl/soup-ssl.sgml: update
2348         
2349 2007-03-29  Dan Winship  <danw@novell.com>
2350
2351         * libsoup/soup-session-sync.c (queue_message): Implement this by
2352         sending the message (synchronously) in another thread and then
2353         queueing the callback back in the main thread.
2354
2355         * libsoup/soup-session.c (soup_session_queue_message): update docs
2356         to be more explicit about what thread the callback occurs in
2357
2358 2007-03-17  Dan Winship  <danw@novell.com>
2359
2360         * libsoup/soup-message.c (soup_message_set_auth)
2361         (soup_message_get_auth, soup_message_set_proxy_auth)
2362         (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
2363         message.
2364
2365         * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
2366         soup_message_set_proxy_auth.
2367         (update_auth_internal): Call soup_message_get_auth or
2368         soup_message_get_proxy_auth to determine the message's prior auth,
2369         rather than calling lookup_auth() again, since it isn't guaranteed
2370         to return the same thing now as it did when the message was
2371         originally sent. Fixes erroneous 401s when queuing multiple
2372         messages at once to an as-yet-unauthenticated-to server. #271540
2373
2374         * libsoup/soup-session-async.c (queue_message): don't run the
2375         queue right away, do it at idle time. Otherwise in some cases
2376         (especially errors), the message callbacks could be invoked before
2377         queue_message returns.
2378
2379         * tests/auth-test.c: add a regression test for #271540.
2380
2381 2007-03-17  Dan Winship  <danw@novell.com>
2382
2383         * configure.in: require glib 2.12. check for timegm().
2384
2385         * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
2386         (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
2387         patch from Emmanuele Bassi.
2388
2389         * libsoup/soup-types.h: remove local copy of
2390         G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
2391         glib.
2392
2393         * libsoup/soup-misc.c (soup_base64_encode_close)
2394         (soup_base64_encode_step, soup_base64_encode)
2395         (soup_base64_decode_step): Make these just be wrappers around the
2396         glib base64 methods. (For now; eventually they'll just go away.)
2397
2398         * libsoup/soup-auth-basic.c (authenticate): 
2399         * libsoup/soup-auth-digest.c (authenticate):
2400         * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
2401         (soup_ntlm_response): 
2402         * libsoup/soup-server-auth.c (soup_server_auth_new): 
2403         * libsoup/soup-soap-message.c (soup_soap_message_write_base64): 
2404         * libsoup/soup-xmlrpc-message.c
2405         (soup_xmlrpc_message_write_base64): 
2406         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
2407         Use glib base64 methods
2408
2409 2007-03-16  Dan Winship  <danw@novell.com>
2410
2411         * libsoup/soup-message.c (soup_message_get_response_encoding):
2412         update the handling of CONNECT: it has no response body by
2413         default, but does have a body if its headers say so.
2414
2415         * tests/proxy-test.c: test libsoup's behavior when talking to
2416         proxies.
2417
2418         * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
2419         sections configuring them, for proxy-test
2420
2421         * configure.in: update the apache-module-dir-finding code to deal
2422         with the fact that some modules (eg, mod_ssl) might only be in the
2423         mpm-specific module dir, while others (eg, mod_php5) might only be
2424         in the generic module dir.
2425
2426 2007-03-12  Dan Winship  <danw@novell.com>
2427
2428         * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
2429         ssl-test. #417617, patch from Elijah Newren.
2430
2431 2007-03-12  Dan Winship  <danw@novell.com>
2432
2433         * libsoup/soup-session-sync.c (wait_for_connection): if
2434         soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
2435         try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
2436         where-the-proxy-closes-the-connection-when-returning-407. (Reported
2437         by Varadhan.)
2438
2439         * tests/get.c: Rewrite to use soup_session_send_message rather
2440         than soup_session_queue_message, and add a "-s" flag to use
2441         SoupSessionSync rather than SoupSessionAsync (so we can test bugs
2442         in the sync code paths).
2443
2444 2007-03-08  Dan Winship  <danw@novell.com>
2445
2446         * libsoup/soup-gnutls.c (do_handshake): don't return
2447         G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
2448         until the handshake is complete.
2449         (soup_gnutls_read, soup_gnutls_write): if we get
2450         GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
2451         returning G_IO_STATUS_AGAIN; if the socket is blocking then
2452         G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
2453         might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
2454         or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
2455
2456         #415402, based on a patch from Jacob Berkman.
2457
2458         * tests/ssl-test.c: basic ssl test. In particular, tests that
2459         rehandshake requests are handled correctly during both synchronous
2460         and asynchronous I/O. Might eventually test other stuff too...
2461
2462         * configure.in: 
2463         * tests/Makefile.am: updates for ssl-test
2464
2465 2007-02-19  Dan Winship  <danw@novell.com>
2466
2467         * configure.in: Get gcrypt libs/cflags.
2468
2469         * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
2470         gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
2471
2472 2007-02-12  Dan Winship  <danw@novell.com>
2473
2474         * configure.in: 2.2.100
2475
2476 2007-02-12  Dan Winship  <danw@novell.com>
2477
2478         * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
2479         this to handle "\0"-terminated status lines (eg, from WebDAV
2480         responses), like the docs say it does. #406997
2481         (soup_headers_parse): Balance that out by rejecting internal "\0"s
2482         here.
2483         (soup_headers_parse_request, soup_headers_parse_response): Update
2484         docs to warn that @dest may be modified even on error. (This was
2485         always true, it just wasn't documented.)
2486
2487 2007-01-16  Dan Winship  <danw@novell.com>
2488
2489         * tests/header-parsing.c (do_request_tests, do_response_tests):
2490         initialize "errors" to 0. duh. Pointed out by Michael Wolf.
2491
2492 2007-01-08  Dan Winship  <danw@novell.com>
2493
2494         * configure.in: 2.2.99
2495
2496         * NEWS: update
2497
2498 2007-01-06  Dan Winship  <danw@novell.com>
2499
2500         * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
2501         easier to understand and more correct, and make the "str" param
2502         const rather than overwriting it during parsing.
2503         (soup_headers_parse_request, soup_headers_parse_response):
2504         Likewise, make "str" param const. Fix the doc comment to describe
2505         the correct constraint on str. Make the parsing slightly more
2506         lenient as per sections 4.1 and 19.3 of RFC 2616.
2507
2508         * tests/header-parsing.c: new regression test, for Request-Line,
2509         Status-Line, and message-header parsing.
2510
2511         Inspired by #391970 (crash in SoupServer when certain invalid
2512         requests are received).
2513
2514 2006-12-05  Dan Winship  <danw@novell.com>
2515
2516         * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
2517         to soup_message_io_stop() here; the corresponding calls were
2518         needed back in the SoupContext days, but they are wrong now and
2519         cause async-redirects-to-other-hosts to fail. #382251. Also
2520         clarify docs with respect to soup_session_requeue_message().
2521
2522         * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
2523
2524         * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
2525         by Chris Austin.
2526
2527 2006-11-20  Dan Winship  <danw@novell.com>
2528
2529         * configure.in: 2.2.98
2530
2531         * NEWS: update
2532
2533 2006-11-20  Dan Winship  <danw@novell.com>
2534
2535         Patch from Andrew W. Nosenko:
2536
2537         * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
2538         memory leak when parse_response_headers() is called on a message
2539         that has a 'reason_phrase' already for some reason.
2540
2541         * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
2542         hostname was not freed.
2543         (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
2544         'chan' was not freed in case of initialization error. Avoid double
2545         close of the "real" (plain, non-ssl) channel FD.
2546         
2547         * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
2548         memory leak: the "real" (plain, non-ssl) GIOChannel was never
2549         "finally" unreffed (one more *_ref() than *_unref()) in case of
2550         ssl-wrapping.
2551
2552 2006-11-20  Dan Winship  <danw@novell.com>
2553
2554         * libsoup/soup-connection-ntlm.c (send_request): 
2555         * libsoup/soup-session-sync.c (queue_message): 
2556         * libsoup/soup-status.c (reason_phrases): Add some missing
2557         "static"s. Patch from Matthias Clasen, #376387
2558
2559         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
2560         (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
2561         same thing as <value><string>foo</string></value>. Pointed out by
2562         Todd Kulesza. #364490
2563
2564 2006-11-06  Dan Winship  <danw@novell.com>
2565
2566         * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
2567         addition of soup_xml_real_node.
2568
2569         * NEWS: update
2570
2571 2006-11-06  Dan Winship  <danw@novell.com>
2572
2573         * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
2574         "real" (ie, not comment or whitespace) xml node
2575
2576         * libsoup/soup-soap-response.c (parse_parameters) 
2577         (soup_soap_response_from_string) 
2578         (soup_soap_parameter_get_first_child) 
2579         (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
2580         Based on a patch from Andrew W. Nosenko.
2581
2582         * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
2583         don't call xmlKeepBlanksDefault, which changes libxml's behavior
2584         globally! Instead, use soup_xml_real_node() when traversing the
2585         xml tree.
2586
2587         * libsoup/soup-xmlrpc-response.c
2588         (soup_xmlrpc_response_from_string): don't call
2589         xmlKeepBlanksDefault.
2590         (exactly_one_child): rewrite in terms of soup_xml_real_node()
2591         (which means it handles comments now as well)
2592         (soup_xmlrpc_value_get_struct)
2593         (soup_xmlrpc_value_array_get_iterator)
2594         (soup_xmlrpc_value_array_iterator_prev)
2595         (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
2596
2597 2006-11-05  Dan Winship  <danw@novell.com>
2598
2599         * libsoup/soup-headers.c (soup_headers_parse_request): document
2600         this (in particular, point out that str+len must point to exactly
2601         the right place). Allow req_method and req_path to be NULL.
2602         (soup_headers_parse_status_line, soup_headers_parse_response):
2603         document. Also, change "status_phrase" argument to "reason_phrase"
2604         to match the spec. Inspired by #339889.
2605
2606 2006-11-03  Dan Winship  <danw@novell.com>
2607
2608         * libsoup/*.c: fix lots of warnings. Partially from patches from
2609         Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
2610         
2611 2006-11-03  Dan Winship  <danw@novell.com>
2612
2613         * Makefile.am (uninstall-local): uninstall the pkgconfig file.
2614         Based on #356809 from Matthew Barnes.
2615
2616         * libsoup/soup-server.c (get_property): Fix leaks pointed out by
2617         Paolo Borelli. #351500
2618
2619         * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
2620         pointed out by Andrew W. Nosenko.
2621
2622         * configure.in: Use pkgconfig to find gnutls. Remove old static
2623         linking stuff that was only needed for rcd.
2624
2625         * acinclude.m4: remove gnutls stuff
2626
2627         * libsoup.pc.in: Use Requires rather than putting xml/ssl
2628         dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
2629         #343340.
2630
2631         * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
2632         cygwin. From "Cygwin Ports maintainer", #321827.
2633
2634 2006-07-24  Dan Winship  <danw@novell.com>
2635
2636         * configure.in: 2.2.96. bump AGE and CURRENT for new API
2637
2638         * NEWS: update
2639
2640         * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
2641         New, from Fernando Herrera, bug 348532.
2642
2643 2006-07-21  Dan Winship  <danw@novell.com>
2644
2645         * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
2646         constructed auth doesn't have a realm, it's invalid, as per RFC
2647         2617. Based on a patch from Nate Nielsen on libsoup-list.
2648         (soup_auth_get_realm): remove "if available" from docs; all auths
2649         always have a realm.
2650
2651         * libsoup/soup-message-server-io.c (get_response_headers): If the
2652         server handler set a Content-Length header on the message, don't
2653         add a second one. (Preserves compatibility with an old hacky way
2654         that people might have been handling HEAD from SoupServer.)
2655
2656         * README: update to mention mailing list and bugzilla
2657
2658         * HACKING: kill this since there's nothing here that isn't either
2659         obvious, or redundant with the README
2660
2661 2006-07-21  Dan Winship  <danw@novell.com>
2662
2663         * libsoup/soup-server-message.c (soup_server_message_init):
2664         initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
2665         SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
2666         actually worked here, and so there was an undocumented requirement
2667         that you manually set the encoding on every response
2668         (which SoupServer itself was not doing on internal errors).
2669         Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
2670         (soup_server_message_set_encoding): reject the new
2671         SoupTransferEncoding values, for compatibility
2672
2673         * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
2674         SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
2675         public API, it always has been, due to bugs. Add some new values,
2676         currently just for internal use: SOUP_TRANSFER_NONE (for cases
2677         like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
2678         SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
2679         actually implemented yet).
2680
2681         * libsoup/soup-message.c (soup_message_get_request_encoding,
2682         soup_message_get_response_encoding): figure out the body encoding
2683         being used by the request/response, including all the tricky
2684         cases like HEAD/1xx/etc.
2685         (soup_message_is_keepalive): if the response encoding is
2686         SOUP_TRANSFER_EOF, then the message isn't keepalive.
2687
2688         * libsoup/soup-message-client-io.c (parse_response_headers): use
2689         soup_message_get_response_encoding.
2690
2691         * libsoup/soup-message-server-io.c (parse_request_headers): use
2692         soup_message_get_request_encoding.
2693         (get_response_headers): use both soup_server_message_get_encoding
2694         and soup_message_get_response_encoding, to properly distinguish
2695         between the wire encoding and the alleged-by-headers encoding
2696         (which differ for HEAD, etc).
2697
2698         * libsoup/soup-message-io.c (io_error, read_body_chunk):
2699         s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
2700         (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
2701         SOUP_MESSAGE_IO_STATE_FINISHING.
2702
2703         * libsoup/soup-server.c (request_finished): Check
2704         soup_socket_is_connected() *before* soup_message_is_keepalive(),
2705         since the message will be invalid if the client unexpectedly
2706         dropped the connection.
2707
2708         * tests/simple-httpd.c (server_callback): handle HEAD requests.
2709         Remove no-longer-necessary soup_server_message_set_encoding()
2710         call.
2711
2712         * tests/get.c: add -d (debug) flag to print headers, and -h flag
2713         to do a HEAD rather than GET
2714
2715 2006-07-10  Dan Winship  <danw@novell.com>
2716
2717         * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
2718         time. Pointed out by Daniel Holbach.
2719         
2720 2006-07-10  Dan Winship  <danw@novell.com>
2721
2722         * configure.in: 2.2.95
2723
2724         * NEWS: update
2725
2726 2006-06-19  Dan Winship  <danw@novell.com>
2727
2728         * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
2729         unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
2730
2731         * configure.in: fix some quoting
2732
2733 2006-06-14  Dan Winship  <danw@novell.com>
2734
2735         * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
2736
2737         * tests/xmlrpc-test.c: XML-RPC regression test
2738
2739         * tests/xmlrpc-server.php: PHP server for xmlrpc-test
2740
2741         * tests/httpd.conf.in: add php stuff
2742
2743         * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
2744         rather than "stop", so that it stops listening on the socket
2745         before exiting, so that we can immediately start another apache
2746         (eg, in "make check").
2747
2748         * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
2749         counting.
2750
2751         * libsoup/soup-xmlrpc-message.c
2752         (soup_xmlrpc_message_write_datetime): rename from
2753         "..._write_time", to make it consistent with the XML-RPC type name
2754         and the corresponding SoupXmlrpcResponse method. Also, fix it to
2755         use the same ISO 8601 format as the spec, and use the right value
2756         for the seconds field.
2757         (soup_xmlrpc_message_write_base64): Change the buf arg to a
2758         gconstpointer rather than a const char *.
2759
2760         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
2761         Return a GByteArray containing the decoded data, rather than
2762         the base64-encoded string.
2763         (soup_xmlrpc_value_dump_internal): Update for that (and don't
2764         leak it).
2765         (soup_xmlrpc_value_array_get_iterator,
2766         soup_xmlrpc_value_array_iterator_get_value): Make these actually
2767         work.
2768
2769 2006-06-12  Dan Winship  <danw@novell.com>
2770
2771         * configure.in: 2.2.94
2772
2773         * NEWS: update
2774
2775 2006-06-12  Dan Winship  <danw@novell.com>
2776
2777         * docs/reference/client-howto.xml: 
2778         * docs/reference/server-howto.xml: New client and server API
2779         tutorials.
2780
2781         * docs/reference/*: reorganize, regenerate, fill in some missing
2782         pieces, etc
2783
2784         * libsoup/soup-connection.c (soup_connection_new): document the
2785         varargs param
2786
2787         * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
2788
2789         * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
2790         in doc.
2791
2792 2006-06-12  Dan Winship  <danw@novell.com>
2793
2794         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
2795         soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
2796         #344458.
2797         (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
2798         the output parameter and make the return value match the other
2799         get_* methods.
2800
2801 2006-06-09  Dan Winship  <danw@novell.com>
2802
2803         * configure.in: Add tests for apache, output tests/httpd.conf
2804
2805         * tests/htdigest: 
2806         * tests/htpasswd: 
2807         * tests/httpd.conf.in: Apache 2.2 config files for auth-test
2808
2809         * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
2810         to start/stop apache
2811
2812         * tests/auth-test.c: Use apache-wrapper functions to start a local
2813         apache process to test authentication against, since the auth-test
2814         tree at developer.ximian.com went missing a long time ago. #311825
2815
2816         * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
2817         (TESTS): include auth-test if HAVE_APACHE.
2818
2819         * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
2820         URI pointing to a directory rather than a file.
2821
2822 2006-06-08  Dan Winship  <danw@novell.com>
2823
2824         * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
2825         soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
2826         Check return value of strtol/g_ascii_strtod correctly. #344222,
2827         patch from Brent Smith.
2828
2829 2006-06-07  Dan Winship  <danw@novell.com>
2830
2831         * libsoup/soup-xmlrpc-response.c
2832         (soup_xmlrpc_response_from_string): record whether or not the
2833         response was a fault.
2834         (soup_xmlrpc_response_is_fault): test that. #343973, patch from
2835         Brent Smith.
2836
2837 2006-05-29  Dan Winship  <danw@novell.com>
2838
2839         * configure.in: 2.2.93
2840
2841         * NEWS: update
2842
2843 2006-05-29  Dan Winship  <danw@novell.com>
2844
2845         * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
2846         "FINISHING" which means "done I/O, but not yet done processing and
2847         cleanup" before "DONE" (which now always means "completely done").
2848         (soup_message_io_stop): disconnect the socket if the read state is
2849         "< FINISHING", not "!= DONE".
2850         (io_error): on an EOF-that-signals-end-of-data, set state to
2851         FINISHING and run io_read().
2852         (io_read, io_write): remove the g_return_if_fails from before.
2853         s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
2854         listening for the readable/writable signal (eg, so we don't end up
2855         reading a following pipelined request), and set the state to DONE.
2856         (soup_message_io_unpause): Only reconnect the readable/writable
2857         signals if the io state isn't DONE. Guard the calls to
2858         io_read/io_write better so that it's safe to call this even after
2859         they are both DONE, since it may be easier for us to test that
2860         than for the caller to.
2861
2862         Fixes 334469, 342640, and another bug caused by the earlier
2863         workaround to 334469. Based on patches and analysis from William
2864         Jon McCann and Armin Bauer.
2865
2866         * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
2867         this work again. (Pointed out by Alex Larsson)
2868
2869 2006-05-26  Dan Winship  <danw@novell.com>
2870
2871         * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
2872         #342048
2873
2874         * libsoup/soup-connection.c (soup_connection_connect_sync): Start
2875         SSL after CONNECTing! Doh. Part of bnc #174255.
2876         (SoupConnectionMode): new enum for the three types of
2877         SoupConnection (direct, proxy, tunnel).
2878         (set_property): set priv->mode according to proxy_uri and
2879         conn_uri.
2880         (socket_connect_result, soup_connection_connect_sync): use
2881         priv->mode to decide whether or not to tunnel.
2882         (send_request): Only pass TRUE for is_proxy to
2883         soup_message_send_request if mode is PROXY, not if it's TUNNEL.
2884         (Also part of bnc #174255).
2885
2886 2006-05-26  Dan Winship  <danw@novell.com>
2887
2888         * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
2889         if IO is currently in progress on a message.
2890
2891         * libsoup/soup-session-async.c (run_queue): don't process messages
2892         that are io_in_progress. #342545, fix based on analysis from Wang
2893         Xin. (In the future we may want to re-fix this by adding a
2894         REQUEUED message status separate from QUEUED.)
2895
2896 2006-05-22  Dan Winship  <danw@novell.com>
2897
2898         * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
2899         while holding host_lock; that's not allowed and can cause
2900         deadlock. #309867. Based on a patch from Veerapuram Varadhan for
2901         part of bnc #174255.
2902
2903 2006-04-10  Dan Winship  <danw@novell.com>
2904
2905         * configure.in: bump version to 2.2.92
2906
2907         * NEWS: update
2908
2909 2006-04-10  Dan Winship  <danw@novell.com>
2910
2911         * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
2912         if these get called after the IO is done. This isn't supposed to
2913         happen, but apparently does. Workaround for #334469.
2914
2915         * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
2916         NULL-terminate these so we don't crash when trying to parse an
2917         invalid value. (Flip side of the previous #328615 patch.)
2918
2919 2006-04-02  Dan Winship  <danw@novell.com>
2920
2921         * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
2922         Write out correct digest algorithm value. #328615.
2923
2924         * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
2925         Request-Line-parsing code to not have a lame max length. #335040.
2926
2927         * Makefile.am (install-data-local): Install the .pc file mode 644,
2928         not 755. #330878
2929
2930         * libsoup/soup-auth-digest.c:
2931         * libsoup/soup-auth.c:
2932         * libsoup/soup-message-client-io.c:
2933         * libsoup/soup-message-server-io.c:
2934         * libsoup/soup-message.c:
2935         * libsoup/soup-method.c:
2936         * libsoup/soup-server-auth.c:
2937         * tests/get.c: replace locale-ish strcasecmps with
2938         g_ascii_strcasecmp
2939
2940         * libsoup/*.c: fix most signed/unsigned mismatch warnings
2941
2942 2006-03-03  Dan Winship  <danw@novell.com>
2943
2944         * configure.in: bump version to 2.2.91.
2945
2946         * NEWS: Update
2947
2948 2006-03-03  Dan Winship  <danw@novell.com>
2949
2950         * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
2951         GMainContext as well, and update the resolution code to dispatch
2952         each lookup result in the correct context.
2953
2954         * libsoup/soup-address.c (soup_address_resolve_async_full): New
2955         method that takes a GMainContext to pass to
2956         soup_dns_lookup_resolve_async.
2957
2958         * libsoup/soup-socket.c (soup_socket_connect): Use
2959         soup_address_resolve_async_full. Fixes a problem reported by Armin
2960         Bauer.
2961
2962         * configure.in: update to require glib 2.6, since apparently the
2963         code does.
2964
2965 2006-02-25  Veerapuram Varadhan <vvaradhan@novell.com>
2966
2967         * libsoup/soup-connection.c:
2968         * libsoup/soup-session.c:
2969         * libsoup/soup-socket.c: add a "timeout" property,
2970         which gets passed from server to socket, and session to connection
2971         to socket, allowing blocking non-responsive sync connections to 
2972         return.  Combination of "EAGAIN" && "Blocking" connection is treated
2973         as error and the connection will be terminated and the control 
2974         is returned to the caller immediately.
2975                 
2976 2006-02-02  Tor Lillqvist  <tml@novell.com>
2977
2978         * configure.in: Don't use getaddrinfo() etc or try to support IPv6
2979         on Windows, as they are present by default on XP only. We do want
2980         to support Windows 2000, too.
2981
2982 2005-12-21  Dan Winship  <danw@novell.com>
2983
2984         * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
2985         the YYYYMMDD case.
2986
2987         * tests/date.c: add three more ISO 8601 cases, to exercise all the
2988         code paths.
2989
2990         #324671, from Emmanuele Bassi
2991         
2992 2005-11-25  Dan Winship  <danw@novell.com>
2993
2994         * README: sync to text on wiki, and point to wiki
2995
2996         * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
2997
2998 2005-11-17  Dan Winship  <danw@novell.com>
2999
3000         * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
3001         right away, to protect against this being re-entered mid-cleanup
3002         (when we unref the connection). #321208, based on a patch from
3003         Jedy Wang.
3004
3005 2005-11-16  Dan Winship  <danw@novell.com>
3006
3007         * libsoup/soup-xmlrpc-message.c
3008         (soup_xmlrpc_message_start_member): add the "name" element to the
3009         struct member. #321362, patch from Sebastian Bauer.
3010
3011 2005-11-10  Dan Winship  <danw@novell.com>
3012
3013         * configure.in: bump version to 2.2.90. This will not be
3014         officially released, but once these patches have gotten some
3015         testing they may be pulled up to the gnome-2-12 branch.
3016
3017         * libsoup/soup-connection.c:
3018         * libsoup/soup-server.c: 
3019         * libsoup/soup-session.c: 
3020         * libsoup/soup-socket.c: add an "async-context" property,
3021         which gets passed from server to socket, and session to connection
3022         to socket, allowing async usage outside the main thread. Based on
3023         patches from Armin Bauer and Jürg Billeter.
3024
3025         * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
3026         soup_add_timeout): utility routines to add watches, idles, and
3027         timeouts to non-default GMainContexts.
3028
3029         * libsoup/soup-message-io.c (io_write): set the read state
3030         appropriately after writing a "100 Continue" response
3031         (io_read): More 100-Continue stuff. I don't think this is quite
3032         right so it will probably change again later.
3033
3034 2005-11-01  Dan Winship  <danw@novell.com>
3035
3036         * docs/reference/libsoup-docs.sgml: tell it to generate an index
3037
3038         * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
3039
3040 2005-11-01  Dan Winship  <danw@novell.com>
3041
3042         * libsoup/soup-connection.c (set_current_request,
3043         clear_current_request): Cast the argument to
3044         g_object_add/remove_weak_pointer to the wrong type, to make gcc
3045         4.1 happy, because C is stupid and "void **" means "a pointer to a
3046         void *", not "a pointer to any kind of pointer".
3047
3048         * libsoup/soup-xmlrpc-response.c
3049         (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
3050         Roland Illig.
3051
3052 2005-10-27  Dan Winship  <danw@novell.com>
3053
3054         * libsoup/soup-socket.c (soup_socket_client_new_async,
3055         soup_socket_client_new_sync): unref the SoupAddress passed to
3056         soup_socket_connect to avoid a leak. Based on a patch from Wang
3057         Xin.
3058         (socket_read_watch, read_from_network, socket_write_watch,
3059         soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
3060         events when polling, since poll() will return them whether or not
3061         you asked for them, but glib will ignore them unless you did,
3062         which will result in CPU suckage if such an error occurs. #319305,
3063         patch from Jonathan Matthew.
3064
3065 2005-10-27  Dan Winship  <danw@novell.com>
3066
3067         bgo #316313 / bnc #116762, and probably also bgo #318252
3068
3069         * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
3070         after releasing it, to make sure we can't accidentally release it
3071         twice.
3072
3073         * libsoup/soup-connection.c (clear_current_request): Call
3074         soup_message_io_stop() on the cleared request.
3075
3076         * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
3077         little dance here to make sure the session can't queue another
3078         message on the connection while we're in the process of requeuing
3079         the original one.
3080
3081 2005-08-30  Tor Lillqvist  <tml@novell.com>
3082
3083         * libsoup-zip.in: Include documentation in developer zipfile.
3084
3085 2005-08-22  Dan Winship  <danw@novell.com>
3086
3087         * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
3088         g_type_class_add_private.
3089
3090         * configure.in: Bump to 2.2.6.1
3091
3092         * NEWS: update
3093
3094 2005-08-22  Dan Winship  <danw@novell.com>
3095
3096         * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
3097         soup_server_get_socket() addition.
3098
3099         * NEWS: update
3100
3101 2005-08-22  Dan Winship  <danw@novell.com>
3102
3103         * libsoup/soup-connection.c (set_current_request,
3104         clear_current_request): Fix g_object_add/remove_weak_pointer usage
3105         to prevent a crash when canceling a request. From Tambet.
3106
3107 2005-08-16  Dan Winship  <danw@novell.com>
3108
3109         Fix a connection leak reported by Tambet.
3110
3111         * libsoup/soup-connection.c (send_request): rather than tracking
3112         the message progress via signals, call
3113         soup_message_send_request_internal() and have it call
3114         soup_connection_release() when it's done.
3115         (request_restarted, request_done): gone
3116         (clear_current_request): handle disconnecting (if necessary) and
3117         updating last_used time here.
3118         (soup_connection_release): Call clear_current_request().
3119         (dispose): Call clear_current_request()
3120
3121         * libsoup/soup-message-client-io.c
3122         (soup_message_send_request_internal): New. Takes a SoupConnection
3123         in addition to the other args, and passes that on to
3124         soup-message-io.
3125
3126         * libsoup/soup-message-io.c (SoupMessageIOData): add a
3127         SoupConnection field.
3128         (io_cleanup): if io->conn is set, unref it.
3129         (soup_message_io_stop): if io->conn is set, and we ended in a
3130         clean state, call soup_connection_release() on it.
3131         (soup_message_io_client): Add a SoupConnection arg, which gets
3132         reffed and stored in io->conn.
3133
3134         * TODO: misc updates
3135
3136 2005-08-15  Dan Winship  <danw@novell.com>
3137
3138         * libsoup/soup-connection.h (soup_connection_new):
3139         * libsoup/soup-server.h (soup_server_new):
3140         * libsoup/soup-session-async.h (soup_session_async_new_with_options): 
3141         * libsoup/soup-session-sync.h (soup_session_sync_new_with_options): 
3142         * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
3143
3144         * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
3145         definition of this from glib 2.8 for use when compiling against
3146         glib 2.6.
3147
3148 2005-08-15  Tambet Ingo  <tambet@ximian.com>
3149
3150         * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
3151         errors.
3152
3153         * libsoup/soup-server.c (soup_server_get_listener): ditto.
3154
3155 2005-08-12  Dan Winship  <danw@novell.com>
3156
3157         * libsoup/soup-server.c (soup_server_get_listener): new method to
3158         get the server's listening socket.
3159
3160         * libsoup/soup-socket.c: add a new "cloexec" property, to set
3161         FD_CLOEXEC on the socket. Update everything for that.
3162
3163 2005-08-05  Dan Winship  <danw@novell.com>
3164
3165         * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
3166         Tambet.
3167         (soup_socket_connect): Make sure that get_iochannel() gets called
3168         if the connect succeeds right away, or the socket will fail on
3169         the first read or write. [#312540]
3170
3171 2005-08-01  Dan Winship  <danw@novell.com>
3172
3173         * configure.in: drop version back down to 2.2.5 and
3174         SOUP_API_VERSION back to 2.2; due to various snafus, there has
3175         never yet been an official release of the 2.4 API and the GNOME
3176         2.12 betas have been shipping with libsoup 2.2 tarballs (while
3177         jhbuild has been using 2.4, with evolution and related packages
3178         having configure hacks to build against either). As there never
3179         ended up being any API-incompatible changes in the 2.4 series, we
3180         can just merge it back into the 2.2 series and kill off 2.4.
3181
3182         * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
3183         and add new NEWS
3184
3185         * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
3186
3187         * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
3188         libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
3189         libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
3190         let us use a variable.
3191
3192 2005-08-01  Dan Winship  <danw@novell.com>
3193
3194         * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
3195         SoupMD5Context and write out the digest in hex digits.
3196
3197         * libsoup/soup-auth-digest.c (authenticate, compute_response):
3198         * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
3199         rather than duplicating the code in both places here.
3200
3201         Patch from Wim Lewis.
3202         
3203 2005-07-15  Dan Winship  <danw@novell.com>
3204
3205         * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
3206         since some servers are lame. Based on a patch from Jean-Yves
3207         Lefort. [#270688]
3208
3209         * tests/uri-parsing.c: add some more tests to make sure that
3210         things that should be %-escaped do get %-escaped
3211
3212 2005-07-06  Tor Lillqvist  <tml@novell.com>
3213
3214         * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
3215         that gmtime() is thread-safe on Windows.
3216         (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
3217
3218 2005-06-14  Dan Winship  <danw@novell.com>
3219
3220         * configure.in: check for gmtime_r
3221
3222         * libsoup/soup-date.c: date/time-manipulation functions
3223
3224         * libsoup/soup-xmlrpc-message.c: 
3225         * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
3226         Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
3227         [#300227]
3228
3229         * tests/date.c: soup-date test code
3230
3231         * tests/getbug.c: XMLRPC test code. (Should be switched to use
3232         bugzilla.gnome.org once bgo supports XMLRPC.)
3233
3234         * TODO: XMLRPC is implemented now (but shares the problem with
3235         SOAP that the API is not very good).
3236
3237 2005-06-14  Dan Winship  <danw@novell.com>
3238
3239         * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
3240         prototypes, etc
3241
3242         * docs/reference/*: update, fix, etc
3243
3244 2005-06-13  Tor Lillqvist  <tml@novell.com>
3245
3246         * configure.in: Check also for inet_ntop(). Pre-cache knowledge
3247         that we do have inet_pton() and inet_ntop() on Windows (because we
3248         implement them ourselves in soup-dns.c).
3249         
3250         * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
3251         implementations, they were completely bogus.
3252         (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
3253
3254 2005-06-08  Dan Winship  <danw@novell.com>
3255
3256         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
3257         use just the domain name for the domain, not the whole
3258         DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
3259
3260 2005-05-26  Dan Winship  <danw@novell.com>
3261
3262         * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
3263         this, since it can be called from set_property(). Possible fix for
3264         bnc #81641.
3265
3266 2005-05-05  Dan Winship  <danw@novell.com>
3267
3268         * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
3269         --type-init-func to force g_thread_init to be called. [#302674]
3270
3271 2005-04-18  Tor Lillqvist  <tml@novell.com>
3272
3273         * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
3274         Automake conditional OS_WIN32. Pre-cache information that we do
3275         have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
3276         wouldn't notice as they don't include the necessary headers or
3277         link with -lws2_32. Easiest to just pre-cache it.)
3278
3279         * libsoup-zip.in: New file, to build zipfile-based distribution of
3280         libsoup for Win32. 
3281
3282         * Makefile.am (EXTRA_DIST)
3283         * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
3284
3285         * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
3286         WinSock library -lws2_32.
3287         
3288         * libsoup/soup-portability.h: New file. On Unix it includes the
3289         traditional BSD socket etc headers. On Win32 it includes
3290         winsock2.h and ws2tcpip.h.
3291
3292         * libsoup/*.c
3293         * libsoup/*.h: Correspondingly, don't include the BSD socket API
3294         headers directly.
3295
3296         * libsoup/soup-address.h
3297         * libsoup/soup-dns.h: Include soup-portability.h
3298
3299         * libsoup/soup-address.c (soup_address_class_init): This function
3300         should get called before libsoup uses the WinSock API, so this is
3301         a good place to call WSAStartup().
3302         
3303         * libsoup/soup-auth-digest.c (get_protection_space): Use
3304         g_strsplit() instead of the relatively unportable strtok_r().
3305
3306         * libsoup/soun-dns.c: Remove unused headers. Implement
3307         inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
3308         and WSAAddressToString().
3309
3310         * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
3311         SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
3312         Portability macros.
3313         (soup_socket_class_init): Call soup_address_get_type() to make
3314         sure WSAStartup() gets called (through soup_address_class_init()).
3315         (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
3316         (soup_socket_write): Conditionalize SIGPIPE use.
3317         
3318         * tests/get.c: mkdir() is different in Microsoft's C library.
3319
3320         * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
3321         some clash with winsock2.h (which includes windows.h). The Win32
3322         headers pollute the namespace wildly.
3323
3324 2005-04-15  Dan Winship  <danw@novell.com>
3325
3326         * libsoup/soup-dns.c (resolve_name): make this work with
3327         pre-EAI_OVERFLOW glibc [#300620]
3328
3329 2005-04-12  Dan Winship  <danw@novell.com>
3330
3331         * configure.in: Remove the various gethostbyname_r checks and just
3332         check for getnameinfo/getaddrinfo.
3333
3334         * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
3335         forking. Change the API around a bunch in the process.
3336
3337         * libsoup/soup-address.c: Update for soup-dns changes
3338
3339         * tests/dns.c: take multiple hostnames on the command line and
3340         resolve them all at once (patch from tml)
3341
3342 2005-04-11  Dan Winship  <danw@novell.com>
3343
3344         * configure.in: require glib-2.0 >= 2.4.0
3345
3346         * libsoup/*.c: use G_DEFINE_TYPE and
3347         g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
3348
3349         * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
3350         SOUP_MAKE_TYPE_WITH_IFACE
3351
3352         * tests/revserver.c: use GThread. (patch from tml)
3353
3354 2005-04-11  Dan Winship  <danw@novell.com>
3355
3356         * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
3357         2.4
3358
3359         * libsoup.pc.in: rename from libsoup-2.2.pc.in
3360
3361         * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
3362         install the .pc file by hand, renaming it to include the
3363         SOUP_API_VERSION
3364
3365         * libsoup/Makefile.am: s/2.2/2.4/
3366
3367 2005-03-09  Dan Winship  <danw@novell.com>
3368
3369         * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
3370         if gnutls returns 0. [#73352]
3371         (verify_certificate): put an #ifdef around
3372         GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
3373
3374 2005-01-08  Not Zed  <NotZed@Ximian.com>
3375
3376         ** See ximian bug #70323.
3377
3378         * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
3379         types with guint32, as the code needs 32 bit longs.
3380
3381 2004-10-20  Dan Winship  <danw@novell.com>
3382
3383         * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
3384         commit, which somehow did not actually get committed then.
3385
3386         * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
3387         indicating whether or not the connection is connected.
3388         (tunnel_connect_finished): If successful, set connected. If the
3389         server returns a 3xx response, translate it to 407 (under the
3390         assumption that it's trying to redirect us to an HTML login page,
3391         as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
3392         soup_socket_start_ssl().
3393         (socket_connect_result, soup_connection_connect_sync): If
3394         successful, set connected
3395         (soup_connection_disconnect): Don't emit "disconnected" if we
3396         aren't yet connected, or the message that was waiting for this
3397         connection may get stranded in the queue. (also part of 68531)
3398
3399         * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
3400         SSL and lets the caller pass the expected hostname. Fixes a
3401         problem where SSL certification validation would always fail if
3402         you used a proxy, because it was comparing the cert against the
3403         proxy's hostname. (68583)
3404
3405 2004-10-06  Dan Winship  <danw@novell.com>
3406
3407         * libsoup/soup-ssl.h (SoupSocketError): add
3408         SOUP_SSL_ERROR_CERTIFICATE.
3409
3410         * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
3411         verify_certificate.
3412         (verify_certificate): Set the GError appropriately rather than
3413         spewing g_warnings.
3414
3415         * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
3416         the GIOChannel operation returns an error, store it as GOBject
3417         data on the socket (as a hack so soup-message-io.c can access it
3418         without us needing to change SoupSocket's API).
3419
3420         * libsoup/soup-message-io.c (io_error): peek at the socket's
3421         "last_error" datum and set the message's status to SSL_FAILED
3422         (with the GError's message string) rather than IO_ERROR, if
3423         appropriate. For 64414.
3424
3425 2004-09-30  Dan Winship  <danw@novell.com>
3426
3427         * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
3428         extra initialization needed for libgcrypt 1.2 or higher. Fixes
3429         66342.
3430         (soup_ssl_get_client_credentials,
3431         soup_ssl_get_server_credentials): Call soup_gnutls_init().
3432
3433 2004-08-26  Dan Winship  <danw@novell.com>
3434
3435         * configure.in: Bump version to 2.2.0.
3436
3437         * AUTHORS: Update this to reflect the last 2 years.
3438
3439         * NEWS: Brief summary of 1.99.x -> 2.2 changes
3440
3441         * README, TODO: Updates
3442
3443 2004-08-26  Dan Winship  <danw@novell.com>
3444
3445         * libsoup/*: add/fix lots of gtk-doc comments
3446         
3447         * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
3448         Fix bug noticed while documenting. (We were using the
3449         locale-case-insensitive functions rather than the g_ascii_ ones.)
3450
3451         * libsoup/soup-message.h (SoupMessageFlags): remove the (never
3452         implemented) NO_PIPELINE and NO_COOKIE flags.
3453
3454         * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
3455         There are still problems here with gtk-doc not recognizing many of
3456         the objects in libsoup...
3457
3458 2004-08-13  JP Rosevear  <jpr@novell.com>
3459
3460         * configure.in: bump version, libtool number
3461
3462 2004-08-09  Dan Winship  <danw@novell.com>
3463
3464         * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
3465         use conn after emitting the "connect_result" signal, since it
3466         might be destroyed by that. Based on a patch from hpj.
3467
3468 2004-08-02  Dan Winship  <danw@novell.com>
3469
3470         * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
3471
3472         * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
3473         set, don't re-encode the URL parts. Based on a patch by
3474         Alfred.Peng@Sun.COM.
3475
3476 2004-07-19  JP Rosevear  <jpr@novell.com>
3477
3478         * configure.in: bump version, libtool number
3479
3480 2004-07-15  Dan Winship  <danw@novell.com>
3481
3482         * libsoup/soup-session-sync.c (send_message): Simplify this. If
3483         the message comes back from soup_connection_send_request not
3484         FINISHED, get a new connection rather than reusing the old one.
3485         This fixes a race condition in which a connection could end up
3486         double-booked, and fixes the handling of messages that get
3487         redirected to another server.
3488
3489 2004-07-13  Dan Winship  <danw@novell.com>
3490
3491         * libsoup/soup-session.c (connect_result): If the connection
3492         attempt succeeded, reserve the connection before releasing
3493         host_lock. Otherwise, another thread might find it in the
3494         connection pool before the caller can queue a message on it.
3495         #60693
3496
3497         * libsoup/soup-session-async.c (got_connection): Call
3498         soup_connection_release(), since we don't have a specific message
3499         in mind for the connection, so we need it to be considered idle.
3500
3501         * libsoup/soup-connection.c (soup_connection_release): New
3502         function, to undo a soup_connection_reserve().
3503         (soup_connection_send_request, soup_connection_reserve,
3504         soup_connection_authenticate, soup_connection_reauthenticate):
3505         Document these
3506
3507 2004-07-12  Dan Winship  <danw@novell.com>
3508
3509         * libsoup/soup-session-sync.c (send_message): signal the
3510         "connections available" condition after the message finishes. Duh.
3511
3512         * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
3513
3514 2004-07-08  Dan Winship  <danw@novell.com>
3515
3516         * libsoup/soup-soap-response.c: Revert previous change for now; it
3517         breaks the build on distros with older libxmls.
3518
3519 2004-07-08  Dan Winship  <danw@novell.com>
3520
3521         * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
3522         gateway
3523
3524 2004-07-07  Fernando Herrera  <fherrera@onirica.com>
3525
3526         * libsoup/soup-soap-response.c: (finalize), (init),
3527         (soup_soap_response_from_string): Use a parse context for the
3528         xml document, so we can safely use the option to ignore
3529         blank spaces and '\n'.
3530
3531 2004-07-06  Dan Winship  <danw@novell.com>
3532
3533         * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
3534         http or https, require a hostname. For #61049
3535
3536         * tests/uri-parsing.c (rel_tests, do_uri): Update for that
3537
3538 2004-06-03  JP Rosevear <jpr@novell.com>
3539
3540         * configure.in: bump version to 2.1.11, libtool number
3541
3542 2004-06-01  Dan Winship  <danw@novell.com>
3543
3544         * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
3545         macros to not use ?: expressions as lvalues, since that's
3546         apparently a GNU extension.
3547         (soup_address_resolve_async): Use a timeout rather than an idle
3548         handler to poll the dns result. (soup-dns really should be
3549         rewritten to not require polling, but this is easier for now.)
3550         #59240
3551
3552         * libsoup/soup-server.c (call_handler): Don't use GNU-only
3553         non-constant structure initialization
3554
3555         * tests/dns.c: Simple test of the dns code
3556
3557         * tests/Makefile.am (noinst_PROGRAMS): build it
3558
3559 2004-05-19  JP Rosevear  <jpr@novell.com>
3560
3561         * configure.in (SOUP_API_VERSION): bump version, libtool numbers
3562
3563 2004-05-18  Dan Winship  <danw@novell.com>
3564
3565         * libsoup/soup-ssl.h:
3566         * libsoup/soup-nossl.c: define some GError codes and stuff
3567
3568         * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
3569         (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
3570         to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
3571         appropriately.
3572
3573         * libsoup/soup-socket.c (soup_socket_write): Handle
3574         SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
3575         G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
3576         (#58434)
3577         (read_from_network): Handle the reverse case (which would cause
3578         hanging rather than spinning, and might be the cause of some
3579         connector 1.5 slowness?)
3580
3581 2004-05-11  Dan Winship  <danw@novell.com>
3582
3583         * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
3584         kludgefully, using the magic of GClosure, to fix x86_64 problems
3585         reported by snorp.
3586
3587 2004-05-04  Sivaiah Nallagatla <snallagatla@novell.com>
3588
3589         * libsoup/soup-soap-message.c (finalize) : free
3590         the elements of priv structure before freeing priv
3591
3592 2004-04-20  Dan Winship  <danw@ximian.com>
3593
3594         * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
3595         re-sending the message, call soup_message_restarted()
3596         (send_request): Connect to "restarted" signal, and remove the 401
3597         handlers from there; doing it here didn't work because if the
3598         connection was closed, the message would be re-sent on a new
3599         connection, but would still have the handlers from the old
3600         connection attached to it, which would make authentication fail.
3601
3602         * libsoup/soup-message-handlers.c (soup_message_run_handlers):
3603         Copy the handler list before starting, to protect against handlers
3604         that modify the handler list.
3605
3606 2004-04-15  Dan Winship  <danw@ximian.com>
3607
3608         * libsoup/soup-connection.c (soup_connection_connect_sync):
3609         Connect to the socket's "disconnect" signal. (We were only doing
3610         this from the async version before, which meant that synchronous
3611         SoupConnections could outlive their sockets and start causing
3612         errors.) #57004
3613
3614         * libsoup/soup-connection-ntlm.c (send_request): Remove the old
3615         Authorization header before adding a new one.
3616
3617 2004-04-02  JP Rosevear  <jpr@ximian.com>
3618
3619         * configure.in: bump version, libtool number
3620
3621 2004-03-15  Dan Winship  <danw@ximian.com>
3622
3623         * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
3624         types to kill a warning with -Wall -O2
3625
3626 2004-03-05  JP Rosevear <jpr@ximian.com>
3627
3628         * configure.in: bump version, libtool number
3629
3630 2004-03-02  Dan Winship  <danw@ximian.com>
3631
3632         * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
3633         bytes_read is -1, since the value of errno is irrelevant when
3634         bytes_read is 0. Probably #54960.
3635
3636 2004-03-01  Rodrigo Moya <rodrigo@ximian.com>
3637
3638         * libsoup/soup-soap-response.h: removed not-implemented function's
3639         prototype.
3640
3641 2004-02-27  Rodney Dawes  <dobey@ximian.com>
3642
3643         * configure.in:
3644         * libsoup/Makefile.am: Use a different variable for linking to the
3645         static version of gnutls, so we don't pull the .a files into the .pc
3646
3647         Fixes #53346
3648
3649 2004-02-20  Dan Winship  <danw@ximian.com>
3650
3651         * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
3652         write_data): Pass gsize *, not guint *, to soup_socket_read/write,
3653         to make this work on 64-bit platforms. (Grr. C type checking
3654         sucks.) #54631
3655         
3656         * tests/revserver.c: Likewise
3657
3658 2004-02-18  Rodrigo Moya <rodrigo@ximian.com>
3659
3660         Fixes #54512
3661
3662         * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
3663         don't leak the value returned from xmlNodeGetContent().
3664         (soup_soap_parameter_get_string_value,
3665         soup_soap_parameter_get_property): return a g_strdup'ed
3666         string, not the value returned by xmlNodeGetContent, so that
3667         callers can use g_free, and not xmlFree.
3668
3669         * libsoup/soup-soap-response.h: made soup_parameter_get_property
3670         not return const.
3671
3672 2004-02-17  Dan Winship  <danw@ximian.com>
3673
3674         * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
3675         typo. #54433, from Mariano Suarez-Alvarez.
3676
3677         * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
3678         Likewise
3679
3680 2004-02-17  Rodney Dawes  <dobey@ximian.com>
3681
3682         * libsoup/soup-message.c (soup_message_new): HTTP connections require
3683         a hostname, and we also hash on the host for message queueing in the
3684         session, if the host is NULL we free the SoupUri and return NULL
3685
3686 2004-02-14  Dan Winship  <danw@ximian.com>
3687
3688         * configure.in: Use POSIX-compliant "test $foo = bar", rather than
3689         GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
3690
3691 2004-02-12  Joe Shaw  <joe@ximian.com>
3692
3693         * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
3694         loop to prevent DNS errors from short reads.
3695
3696 2004-02-11  Joe Shaw  <joe@ximian.com>
3697
3698         * configure.in: Bumped version number to 2.1.7 and libtool
3699         current. 
3700
3701 2004-02-11  Dan Winship  <danw@ximian.com>
3702
3703         * libsoup/soup-connection.c (soup_connection_disconnect): Update
3704         Joe's comment here with a gory explanation of exactly what's going
3705         on. (It's not just an SSL bug either, it affects all connections.)
3706
3707 2004-02-10  Joe Shaw  <joe@ximian.com>
3708
3709         * libsoup/soup-connection.c (soup_connection_disconnect): Add a
3710         workaround for SSL connections which time-out but don't close the
3711         socket until we try sending data again later.
3712
3713         * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
3714         Don't free the sockaddr from soup_address_get_sockaddr(); we don't
3715         own it, the SoupAddress does.
3716
3717 2004-02-09  JP Rosevear  <jpr@ximian.com>
3718
3719         * configure.in: Bump libtool numbers
3720
3721 2004-02-05  Dan Winship  <danw@ximian.com>
3722
3723         * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
3724         when adding it.
3725         (soup_session_remove_filter): And unref it here (we were already
3726         unreffing it in dispose().)
3727
3728 2004-02-05  Joe Shaw  <joe@ximian.com>
3729
3730         * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
3731         hostent if it's NULL.
3732         (soup_dns_entry_check_lookup): If the entry is resolved, but the
3733         hostent is NULL, uncache it.
3734
3735 2004-02-04  Dan Winship  <danw@ximian.com>
3736
3737         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
3738         remove the WWW-Authenticate headers before returning, so the
3739         session won't fall back to Basic auth. Also, leave the connection
3740         in the "authenticating" state rather than setting it to
3741         "authenticated".
3742         (ntlm_authorize_post): Only requeue the message if it's in the
3743         "authenticating" state (and set it to "authenticated"). Fixes an
3744         "unepectedly disconnected" error if authentication fails.
3745
3746 2004-02-03  Dan Winship  <danw@ximian.com>
3747
3748         * libsoup/soup-message-io.c (io_cleanup): Call
3749         soup_message_io_stop so we don't get a callback on the io after
3750         it's been cleaned up.
3751
3752         * libsoup/soup-session.c (add_auth): Only remove the Authorization
3753         header if we have another one to add. (Otherwise it messes up
3754         SoupConnectionNTLM.)
3755
3756         * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
3757         memcpy here, since the source and destination will overlap if
3758         *nread is small and read_buf->len is large. (Noticed by valgrind,
3759         #53625.)
3760
3761 2004-02-02  Joe Shaw  <joe@ximian.com>
3762
3763         * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
3764         with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
3765         GNUTLS_E_INTERRUPTED.  GNUTLS_E_AGAIN will be returned by recv()
3766         when there are no messages on the wire on a non-blocking socket.
3767         This sends a SSL hangup message and then allows us to immediately
3768         close the socket.
3769
3770 2004-01-30  Rodrigo Moya <rodrigo@ximian.com>
3771
3772         * configure.in: bumped version number to 2.1.6.
3773
3774 2004-01-29  Rodrigo Moya <rodrigo@ximian.com>
3775
3776         * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
3777         new function.
3778
3779 2004-01-29  Rodrigo Moya <rodrigo@ximian.com>
3780
3781         * libsoup/soup-soap-response.[ch]
3782         (soup_soap_parameter_get_string_value): removed 'const' from return
3783         type.
3784
3785 2004-01-29  Joe Shaw  <joe@ximian.com>
3786
3787         * libsoup/soup-gnutls.c (verify_certificate): Initialize the
3788         certificate before we try to use it.  Ahem.
3789
3790 2004-01-23  Joe Shaw  <joe@ximian.com>
3791
3792         * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
3793
3794 2004-01-21  Joe Shaw  <joe@ximian.com>
3795
3796         * configure.in: Require at least GnuTLS 1.0.0.
3797
3798         * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
3799         functions.
3800         (verify_certificate): Use gnutls_x509_crt_import() and
3801         gnutls_x509_crt_check_hostname() instead of
3802         gnutls_x509_check_certificates_hostname().
3803         (init_dh_params): Use gnutls_dh_params_generate2() instead of
3804         gnutls_dh_params_generate() and gnutls_dh_params_set().
3805
3806 2004-01-20  Joe Shaw  <joe@ximian.com>
3807
3808         * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
3809         close the socket itself, so we need to do it or else our
3810         connections stay in CLOSE_WAIT forever.
3811
3812 2004-01-16  Jason Leach  <leach@wam.umd.edu>
3813
3814         * libsoup/Makefile.am: builddir != srcdir fixes.
3815
3816 2004-01-14  Joe Shaw  <joe@ximian.com>
3817
3818         * libsoup/soup-gnutls.c (verify_certificate): Remove the
3819         check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
3820
3821 2004-01-12  JP Rosevear  <jpr@ximian.com>
3822
3823         * configure.in: bump version and libtool revision
3824
3825 2004-01-12  Dan Winship  <danw@ximian.com>
3826
3827         * tests/simple-httpd.c (main): Add a g_thread_init() so this works
3828         again.
3829
3830 2004-01-10  Larry Ewing  <lewing@ximian.com>
3831
3832         * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
3833         string.
3834
3835 2004-01-09  Joe Shaw  <joe@ximian.com>
3836
3837         * acinclude.m4: Include the libgnutls.m4 file.
3838
3839         * configure.in: Remove manual checking for libgnutls-config and
3840         use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
3841         version, which is 0.9.7 for now.
3842
3843         * libsoup/Makefile.am: Some changes for the above change.
3844
3845         * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
3846         HAVE_GNUTLS_GNUTLS_H.
3847         (verify_certificate): Uncomment the SSL certificate hostname
3848         check.
3849
3850         * libsoup/soup-session.c (set_property): Be smart about flushing
3851         our SSL credentials only when the CA file is set to something
3852         different than it was before.
3853
3854 2004-01-09  Harish K <kharish@novell.com>
3855         * libsoup/soup-soap-response.c (soup_soap_response_from_string): 
3856         added code to ignore Header element, if present, while creating 
3857         response objects.  
3858         
3859 2004-01-05  Dan Winship  <danw@ximian.com>
3860
3861         * configure.in: Remove no-longer-relevant socklen_t check
3862
3863         * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
3864         Marcus Clarke, #52566)
3865
3866         * libsoup/soup-dns.c: Likewise
3867
3868 2003-12-29  JP Rosevear <jpr@ximian.com>
3869
3870         * configure.in: bump version and libtool numbers
3871
3872 2003-12-22  Dan Winship  <danw@ximian.com>
3873
3874         * README, TODO: Update these
3875
3876 2003-12-22  Dan Winship  <danw@ximian.com>
3877
3878         * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
3879         you can disconnect a socket from one thread while doing I/O in
3880         another.
3881
3882         * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
3883         soup_message_io_stop() and io_cleanup(), to separate out the "stop
3884         reading/writing" and "free data" phases to allow thread-safe
3885         synchronous cancellation.
3886         (soup_message_io_finished): call both soup_message_io_stop() and
3887         io_cleanup()
3888         (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
3889         doesn't already have a transport error status (eg, CANCELLED).
3890         (new_iostate): Call io_cleanup() if needed.
3891
3892         * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
3893         clearer that it's not a status.
3894
3895         * libsoup/soup-message.c (finalize, restarted, finished,
3896         soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
3897         (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
3898
3899         * libsoup/soup-connection.c (send_request): Remove
3900         soup_message_io_cancel call.
3901
3902         * libsoup/soup-session-sync.c (send_message): Connect to the
3903         connection's "disconnected" signal rather than using a weak ref,
3904         since that's what we really care about, and it's possible that the
3905         connection may have an extra ref on it somewhere that would keep
3906         it from being destroyed even if it was disconnected.
3907
3908 2003-12-20  Joe Shaw  <joe@ximian.com>
3909
3910         * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
3911         the non-proxy case, then use the root ("/").
3912
3913 2003-12-19  Dan Winship  <danw@ximian.com>
3914
3915         * libsoup/soup-message-filter.c: New. An interface for objects
3916         that want to act on every message passing through a session.
3917         (Initially being used for authentication, but could also be used
3918         for cache handling, cookie management, etc.)
3919
3920         * libsoup/soup-connection.c (class_init, etc): Add a message
3921         filter property.
3922         (send_request): If the connection has a message filter set, run
3923         it on the message before sending it.
3924         (soup_connection_connect_async, etc): When setting up a tunnel, if
3925         we get back a 407 and the session tries to requeue the message,
3926         either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
3927         whether or not the proxy closed the connection).
3928         (soup_connection_connect_sync): Likewise
3929         (send_request, request_done): Ref/unref the connection
3930
3931         * libsoup/soup-session.c (soup_session_get_type): Implement the
3932         SoupMessageFilter interface.
3933         (soup_session_get_connection): Use the session as the connection's
3934         message filter
3935         (soup_session_add_filter, soup_session_remove_filter): Add/remove
3936         filters from the session
3937         (setup_message): do auth handling, and call each of the session's
3938         filters' setup_message methods as well.
3939         (soup_session_send_message_via): No longer needed.
3940         (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
3941
3942         * libsoup/soup-session-async.c (run_queue): Use
3943         soup_connection_send_request, since soup_session_send_message_via
3944         is gone now.
3945
3946         * libsoup/soup-session-sync.c (send_message): Likewise
3947
3948         * libsoup/soup-message.c (soup_message_is_keepalive): A successful
3949         response to a CONNECT is always keepalive, even if it's HTTP/1.0
3950         with no Connection header.
3951
3952         * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
3953
3954         * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
3955         gobject interface types.
3956
3957         * tests/get.c (main): Add a -p flag to specify a proxy
3958
3959         * tests/simple-proxy.c: Fix #includes
3960
3961 2003-12-18  Dan Winship  <danw@ximian.com>
3962
3963         * libsoup/soup-connection.c (soup_connection_disconnect): Actually
3964         disconnect the socket rather than just unreffing it, since the IO
3965         code may be holding an extra ref on it.
3966         (send_request): connect to the "restarted" signal too
3967         (request_restarted): Deal with "Connection: close"
3968
3969         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
3970         not go into an infinite loop if the server only supports Basic.
3971
3972 2003-12-17  Rodrigo Moya <rodrigo@ximian.com>
3973
3974         * libsoup/Makefile.am: install soup-message-queue.h with the rest
3975         of the headers.
3976
3977 2003-12-17  Dan Winship  <danw@ximian.com>
3978
3979         * configure.in: Add gthread to glib check
3980
3981         * libsoup/soup-session.c: Make this an abstract class.
3982
3983         * libsoup/soup-session-async.c: A SoupSession class for
3984         asynchronous gmain-based operation; replaces the old SoupSession.
3985
3986         * libsoup/soup-session-sync.c: A SoupSession class for synchronous
3987         blocking operation for use with threaded apps.
3988
3989         * libsoup/soup-types.h, libsoup/soup.h: add the new session
3990         subclasses
3991
3992         * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
3993         try to unref the socket if the socket creation fails.
3994         (soup_connection_reserve): New, to explicitly mark a connection as
3995         being in use without queueing a message on it.
3996
3997         * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
3998         "block" flag to not be reversed.
3999
4000         * libsoup/soup-message.c (finished): set status to FINISHED here.
4001         (soup_message_cancel): Gone; needs to be done at the session
4002         level.
4003
4004         * libsoup/soup-message-queue.c: Add a mutex and make all of the
4005         operations thread-safe.
4006
4007         * libsoup/soup-socket.c (disconnect_internal): Make this
4008         thread-safe.
4009         (soup_socket_connect): Make the sync case work correctly.
4010
4011         * libsoup/Makefile.am: add the SoupSession subclasses
4012
4013         * tests/Makefile.am: libsoup depends on libgthread now, so
4014         revserver doesn't need to explicitly.
4015
4016         * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
4017         soup_session_async_new().
4018
4019 2003-12-16  Rodrigo Moya <rodrigo@ximian.com>
4020
4021         * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
4022         new function.
4023
4024 2003-12-16  Joe Shaw  <joe@ximian.com>
4025
4026         * libsoup/soup-connection.c (socket_connect_result,
4027         soup_connection_connect_sync): Only set up a tunnel if the
4028         destination protocol is HTTPS.
4029
4030         * libsoup/soup-message.c (class_init): Add a default handler for
4031         wrote_body.
4032         (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
4033         (soup_message_cancel): Don't set the status to
4034         SOUP_STATUS_CANCELLED and call soup_message_finished() if the
4035         status is already SOUP_MESSAGE_STATUS_FINISHED.
4036
4037         * libsoup/soup-session.c (set_property): Don't cancel the session
4038         if the proxy URI set as a property isn't different from the old
4039         one.
4040         (get_host_for_message): Refactor some code so that we can easily
4041         get the right SoupSessionHost for proxies as well as from the
4042         message.
4043         (authenticate_auth): Take a gboolean proxy parameter.  Check it to
4044         see which URI (message URI or proxy URI) to use for
4045         authentication.  Add a long comment about lack of clarity in RFC
4046         2617 with respect to proxies and protection spaces.
4047
4048 2003-12-15  Dan Winship  <danw@ximian.com>
4049
4050         * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
4051         soup_socket_write): s/guint/gsize/ to match the definitions in
4052         soup-socket.c. #52167.
4053
4054 2003-12-12  Rodrigo Moya <rodrigo@ximian.com>
4055
4056         * libsoup/soup-soap-message.c: removed debugging of the messages here.
4057
4058 2003-12-12  Rodrigo Moya <rodrigo@ximian.com>
4059
4060         * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
4061         added information for SOAP-ENV namespace.
4062
4063 2003-12-10  Dan Winship  <danw@ximian.com>
4064
4065         * libsoup/soup-message-client-io.c (parse_response_headers): if we
4066         receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
4067         message's http_version so the keep-alive handling is correct.
4068         Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
4069
4070         * libsoup/soup-message.c (soup_message_restarted, etc): Add a
4071         "restarted" signal as suggested by Joe.
4072
4073         * libsoup/soup-message-io.c (soup_message_io_finished): emit
4074         either "restarted" or "finished" as appropriate
4075
4076         * libsoup/soup-session.c (soup_session_queue_message): Connect to
4077         "restarted" and run the queue if a message gets restarted
4078
4079         * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
4080         like.
4081
4082 2003-12-10  Tambet Ingo  <tambet@ximian.com>
4083
4084         * configure.in: Use autoconfig to check for socklen_t ...
4085
4086         * libsoup/soup-address.c: ... and remove it from here ...
4087
4088         * libsoup/soup-dns.c: ... and here.
4089
4090 2003-12-09  Rodrigo Moya <rodrigo@ximian.com>
4091
4092         * libsoup/soup-soap-message.c (soup_soap_message_persist):
4093         (soup_soap_message_parse_response): print out request/response's
4094         contents, if in debug mode.
4095
4096 2003-12-07  JP Rosevear  <jpr@ximian.com>
4097
4098         * configure.in: Bump version
4099
4100 2003-11-28  Rodrigo Moya <rodrigo@ximian.com>
4101
4102         * libsoup/soup-soap-response.[ch]
4103         (soup_soap_parameter_get_first_child,
4104         soup_soap_parameter_get_first_child_by_name,
4105         soup_soap_parameter_get_next_child,
4106         soup_soap_parameter_get_next_child_by_name): new functions to
4107         manage SoupSoapParameter's children.
4108         (soup_soap_response_get_first_parameter): dont return a GList, but
4109         a SoupSoapParameter contained in the GList.
4110
4111 2003-11-26  Rodrigo Moya <rodrigo@ximian.com>
4112
4113         * libsoup/soup-soap-response.[ch]
4114         (soup_soap_parameter_get_string_value): new function.
4115
4116 2003-11-26  Rodrigo Moya <rodrigo@ximian.com>
4117
4118         * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
4119         structure, to "hide" the usage of xmlNode's.
4120         (soup_soap_parameter_get_name): functions to manage SOAP
4121         response parameters.
4122         (soup_soap_response_get_first_parameter,
4123         soup_soap_response_get_first_parameter_by_name,
4124         soup_soap_response_get_next_parameter,
4125         soup_soap_response_get_next_parameter_by_name):
4126         new functions for an easy access to the response's parameters.
4127         (soup_soap_response_from_string): removed warnings.
4128
4129 2003-11-25  Rodrigo Moya <rodrigo@ximian.com>
4130
4131         * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
4132         fixed typo.
4133
4134 2003-11-25  Rodrigo Moya <rodrigo@ximian.com>
4135
4136         * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
4137         soup_soap_response_set_method_name, soup_soap_message_get_parameters):
4138         new functions.
4139         (finalize): NULL out new private fields.
4140         (soup_soap_response_from_string): added validation code.
4141
4142 2003-11-23  Rodrigo Moya <rodrigo@ximian.com>
4143
4144         * libsoup/soup-soap-response.[ch]: new class for managing SOAP
4145         responses.
4146
4147         * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
4148         new function.
4149
4150         * libsoup/Makefile.am: added new files.
4151
4152 2003-11-18  Rodney Dawes  <dobey@ximian.com>
4153
4154         * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
4155
4156 2003-11-18  Rodney Dawes  <dobey@ximian.com>
4157
4158         * acinclude.m4: Add GTK_DOC_CHECK
4159
4160 2003-11-18  Dan Winship  <danw@ximian.com>
4161
4162         * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
4163         (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
4164
4165         * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
4166
4167         * Makefile.am: updates for gtk-doc
4168         (SUBDIRS): add back "docs"
4169
4170         * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
4171         aren't around any more
4172
4173         * docs/reference/*: set up gtk-doc
4174
4175         * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
4176         "libsoup". Remove unused defines.
4177
4178         * libsoup/soup-connection.c: Fix doc comments
4179         * libsoup/soup-message.c: Likewise
4180         * libsoup/soup-misc.c: Likewise
4181         * libsoup/soup-socket.c: Likewise
4182         * libsoup/soup-uri.c: Likewise
4183
4184         * libsoup/soup-address.h: Fixes to please gtk-doc
4185         * libsoup/soup-connection.h: Likewise
4186         * libsoup/soup-message.h: Likewise
4187         * libsoup/soup-message-private.h: Likewise
4188         * libsoup/soup-misc.h: Likewise
4189         * libsoup/soup-server-auth.h: Likewise
4190         * libsoup/soup-socket.h: Likewise
4191         * libsoup/soup-status.h: Likewise
4192
4193 2003-11-18  Dan Winship  <danw@ximian.com>
4194
4195         * configure.in: Fix up the SSL checks some. Remove some useless
4196         old header checks.
4197
4198         * libsoup/soup-misc.h: declare soup_ssl_supported.
4199
4200         * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
4201
4202         * libsoup/soup-nossl.c: Not an SSL implementation, built if
4203         HAVE_SSL is not defined.
4204
4205         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
4206
4207         * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
4208         failure.
4209         (listen_watch): Deal with soup_socket_start_ssl failing.
4210
4211         * libsoup/soup-connection.c (tunnel_connect_finished,
4212         socket_connect_result, soup_connection_connect_sync): Deal with
4213         the soup_socket_start_ssl failing.
4214
4215         * libsoup/soup-server.c (soup_server_new): Deal with
4216         soup_ssl_get_server_credentials failing
4217
4218 2003-11-18  Rodrigo Moya <rodrigo@ximian.com>
4219
4220         * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
4221         soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
4222         soup_soap_message_end_fault_detail, soup_soap_message_start_header,
4223         soup_soap_message_end_header,
4224         soup_soap_message_start_header_element,
4225         soup_soap_message_end_header_element, soup_soap_message_write_int,
4226         soup_soap_message_write_double, soup_soap_message_write_base64,
4227         soup_soap_message_write_time, soup_soap_message_write_string,
4228         soup_soap_message_write_buffer, soup_soap_message_set_element_type,
4229         soup_soap_message_set_null, soup_soap_message_add_attribute,
4230         soup_soap_message_add_namespace,
4231         soup_soap_message_set_default_namespace,
4232         soup_soap_message_get_namespace_prefix,
4233         soup_soap_message_set_encoding_style, soup_soap_message_reset,
4234         soup_soap_message_persist): new functions from old SoupSerializer.
4235
4236 2003-11-17  Rodrigo Moya <rodrigo@ximian.com>
4237
4238         * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
4239         soup_soap_message_new_from_uri): added a bunch of initialization
4240         parameters.
4241         (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
4242         soup_soap_message_end_envelope, soup_soap_message_start_body,
4243         soup_soap_message_end_body, soup_soap_message_start_element,
4244         soup_soap_message_end_element):
4245         new functions.
4246
4247         * configure.in: depend on libxml-2.0 for the SOAP code.
4248
4249         * libsoup/Makefile.am: use XML CFLAGS and LIBS.
4250
4251 2003-11-17  Joe Shaw  <joe@ximian.com>
4252
4253         * configure.in: Add in the --enable-libgpg-error flag from the 2.0
4254         branch.
4255
4256         * acinclude.m4: Include the gpg-error macros.
4257
4258 2003-11-17  Rodrigo Moya <rodrigo@ximian.com>
4259
4260         * libsoup/soup-soap-message.[ch]: new class to make it easier to
4261         build SOAP messages.
4262
4263         * libsoup/Makefile.am: added new files.
4264
4265         * configure.in: increased version number.
4266
4267 2003-10-24  Joe Shaw  <joe@ximian.com>
4268
4269         * libsoup/soup-address.c (update_address_from_entry): Call
4270         soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
4271         one in addr->priv->lookup.  Fixes a crash on synchronous DNS
4272         lookups.
4273
4274         * libsoup/soup-server.c (soup_server_new): We need to ref the
4275         address we're binding to, because soup_socket_get_local_address()
4276         doesn't ref for us.
4277
4278 2003-10-23  Dan Winship  <danw@ximian.com>
4279
4280         * libsoup/soup-socket.c (init): Initialize flags to default
4281         values.
4282
4283 2003-09-23  Dan Winship  <danw@ximian.com>
4284
4285         * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
4286         note whether or not the CA file has been loaded.
4287         (SoupGNUTLSChannel): add a "hostname" field.
4288         (verify_certificate): Remove the comment about not being able to
4289         verify the hostname because of soup problems. Now it's because of
4290         GNUTLS problems instead.
4291         (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
4292         and takes a hostname and a creds argument now.
4293         (soup_ssl_get_client_credentials,
4294         soup_ssl_get_server_credentials): Return client/server credentials
4295         structures.
4296         (soup_ssl_free_client_credentials,
4297         soup_ssl_free_server_credentials): and free them.
4298
4299         * libsoup/soup-session.c (class_init, set_property, get_property):
4300         add ssl_ca_file property
4301         (get_host_for_message): when returning an SSL host for the first
4302         time, create a client credentials structure for the session.
4303         (run_queue): Pass the ssl creds to the new connection. Also fix an
4304         unrelated bug that caused infinite loops on "bad hostname".
4305
4306         * libsoup/soup-server.c: Use GObject properties, including
4307         ssl_cert_file and ssl_key_file properties.
4308         (soup_server_new): Remove "protocol" argument; if the cert file
4309         and key file properties were set, create a server credential
4310         structure from them and pass that to soup_socket_server_new.
4311
4312         * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
4313         dest_uri to origin_uri to match RFC 2616 terminology. Add an
4314         "ssl_creds" field.
4315         (class_init, set_property, get_property): add SSL_CREDS property
4316         (soup_connection_connect_async, soup_connection_connect_sync):
4317         Pass ssl_creds to soup_socket_client_new calls.
4318
4319         * libsoup/soup-socket.c: Use GObject properties, including an
4320         ssl_creds property
4321         (soup_socket_set_flags): Gone (replaced with boolean properties)
4322         (soup_socket_new): Make this take a list of properties
4323         (listen_watch): copy ssl creds from listener to new socket
4324         (soup_socket_start_ssl): Pass remote hostname and socket creds
4325         structure to soup_ssl_wrap_iochannel.
4326         (soup_socket_client_new_async, soup_socket_client_new_sync,
4327         soup_socket_server_new): Replace the SSL boolean with an ssl_creds
4328         structure.
4329
4330         * libsoup/soup-misc.c (soup_set_ssl_ca_file,
4331         soup_set_ssl_cert_files, soup_get_ssl_ca_file,
4332         soup_get_ssl_cert_files): Gone. SSL state is now per-session or
4333         per-server.
4334
4335         * tests/get.c: add a "-c CAfile" argument, for loading a CA
4336         certificate file to validate https connections against
4337
4338         * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
4339         arguments for loading an SSL server certificate. Only start an SSL
4340         server if those arguments were used.
4341
4342         * tests/test-cert.pem: 
4343         * tests/test-key.pem: SSL certificate for testing simple-httpd
4344
4345         * tests/revserver.c: Update for API changes
4346         * tests/simple-proxy.c: Likewise
4347
4348 2003-09-22  Dan Winship  <danw@ximian.com>
4349
4350         * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
4351         from soup-private.h
4352
4353         * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
4354         (soup_set_security_policy, soup_get_security_policy): Remove,
4355         since the GNUTLS backend doesn't actually implement it.
4356         (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
4357
4358         * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
4359         stuff.
4360
4361         * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
4362         soup-private.h
4363
4364         * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
4365         soup_ssl_get_server_iochannel into a single function that takes a
4366         SoupSSLType.
4367
4368         * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
4369         (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
4370         (soup_gnutls_set_security_policy): Gone
4371
4372         * libsoup/soup-gnutls.h
4373         * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
4374         soup-gnutls.c now
4375
4376         * libsoup/soup-socket.c: Move soup_sockaddr_max
4377         #define here from soup-private.h
4378         (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
4379         prototype.
4380
4381         * libsoup/soup-private.h: Gone
4382         
4383         * libsoup/soup-address.c: Fix #includes for soup-private.h and
4384         soup-misc.h changes
4385         * libsoup/soup-auth-digest.c: Likewise
4386         * libsoup/soup-auth.c: Likewise
4387         * libsoup/soup-connection-ntlm.c: Likewise
4388         * libsoup/soup-connection.c: Likewise
4389         * libsoup/soup-dns.c: Likewise
4390         * libsoup/soup-gnutls.c: Likewise
4391         * libsoup/soup-headers.c: Likewise
4392         * libsoup/soup-message-client-io.c: Likewise
4393         * libsoup/soup-message-handlers.c: Likewise
4394         * libsoup/soup-message-io.c: Likewise
4395         * libsoup/soup-message-server-io.c: Likewise
4396         * libsoup/soup-message.c: Likewise
4397         * libsoup/soup-server-message.c: Likewise
4398         * libsoup/soup-server.c: Likewise
4399         * libsoup/soup-session.c: Likewise
4400         * libsoup/soup-socket.c: Likewise
4401         * tests/auth-test.c: Likewise
4402
4403 2003-09-19  Dan Winship  <danw@ximian.com>
4404
4405         * libsoup/soup-address.c (update_address_from_entry): free the
4406         hostent.
4407
4408         * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
4409         the domain
4410
4411         * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
4412         iochannel initialization. Not sure how this worked before...
4413
4414         * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
4415         from soup_message_prepare (and a few things removed).
4416
4417         * libsoup/soup-message-client-io.c (soup_message_send_request):
4418         s/soup_message_prepare/soup_message_cleanup_response/
4419
4420         * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
4421         with "\0" on the headers before passing them to the parse
4422         function.
4423         (io_read): Call soup_message_cleanup_response after returning an
4424         informational response so the data doesn't leak.
4425
4426         * libsoup/soup-headers.c (soup_headers_parse): Update for
4427         soup-message-io.c:io_read change
4428
4429         * libsoup/soup-server.c (soup_server_new,
4430         soup_server_new_with_host): Don't leak the SoupAddress.
4431
4432         * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
4433         CONSTRUCT_ONLY.
4434         (set_property): If the proxy uri changes, call
4435         soup_session_abort() and cleanup_hosts().
4436         (request_finished, final_finished): Fix a bug when requeuing
4437         messages.
4438
4439         * tests/libsoup.supp: valgrind suppression file for soup tests
4440
4441         * tests/Makefile.am (EXTRA_DIST): dist it.
4442         (noinst_PROGRAMS): move the former check_PROGRAMS to
4443         noinst_PROGRAMS instead.
4444
4445 2003-09-18  Dan Winship  <danw@ximian.com>
4446
4447         * libsoup/soup-message.c: Add wrote_informational and
4448         got_informational signals.
4449
4450         * libsoup/soup-message-client-io.c (get_request_headers): Set the
4451         EXPECT_CONTINUE flag on the message if that header is set.
4452
4453         * libsoup/soup-message-server-io.c (parse_request_headers):
4454         Likewise
4455
4456         * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
4457         when blocking on an expect-continue. Emit wrote_informational
4458         instead of wrote_headers in the 1xx case.
4459         (io_read): Set read_state to BLOCKING, not NOT_STARTED after
4460         reading a 100 Continue response. Emit got_informational instead of
4461         got_headers in the 1xx case.
4462
4463         * libsoup/soup-session.c (soup_session_send_message): Reorder
4464         things to deal with the fact that the message could finish right
4465         away if there is a connection available and the server is very
4466         close.
4467
4468         * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
4469         SOUP_STATUS_CLASS_TRANSPORT_ERROR.
4470
4471 2003-09-17  Dan Winship  <danw@ximian.com>
4472
4473         * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
4474         (one that pruned too little, one that pruned too much).
4475         (queue_message): When requeuing, don't run the queue;
4476         final_finished will take care of that later.
4477         (soup_session_abort): New, to cancel all pending requests.
4478
4479         * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
4480         the socket while waiting for the address to resolve
4481
4482 2003-09-17  Dan Winship  <danw@ximian.com>
4483
4484         * libsoup/soup-connection.c (soup_connection_new): Replaces the
4485         three previous soup_connection_new* functions and uses gobject
4486         properties to set the destination and proxy uris.
4487         (class_init): set up two more signals, authenticate and
4488         reauthenticate.
4489         (soup_connection_send_request): virtualize
4490         (send_request): Default implementation
4491
4492         * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
4493         also handles NTLM authentication. Includes all of the NTLM code
4494         formerly in soup-auth-ntlm.c.
4495
4496         * libsoup/soup-auth-ntlm.[ch]: Gone.
4497
4498         * libsoup/soup-auth.c: Remove NTLM refs
4499
4500         * libsoup/soup-session.c (class_init): Add gobject properties for
4501         proxy, max_conns, use_ntlm. Change the "authenticate" and
4502         "reauthenticate" signal prototypes to not pass a SoupAuth (so they
4503         can be used for authenticating SoupConnectionNTLM as well, which
4504         doesn't use a SoupAuth).
4505         (soup_session_new): Renamed from soup_session_new_default.
4506         (soup_session_new_with_options): Replaces
4507         soup_session_new_with_proxy and soup_session_new_full. Takes
4508         gobject properties.
4509         (run_queue): Create a new connection of type SoupConnection or
4510         SoupConnectionNTLM depending on our "use_ntlm" property. Connect
4511         to its authenticate and reauthenticate signals.
4512         (connection_authenticate, connection_reauthenticate): proxy these
4513         signals.
4514
4515         * libsoup/soup-address.c (update_address_from_entry): Fix a
4516         crasher when failing to resolve the address.
4517
4518         * libsoup/soup-dns.c (check_hostent): Fix some "how was this
4519         working before" bugs.
4520
4521         * libsoup/soup-message-client-io.c (soup_message_send_request):
4522         call soup_message_prepare() to clean up the existing response
4523         state.
4524
4525         * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
4526         when processing an OK EOF.
4527
4528         * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
4529         these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
4530
4531         * tests/auth-test.c (authenticate, reauthenticate): Update for new
4532         prototypes.
4533         (main): Use soup_session_new.
4534         * tests/get.c (main): Likewise.
4535         * tests/simple-proxy.c (main): Likewise.
4536
4537 2003-09-10  Dan Winship  <danw@ximian.com>
4538
4539         * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
4540         signals.
4541         (invalidate_auth): Remove the call to soup_auth_invalidate.
4542         (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
4543         contain authentication, then emit "authenticate" or
4544         "reauthenticate" (depending on whether or not this is the first
4545         time we've asked for a password for this auth).
4546         (update_auth_internal): If the server rejects our
4547         username/password, don't bail out immediately. Try doing a
4548         "reauthenticate" first.
4549
4550         * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
4551
4552         * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
4553         "pref" arg.
4554         (soup_auth_invalidate): Remove this; it doesn't actually do
4555         anything useful for us.
4556
4557         * libsoup/soup-auth-basic.c (invalidate): Remove
4558         * libsoup/soup-auth-digest.c: (invalidate): Remove
4559         * libsoup/soup-auth-ntlm.c: (invalidate): Remove
4560
4561         * libsoup/soup-uri.c: Remove all references to "authmech".
4562         (soup_uri_set_auth): Remove this too.
4563
4564         * tests/auth-test.c: Update to use the "authenticate" and
4565         "reauthenticate" signals instead of encoding usernames and
4566         passwords in the URIs. Add a few more test cases.
4567
4568 2003-09-10  Dan Winship  <danw@ximian.com>
4569
4570         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
4571         "status" field from here, since it's mostly used by SoupSession,
4572         which shouldn't need access to SoupMessagePrivate.
4573
4574         * libsoup/soup-message.h (SoupMessage): Move it here.
4575         (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
4576         (soup_message_set_uri): also moved from soup-message-private.h
4577
4578         * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
4579
4580         * libsoup/soup-message-handlers.c:
4581         s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
4582
4583         * libsoup/soup-message-io.c (soup_message_io_client,
4584         soup_message_io_server, soup_message_io_unpause): Don't set up an
4585         idle handler, just jump right in to reading/writing; if this is a
4586         synchronous socket, then the caller wants to block, and if it's
4587         not, then we'll quickly get an EAGAIN anyway.
4588
4589         * libsoup/soup-session.c: (queue_message): Likewise.
4590         (*) Update for SoupMessageStatus move and remove
4591         soup-message-private.h include.
4592
4593         * libsoup/soup-server-message.c: Remove soup-message-private.h
4594         include.
4595
4596         * libsoup/soup-server.c: Likewise.
4597
4598         * libsoup/soup-connection.c (soup_connection_is_connected,
4599         soup_connection_is_new): Remove these, since they weren't being
4600         used.
4601
4602         * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
4603         avoid namespace pollution.
4604
4605         * libsoup/soup-auth-digest.c: Update for that.
4606         * libsoup/soup-server-auth.c: Likewise
4607
4608         * tests/auth-test.c: Remove soup-message-private.h include
4609
4610 2003-09-09  Dan Winship  <danw@ximian.com>
4611
4612         Beginnings of improved synchronous API support
4613
4614         * libsoup/soup-dns.c: Simplify this by making it not automatically
4615         return the result: force the caller to poll. (This isn't really a
4616         performance issue: the results should come back quickly anyway.)
4617         Also, make the cache thread-safe.
4618         (soup_dns_entry_from_name): Was soup_gethostbyname
4619         (soup_dns_entry_from_addr): Was soup_gethostbyaddr
4620         (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
4621         (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
4622         blocks if it's not resolved yet).
4623
4624         * libsoup/soup-address.c: Update for soup-dns changes.
4625         (soup_address_new): Don't automatically start resolving the
4626         hostname now, since we don't know if the caller is going to want
4627         it resolved synchronously or asynchronously.
4628         (soup_address_resolve_async): Renamed from soup_address_resolve.
4629         (soup_address_resolve_sync): New routine to do blocking
4630         synchronous DNS.
4631
4632         * libsoup/soup-socket.c (soup_socket_connect): Now returns a
4633         status value directly when connecting synchronously.
4634         (soup_socket_client_new_async, soup_socket_client_new_sync):
4635         Separate async/sync client socket functions.
4636         (soup_socket_get_iochannel): Made static since it was not used
4637         outside soup-socket.
4638
4639         * libsoup/soup-connection.c (soup_connection_new,
4640         soup_connection_new_proxy, soup_connection_new_tunnel): Just set
4641         up the data, don't actually start connecting.
4642         (soup_connection_connect_async, soup_connection_connect_sync): New
4643         async and sync SoupConnection connecting routines.
4644         (soup_connection_get_socket): Remove this since it wasn't being
4645         used.
4646
4647         * libsoup/soup-session.c (final_finished): Run the queue since a
4648         connection is now freed up.
4649         (run_queue): Update for soup_connection_new* changes.
4650
4651         * libsoup/soup-misc.c (soup_substring_index): Remove, since it
4652         wasn't being used any more.
4653
4654         * libsoup/soup-private.h: Remove some prototypes for functions
4655         that no longer exist.
4656
4657         * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
4658         (copies the protocol, host, and port of a SoupUri).
4659
4660         * tests/auth-test.c:
4661         * tests/get.c:
4662         * tests/simple-proxy.c: belatedly update for soup-session change
4663
4664         * tests/revserver.c: Handle each new connection in its own thread,
4665         using synchronous SoupSocket calls.
4666
4667 2003-09-05  Dan Winship  <danw@ximian.com>
4668
4669         * libsoup/soup-session.c: Move a bunch of logic here from
4670         soup-context. Now the session keeps track of hosts (instead of
4671         having a global soup_hosts hash) and their connections.
4672         (soup_session_new_with_proxy, soup_session_new_full): New session
4673         constructors to specify a proxy or a proxy and connection limits
4674         (send_request): Add Authorization and Proxy-Authorization headers
4675         before sending off the request.
4676         (soup_session_queue_message, et al): Improve the way this works.
4677         There's no need to use timeouts to wait for connections to become
4678         free; we *know* when they become free.
4679
4680         * libsoup/soup-private.h: Remove SoupHost and some other
4681         no-longer-used stuff.
4682
4683         * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
4684         soup_set_connection_limit, soup_set_connection_limit): Gone. These
4685         are all per-session now.
4686
4687         * libsoup/soup-message.c: Remove all SoupContext references
4688         (mostly replaced with SoupUri references)
4689         (cleanup_message): priv->connect_tag and priv->connection are gone
4690         now, so this was just soup_message_io_cancel(). So remove
4691         cleanup_message and replace it with that everywhere.
4692         (soup_message_disconnect): Gone.
4693         (soup_message_set_uri): Replaces soup_message_set_context.
4694         (soup_message_set_connection, soup_message_get_connection): Gone
4695
4696         * libsoup/soup-message-server-io.c (parse_request_headers):
4697         s/soup_message_set_context/soup_message_set_uri/
4698
4699         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
4700         connect_tag, context, and connection.
4701
4702         * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
4703
4704         * libsoup/soup-context.c: Gone
4705
4706         * tests/auth-test.c (identify_auth): update for session/context
4707         changes
4708
4709 2003-09-03  Dan Winship  <danw@ximian.com>
4710
4711         * libsoup/soup-status.h: Renamed from soup-error.h, with types
4712         and defines renamed accordingly.
4713
4714         * libsoup/soup-message.h (SoupMessage): Rename errorcode to
4715         status_code and errorphrase to reason_phrase. Remove errorclass.
4716         (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
4717         as being either "errors" or "not errors", so its semantics are
4718         guaranteed to be wrong sometimes.
4719
4720         * libsoup/soup-message.c (soup_message_set_status,
4721         soup_message_set_status_full): Renamed
4722
4723         * libsoup/soup-message-handlers.c
4724         (soup_message_add_status_code_handler,
4725         soup_message_add_status_class_handler): Rename.
4726
4727         * libsoup/soup-session.c (soup_session_send_message): Make this
4728         return a status code rather than a status class.
4729
4730         * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
4731         unrelated unused fields (retries, callback, user_data).
4732
4733         * ...: Updates
4734
4735 2003-09-02  Dan Winship  <danw@ximian.com>
4736
4737         * libsoup/soup-session.c: First draft at the new object to
4738         maintain formerly-global state. (Not yet complete; still need to
4739         get rid of SoupContext).
4740
4741         * libsoup/soup-message-queue.c: Data structure used by SoupSession
4742
4743         * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
4744         some bits went into soup-connection.
4745
4746         * libsoup/soup-connection.c (soup_connection_send_request): New,
4747         to send a request on a connection. The connection updates its
4748         internal state and then hands off to soup_message_send_request.
4749         (request_done): Callback set up by soup_connection_send_request.
4750         Marks the connection as no-longer-in-use, and disconnects it if
4751         the message says to.
4752         (soup_connection_set_in_use, soup_connection_mark_old): No longer
4753         needed; the connection takes care of this itself now.
4754         (soup_connection_new_proxy): New, to create a new connection that
4755         is explicitly marked as being through an HTTP proxy.
4756         (soup_connection_new_tunnel): New, to create a new HTTPS
4757         connection through a proxy. (Includes the code to send the
4758         CONNECT.)
4759
4760         * libsoup/soup-context.c (try_existing_connections): Don't need to
4761         call soup_connection_set_in_use.
4762         (try_create_connection): Use soup_connection_new,
4763         soup_connection_new_proxy, or soup_connection_new_tunnel as
4764         appropriate.
4765
4766         * libsoup/soup-message.c (soup_message_prepare): Replaces
4767         queue_message.
4768         (soup_message_queue, soup_message_requeue, soup_message_prepare):
4769         Gone. This must be done via a SoupSession now.
4770         (soup_message_set_connection): don't need to mark in_use/not
4771         in_use. Also, msg->priv->socket is gone now.
4772         (soup_message_get_socket): Gone.
4773
4774         * libsoup/soup-message-handlers.c (soup_message_run_handlers):
4775         Remove references to global handlers.
4776         (redirect_handler, authorize_handler): Moved to soup-session.c.
4777
4778         * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
4779         session to shut down now.
4780
4781         * libsoup/soup.h: add soup-session.h
4782
4783         * libsoup/Makefile.am: updates
4784
4785         * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
4786         SoupSession.
4787
4788 2003-08-29  Dan Winship  <danw@ximian.com>
4789
4790         * libsoup/soup-message-io.c: Major rewrite. There is now only a
4791         single IO state object (instead of one for reading and one for
4792         writing), and the IO code handles switching back and forth between
4793         reading and writing as appropriate (including handling the extra
4794         switches needed for "Expect: 100-continue").
4795         (soup_message_io_client, soup_message_io_server): The new entry
4796         points.
4797         (soup_message_io_cancel): If the caller cancels the IO when we
4798         were expecting to read more data, disconnect the socket.
4799
4800         * libsoup/soup-message.h (SoupMessageFlags): add
4801         SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
4802         do the special expect-continue handling.
4803
4804         * libsoup/soup-message.c: Move all the signal stuff here. Remove
4805         the "done_reading" and "done_writing" signals and replace them
4806         with a single "finished" signal. (A single signal. Say that 10
4807         times fast!)
4808         (soup_message_got_headers, etc): Functions to emit signals.
4809         (got_headers, got_chunk, got_body): Default signal methods that
4810         call soup_message_run_handlers.
4811         (finished): Default signal method that replaces
4812         soup_message_issue_callback.
4813         ([various]): s/soup_message_issue_callback/soup_message_finished/
4814         (soup_message_requeue): There's no soup_message_set_read_callbacks
4815         any more, so if the caller requeues while it's still reading, just
4816         cancel the read.
4817         (soup_message_add_chunk, soup_message_add_final_chunk,
4818         soup_message_pop_chunk): Moved here from soup-server-message,
4819         although we don't actually quite support using chunked encoding
4820         for requests yet.
4821
4822         * libsoup/soup-server-message.c (soup_server_message_new): No
4823         longer takes a socket argument.
4824         (soup_server_message_add_chunk, soup_server_message_get_chunk):
4825         Moved into SoupMessage.
4826
4827         * libsoup/soup-message-handlers.c (global_handlers): Make these
4828         POST_BODY rather than PRE_BODY, so they won't mess up the IO
4829         channel when the requeue the message.
4830         (soup_message_run_handlers): Don't need to issue the message
4831         callback from here any more.
4832         (authorize_handler): Just leave the error as 401 or 407 (see
4833         soup-error.h change)
4834
4835         * libsoup/soup-message-client-io.c (soup_message_send_request):
4836         Replaces soup_message_write_request and
4837         soup_message_read_response.
4838
4839         * libsoup/soup-message-server-io.c: Parallel to
4840         soup-message-client-io.c, this defines the server-side header
4841         handling.
4842         (soup_message_read_request): Its entry point.
4843
4844         * libsoup/soup-server.c: Lots of code moved into
4845         soup-message-server-io.c. Update for other changes.
4846
4847         * libsoup/soup-queue.c: Update for changes
4848
4849         * libsoup/soup-socket.c (read_from_network, soup_socket_write):
4850         Don't call soup_socket_disconnect() on an error, just return
4851         SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
4852         signals that will mess up the caller of the read/write function.
4853
4854         * libsoup/soup-connection.c (soup_connection_disconnect): When
4855         disconnecting the socket, disconnect from its signals first to
4856         prevent bad reentrancy.
4857
4858         * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
4859         SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
4860         anything that SOUP_ERROR_UNATHORIZED and
4861         SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
4862         "transport" errors actually are transport-related.)
4863
4864         * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
4865
4866         * tests/simple-proxy.c: Complicate this a bunch. In particular,
4867         use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
4868         pass the data back to the client in chunked format.
4869
4870 2003-08-27  Dan Winship  <danw@ximian.com>
4871
4872         * libsoup/soup-types.h: New header with typedefs, to avoid
4873         #include loops among other headers.
4874
4875         * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
4876
4877         * libsoup/*.[ch], tests/*.c: Update for soup-types.h
4878         
4879 2003-08-26  Dan Winship  <danw@ximian.com>
4880
4881         * libsoup/soup-message-client-io.c (soup_message_write_request,
4882         soup_message_read_response): Higher-than-soup-message-io-level
4883         functions to do client-side IO. (Code that used to be in
4884         soup-queue.c)
4885         (get_request_header_cb): Fix a bug in the generation of the Host:
4886         header; need to include the port number if it's not the default.
4887
4888         * libsoup/soup-message-io.c (soup_message_write,
4889         soup_message_write_simple): Take separate user_datas for the get_*
4890         callbacks and the done callbacks.
4891
4892         * libsoup/soup-queue.c: Update to use soup_message_write_request
4893         and soup_message_read_response.
4894
4895         * libsoup/soup-connection.c (soup_connection_new): Change the
4896         prototype to take a SoupUri and a callback.
4897
4898         * libsoup/soup-context.c (try_create_connection,
4899         soup_context_connect_cb): Update for soup_connection_new change.
4900
4901         * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
4902         for soup_message_write changes
4903
4904         * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
4905         function
4906
4907 2003-08-26  Dan Winship  <danw@ximian.com>
4908
4909         * libsoup/soup-message-private.h: Define SoupMessage signal stuff
4910         (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
4911         WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
4912
4913         * libsoup/soup-message.c (class_init): set up signals
4914         (requeue_read_finished): Update for changes.
4915
4916         * libsoup/soup-message-io.c (soup_message_read): Split out
4917         parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
4918         arg to say where to store the message body. Set up
4919         read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
4920         signal handlers.
4921         (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
4922         (read_body_chunk): emit READ_CHUNK.
4923         (issue_final_callback): Set r->body. emit READ_BODY.
4924         (failed_read): emit READ_ERROR.
4925         (soup_message_read_set_callbacks): Disconnect old signal handlers,
4926         connect new ones.
4927         (soup_message_read_cancel): Disconnect signal handlers.
4928         (soup_message_write, soup_message_write_simple): Set up
4929         wrote_body_cb and error_cb as signal handlers.
4930         (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
4931         nothing currently ever listens for them. emit WROTE_BODY when
4932         done.
4933         (failed_write): emit WRITE_ERROR
4934
4935         * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
4936         soup_queue_read_headers_cb): Split this into two unequal chunks.
4937         (read_header_cb only runs the pre-body handlers).
4938         (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
4939         prototypes.
4940         (soup_queue_write_done_cb): Update call to soup_message_read
4941
4942         * libsoup/soup-server.c (parse_headers_cb): Renamed from
4943         read_headers_cb
4944         (read_done_cb): Update prototype
4945         (start_request): Update soup_message_read call.
4946
4947 2003-08-25  Dan Winship  <danw@ximian.com>
4948
4949         * libsoup/soup-message-io.c (soup_message_read,
4950         soup_message_write, soup_message_write_simple): Add a "user_data"
4951         arg, pass it to the callbacks.
4952
4953         * libsoup/soup-message.c (soup_message_requeue,
4954         requeue_read_finished, requeue_read_error): Update for that
4955
4956         * libsoup/soup-queue.c: Likewise
4957
4958         * libsoup/soup-server.c: Likewise
4959
4960 2003-08-25  Dan Winship  <danw@ximian.com>
4961
4962         * libsoup/soup-message.c (soup_message_new): Take a uri string
4963         instead of a context. Also, swap the args (so the method comes
4964         before the URI, just like in the protocol).
4965         (soup_message_new_from_uri): Like soup_messgae_new, but takes a
4966         SoupUri instead of a string
4967         (soup_message_set_request, soup_message_set_response): Replace
4968         soup_message_new_full.
4969         (cleanup_message): Was soup_message_cleanup, but is static now.
4970         (queue_message): Do the pre-queuing message cleanup here instead
4971         of in soup_queue_message.
4972         (soup_message_queue): Set the callback and user_data, then call
4973         queue_message.
4974         (requeue_read_error, requeue_read_finished, soup_message_requeue):
4975         Use queue_message
4976         (soup_message_get_uri): Replaces soup_message_get_context.
4977
4978         * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
4979         part of SoupMessagePrivate now)
4980
4981         * libsoup/soup-context.c: #include soup-message-private
4982         (soup_context_from_uri): constify the uri arg.
4983
4984         * libsoup/soup-queue.c: Various context/uri fixes
4985         (proxy_https_connect): Use soup_message_new_from_uri.
4986         (soup_queue_message): Drastically simplified since most of the
4987         work is in soup-messsage.c:queue_message() now
4988
4989         * libsoup/soup-auth-digest.c (compute_response,
4990         get_authorization): Use soup_message_get_uri.
4991
4992         * libsoup/soup-server-auth.c (parse_digest): Likewise
4993
4994         * libsoup/soup-server.c (call_handler): Likewise
4995
4996         * tests/simple-httpd.c (server_callback): Likewise.
4997
4998         * tests/simple-proxy.c (server_callback): Likewise
4999
5000         * tests/get.c (got_url): Likewise.
5001         (get_url): Update soup_message_new usage.
5002
5003         * tests/auth-test.c: #include soup-message-private. Update for
5004         context changes and soup_message_new change.
5005
5006 2003-08-22  Dan Winship  <danw@ximian.com>
5007
5008         * libsoup/soup-message-private.h: New file containing
5009         SoupMessagePrivate and some other soup-message-internal
5010         types/functions. Also includes the new, expanded SoupMessageStatus
5011         enum.
5012
5013         * libsoup/soup-message-io.c: Replaces what used to be in
5014         soup-transfer, but now all the interfaces take SoupMessages
5015         instead of SoupReader/SoupWriter and deal with maintaining
5016         msg->priv->{read,write}_state themselves. Fixes up all the
5017         refcounting madness.
5018
5019         * libsoup/soup-message-handlers.c: Move the handler code here,
5020         mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
5021         to make the distinction from SoupHandlerKind clearer.)
5022
5023         * libsoup/soup-message.c: Update for soup-message-io and new
5024         SoupMessageStatus values. Remove handler code.
5025         (soup_message_cleanup): Remove the hack to try to preserve the
5026         connection if the message gets cleaned up before it finishes
5027         reading. soup_message_requeue handles this in the requeuing case,
5028         and there's no especially compelling reason to bother doing it in
5029         any other case. (And the soup-message-io api doesn't support
5030         having a read operation that's not connected to any message.)
5031
5032         * libsoup/soup-private.h: remove SoupMessagePrivate
5033
5034         * libsoup/soup-queue.c: Update for soup-message-io and new
5035         SoupMessageStatus values.
5036
5037         * libsoup/soup-server-message.c: Likewise
5038
5039         * libsoup/soup-server.c: Likewise
5040
5041         * libsoup/soup-transfer.c: Gone (yay)
5042
5043         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
5044
5045 2003-08-20  Dan Winship  <danw@ximian.com>
5046
5047         * libsoup/soup-message.c: Make this a GObject. (Note that since
5048         SoupMessage was not refcounted before, it's not really refcounted
5049         now either. TBF)
5050         (soup_message_free): Gone, replaced by g_object_unref
5051         (soup_message_copy, soup_message_foreach_remove_header): Remove
5052         these, since neither was currently functional.
5053         (soup_message_is_keepalive): New utility function to look at
5054         HTTP version and request/response headers to decide if a message
5055         indicates the connection should be kept alive.
5056         (soup_message_set_connection, soup_message_get_connection): New
5057         (soup_message_get_socket): New
5058
5059         * libsoup/soup-server-message.c: Make this a subclass of
5060         SoupMessage.
5061         (soup_server_message_new): Now takes a SoupServer and SoupSocket
5062         (soup_server_message_get_server): New
5063         (soup_server_message_set_encoding,
5064         soup_server_message_get_encoding): Get/set whether the message
5065         should be sent with content-length or chunked encoding
5066         (soup_server_message_is_started, soup_server_message_is_finished):
5067         Private member accessors.
5068         (soup_server_message_add_chunk): Renamed from add_data
5069         (soup_server_message_get_chunk): Pops a chunk from the list.
5070         (soup_server_message_get_source): Gone
5071
5072         * libsoup/soup-server.c: Update for SoupServerMessage changes.
5073         (error_cb, write_done_cb): All the cleanup stuff that used to be
5074         here happens automatically by unreffing the message now.
5075         (get_response_header): Remove some erroneous leftover CGI stuff
5076         (issue_bad_request): add "Connection: close" to the response.
5077         (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
5078         with no Host header as per RFC 2616.
5079
5080         * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
5081         (soup_connection_set_in_use): Let the caller set the connection to
5082         "not in use" even after the socket has been disconnected.
5083
5084         * libsoup/soup-context.c: Use soup_message_get_connection
5085
5086         * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
5087         check on request length, since it was rejecting
5088         "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
5089
5090         * libsoup/soup-queue.c: Use soup_message_get_connection and
5091         soup_message_get_socket.
5092         (soup_queue_read_done_cb): Use soup_message_is_keepalive
5093         (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
5094         soup_connection_start_ssl
5095
5096         * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
5097         handlers if the socket hasn't been disconnected yet.
5098
5099         * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
5100         reader_read): Fix these so that reader_read will exit properly if
5101         the read is cancelled.
5102
5103         * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
5104
5105         * tests/simple-httpd.c (server_callback): set the message to
5106         content-length encoding.
5107         * tests/simple-proxy.c (server_callback): Likewise
5108
5109 2003-08-19  Dan Winship  <danw@ximian.com>
5110
5111         * libsoup/soup-socket.c (soup_socket_read,
5112         soup_socket_read_until, soup_socket_write): New API for doing
5113         socket IO. Works both synchronously and asynchronously, and
5114         buffers data to prevent the "100 Continue" problem.
5115         (soup_socket_set_flag): Replaces formerly-private
5116         soup_set_sockopts. (primarily to let the caller turn off
5117         SOUP_SOCKET_FLAG_NONBLOCKING).
5118
5119         * libsoup/soup-transfer.c (soup_transfer_read,
5120         soup_transfer_write, soup_transfer_write_simple): Take a
5121         SoupSocket instead of a GIOChannel. Use the new socket IO api.
5122         Changed the prototypes of some of the callbacks to be less
5123         hackish.
5124
5125         * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
5126         soup_connection_get_iochannel.
5127
5128         * libsoup/soup-message.c: Fix up for soup-transfer changes
5129
5130         * libsoup/soup-queue.c: Likewise
5131
5132         * libsoup/soup-server.c: Likewise
5133
5134         * tests/revserver.c: A slightly more complicated replacement for
5135         timeserver. (Does both reads and writes)
5136
5137 2003-08-19  Dan Winship  <danw@ximian.com>
5138
5139         * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
5140         configure it, and no one has complained, and it looks like the
5141         SOCKS5 auth code doesn't actually work anyway...
5142
5143         * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
5144
5145         * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
5146         SOUP_PROTOCOL_SOCKS5
5147
5148         * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
5149
5150         * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
5151         soup-socks.[ch]
5152
5153 2003-08-19  Dan Winship  <danw@ximian.com>
5154
5155         * libsoup/soup-server.c: Make this a GObject. Remove
5156         SoupServerMessage code (to soup-server-message.c). Remove CGI
5157         server code (for now?)
5158         (soup_server_add_handler, soup_server_remove_handler): Rename
5159         (from register/unregister) to make it clearer what they do.
5160
5161         * libsoup/soup-server-message.c: Moved out of soup-server.c
5162
5163         * libsoup/soup-private.h: Remove SoupServer def
5164
5165         * libsoup/Makefile.am (libsoupinclude_HEADERS,
5166         libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
5167
5168         * tests/simple-httpd.c: 
5169         * tests/simple-proxy.c: Update for SoupServer changes
5170
5171 2003-08-18  Dan Winship  <danw@ximian.com>
5172
5173         * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
5174         a struct sockaddr again (like it used to be). In particular, add
5175         back the "port" field. Add a bunch of macros to try (and fail) to
5176         simplify some of the code.
5177         (soup_address_new): Now returns a SoupAddress directly rather than
5178         a random handle, and the caller can just use g_object_unref to
5179         cancel the lookup. Also, the callback now uses a
5180         SoupKnownErrorCode rather than a special-purpose address-lookup
5181         error code.
5182         (soup_address_new_cancel): No longer needed.
5183         (soup_address_new_sync): Removed
5184         (soup_address_new_any): Replaces soup_address_ipv4_any and
5185         soup_address_ipv6_any.
5186         (soup_address_get_name, etc): Gone. Use soup_address_resolve()
5187         now.
5188         (soup_address_get_physical): Renamed from
5189         soup_address_get_canonical_name.
5190         (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
5191
5192         * libsoup/soup-socket.c: Update for SoupAddress changes and make
5193         similar changes here.
5194         (soup_socket_new): Just creates a generic SoupSocket now.
5195         (soup_socket_connect): Client setup
5196         (soup_socket_listen): Server setup. Now also sets up an iochannel
5197         listening for connects and emits a "new_connection" signal as they
5198         come in.
5199         (soup_socket_start_ssl): Turns on SSL.
5200         (soup_socket_client_new, soup_socket_server_new): Utility
5201         functions that wrap the above.
5202         (soup_socket_new_cancel, soup_socket_new_sync): Gone
5203         (soup_socket_server_accept, soup_socket_server_try_accept): No
5204         longer needed.
5205         (soup_socket_get_iochannel): No longer adds a ref when returning
5206         the iochannel. Also, we set it to "close_on_unref" so that if a
5207         caller adds a ref to it, the connection will actually remain open
5208         even after the SoupSocket is destroyed.
5209         (soup_socket_get_local_address, soup_socket_get_remote_address):
5210         Let the caller get both of these.
5211
5212         * libsoup/soup-connection.c: Don't keep a private copy of the
5213         socket's iochannel.
5214         (soup_connection_new): Don't need to set socket options here.
5215         SoupSocket does it.
5216         (soup_connection_start_ssl): Just call soup_socket_start_ssl.
5217         (soup_connection_get_iochannel): Just return the socket's
5218         iochannel (and don't ref it)
5219
5220         * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
5221         SOUP_ERROR_CANT_RESOLVE_PROXY
5222
5223         * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
5224         Remove the "FIXME add a CANT_RESOLVE error" and return
5225         SOUP_ERROR_CANT_RESOLVE instead.
5226
5227         * libsoup/soup-server.c: Update for socket/address changes. Don't
5228         poke into SoupSocket's private fields.
5229         (soup_server_run_async): Just connect to the socket's
5230         "new_connection" signal.
5231
5232         * libsoup/soup-context.c (try_create_connection,
5233         soup_context_connect_cb): Update for socket changes. Replace
5234         SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
5235
5236         * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
5237         to connect to a signal handler and connect another function to
5238         clean up the first signal handler after its first invocation.
5239         (Lets us use signals to replace one-off callbacks.)
5240
5241         * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
5242         actually private now.
5243         (struct _SoupServer): Remove accept_tag.
5244
5245         * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
5246         Don't unref the iochannel.
5247         (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
5248
5249         * libsoup/soup-socks.c: Update for socket/address changes
5250
5251         * tests/simple-httpd.c (main):
5252         s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
5253         * tests/simple-proxy.c (main): Likewise
5254
5255         * tests/timeserver.c: Update for SoupSocket's "new_connection"
5256         signal, and for SoupAddress changes.
5257
5258 2003-08-14  Dan Winship  <danw@ximian.com>
5259
5260         * libsoup/soup-connection.c: New, split out from soup-context and
5261         made into a GObject.
5262         (soup_connection_disconnect): Disconnects the connection and emits
5263         a signal. (Replaces the old "keep_alive" flag.)
5264         (soup_connection_is_connected): Checks if the connection is still
5265         connected
5266         (connection_died): Just disconnect, rather than freeing the
5267         connection. This way if anyone else is still referencing it they
5268         won't end up with an invalid pointer.
5269
5270         * libsoup/soup-context.c: Make this a GObject, remove all the
5271         SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
5272         SoupContext can keep track of connection auth stuff there without
5273         SoupConnection needing to care. Various other updates.
5274
5275         * libsoup/soup-private.h: Remove SoupContext and SoupConnection
5276         definitions.
5277
5278         * libsoup/*.c, tests/get.c: Update for context/connection changes
5279
5280         * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
5281         definition to deal with the fact that there's no
5282         soup_connection_get_context any more.
5283
5284         * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
5285         with connection persistence here.
5286         (soup_queue_read_done_cb): Do it here instead. Disconnect the
5287         connection when appropriate.
5288         (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
5289         Reference-count the connection properly. (I think.)
5290
5291         * libsoup/soup-marshal.list: New, for SoupConnection's
5292         "disconnected" signal.
5293
5294         * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
5295
5296         * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
5297         GLIB_GENMARSHAL gets set too.
5298
5299 2003-08-14  Dan Winship  <danw@ximian.com>
5300
5301         * libsoup/soup-error.c: Fix a spelling mistake.
5302
5303         * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
5304
5305 2003-08-12  Dan Winship  <danw@ximian.com>
5306
5307         * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
5308         of the interfaces around a little bit.
5309
5310         * libsoup/soup-auth-basic.c: subclass for Basic auth
5311
5312         * libsoup/soup-auth-digest.c: subclass for Digest auth
5313
5314         * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
5315         the code from soup-ntlm.c here, and make it private.
5316
5317         * libsoup/soup-ntlm.c: gone
5318
5319         * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
5320         here, and change the signature of SoupAuthorizeFn.
5321
5322         * libsoup/soup-context.c: Use g_object_unref to free auths, use
5323         methods instead of directly access private fields.
5324
5325         * libsoup/soup-queue.c: Likewise
5326
5327         * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
5328         NTLM references. We have no plans to implement server-side NTLM
5329         auth.
5330
5331         * tests/auth-test.c (identify_auth): Update for auth api changes
5332
5333 2003-08-12  Dan Winship  <danw@ximian.com>
5334
5335         * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
5336         call
5337
5338         * libsoup/soup-address.c: Make this a GObject.
5339         (soup_address_ref, soup_address_unref): Gone.
5340         (soup_address_copy): Gone. Wasn't being used anyway.
5341
5342         * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
5343         here from soup-address.c, so that soup-address doesn't need to
5344         worry about trying to cache zero-ref addresses.
5345
5346         * libsoup/soup-socket.c: Make this a GObject. Use "guint"
5347         consistently for port numbers.
5348         (soup_socket_ref, soup_socket_unref): Gone.
5349
5350         * libsoup/soup-private.h: Change the SoupSocket definition to be
5351         SoupSocketPrivate. (Still need to keep this here since soup-server
5352         pokes around in its internals.)
5353         (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
5354
5355         * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
5356         reader/writer rather than leaking them.
5357
5358         * libsoup/*: Use GObject methods for socket/address refcounting
5359         
5360         * tests/auth-test.c (main)
5361         * tests/timeserver.c (main): Call g_type_init.
5362
5363         * tests/get.c (main): Call g_type_init.
5364         (get_url, got_url): Fix some bugs that could make -r mode get into
5365         infinite loops downloading the same files over and over. Plug some
5366         memory leaks to make this more useful for valgrinding libsoup.
5367
5368         * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
5369         handler for SIGINT so we can exit cleanly, since valgrind won't
5370         give a leak report if you don't. Plug a few memory leaks.
5371
5372         * tests/simple-proxy.c (main): Likewise 
5373
5374 2003-08-12  Dan Winship  <danw@ximian.com>
5375
5376         Pull over some new test programs from the soup-refactoring branch,
5377         along with the SoupUri changes they depend on.
5378
5379         * tests/simple-httpd.c: A really simple HTTP server, to test the
5380         server code.
5381
5382         * tests/simple-proxy.c: An even simpler HTTP proxy
5383
5384         * tests/get.c: Add "-r" flag to recursively get files (thereby
5385         testing multiple-connections-at-once code). Also good for setting
5386         up a tree to use with simple-httpd.
5387
5388         * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
5389         normal case)
5390
5391         * tests/uri-parsing.c: Regression test for the new soup-uri.c
5392
5393         * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
5394         pull in some optimizations from camel-url. Also, make SoupProtocol
5395         a GQuark so we can still compare them with ==, but we can also
5396         recognize any protocol.
5397         (soup_uri_new_with_base): New, to merge base and relative URIs
5398         (soup_uri_to_string): Update this. Change the "show_password" flag
5399         (which we always passed FALSE for) to "just_path", for places that
5400         want the path+query without the protocol, host, etc.
5401
5402         * libsoup/soup-queue.c (soup_get_request_header): Just use
5403         soup_uri_to_string to generate the request URI.
5404
5405         * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
5406         "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
5407         the URI by hand badly.
5408         * libsoup/soup-server-auth.c (parse_digest): Likewise
5409
5410         * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
5411         switch() to an series of if()s since SOUP_PROTOCOL_* aren't
5412         constants any more.
5413
5414         * libsoup/soup-context.c (soup_context_uri_hash,
5415         soup_context_uri_equal): s/querystring/query/
5416
5417 2003-08-12  Dan Winship  <danw@ximian.com>
5418
5419         * configure.in: Bump API version to 2.2 and package version to
5420         2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
5421         libgnutls-config to find GNUTLS.
5422
5423         * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
5424
5425         * Makefile.am: Update for pc file rename
5426
5427         * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
5428         and libsoup-ssl-proxy stuff.
5429
5430         * libsoup/soup-ssl-proxy.c
5431         * libsoup/soup-nss.[ch]
5432         * libsoup/soup-openssl.[ch]: gone
5433
5434         * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
5435
5436         * tests/Makefile.am (get_LDADD, timeserver_LDADD,
5437         auth_test_LDADD): Update libsoup version
5438
5439 2003-08-07  Dan Winship  <danw@ximian.com>
5440
5441         * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
5442         soup_auth_invalidate): These are all really SoupContext functions,
5443         so move them to soup-context.c (and rename them appropriately).
5444         (soup_auth_get_protection_space): New method to get the
5445         "protection space" of an auth (paths where it is valid).
5446         (soup_auth_invalidate): New method to try to un-authenticate an
5447         auth (so we can keep the domain info cached even if the auth info
5448         is wrong).
5449         (basic_pspace_func): Basic protection space is all directories
5450         below the current one.
5451         (basic_invalidate_func): Clear the encoded username/password
5452         (digest_pspace_func): Digest protection space is either the whole
5453         server, or "what the domain parameter says" (though we don't deal
5454         with cross-host domains).
5455         (digest_invalidate_func): Return FALSE; bad digest auth info isn't
5456         cacheable.
5457         (digest_parse_func, digest_free): Set/free domain parameter
5458         (ntlm_pspace): NTLM protection space is always the whole server.
5459         (ntlm_invalidate): Clear the auth state.
5460         (soup_auth_new_ntlm): Make this non-static
5461         (SoupAuth): Replace the quad-state "status" field with an
5462         "authenticated" boolean.
5463         
5464         * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
5465         hash with separate "auth_realms" (path->realm) and "auths"
5466         (realm->auth) hashes. Also add a "use_ntlm" flag.
5467
5468         * libsoup/soup-context.c (soup_context_unref): Update SoupHost
5469         freeing code.
5470         (connection_free): Don't the connection's auth, just free it.
5471         (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
5472         does two-stage lookup (path->realm then realm->auth) and also
5473         deals with NTLM hacks.
5474         (soup_context_update_auth): Mostly formerly soup_auth_set_context,
5475         but also large parts of authorize_handler. Updates the auth hashes
5476         based on information from a 401 or 407 response. Does a better job
5477         than authorize_handler did of not throwing away good information.
5478         (soup_context_preauthenticate): New; fakes up auth info so that
5479         requests will end up using authentication without the server
5480         needing to return an error first.
5481         (soup_context_authenticate_auth): Moved out of authorize_handler
5482         so it can be used at request-sending time too, if we know that we
5483         need it. (That way we can avoid requeuing the request if it isn't
5484         going to be able to be authenticated.)
5485         (soup_context_invalidate_auth): Sort of like the old
5486         soup_auth_invalidate, but only destroys the auth data, while still
5487         remembering the path->realm mapping.
5488
5489         * libsoup/soup-message.c (authorize_handler): Mostly moved into
5490         soup_context_update_auth.
5491         (maybe_validate_auth): Remove this; it was only useful because of
5492         bugs elsewhere in the auth handling.
5493         
5494         * libsoup/soup-queue.c (soup_encode_http_auth): Update for
5495         soup_context_lookup_auth. If the returned auth isn't
5496         authenticated, call soup_context_authenticate_auth() on it.
5497
5498         * tests/auth-test.c: New (from soup-refactoring branch). Tests
5499         that the Basic/Digest auth code does the right thing. (TODO: find
5500         a good way to add NTLM tests too.)
5501
5502         * tests/Makefile.am (check_PROGRAMS): add auth-test
5503
5504 2003-07-29  Dan Winship  <danw@ximian.com>
5505
5506         * configure.in: 1.99.25 ("Potato and Leek Soup")
5507
5508         * libsoup/soup-message.c (requeue_read_finished,
5509         release_connection): Free the passed-in body data. Otherwise the
5510         response body ends up getting leaked on most 3xx and 4xx
5511         responses.
5512         (soup_message_cleanup): Remove a piece of code that didn't
5513         actually do anything and its associated confused comment.
5514
5515         * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
5516
5517         * libsoup/soup-context.c (connection_free): plug a non-occasional
5518         NTLM auth leak.
5519
5520 2003-06-26  Joe Shaw  <joe@ximian.com>
5521
5522         * configure.in: Version 1.99.24
5523
5524 2003-06-24  Dan Winship  <danw@ximian.com>
5525
5526         * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
5527         it, and (b) depends on lots of new things sometimes (like on RH9).
5528
5529         * libsoup/soup-openssl.c: 
5530         * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
5531         just #ifdef HAVE_OPENSSL since the header check doesn't get run in
5532         the pkgconfig case
5533
5534 2003-06-19  Dan Winship  <danw@ximian.com>
5535
5536         * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
5537         old read_tag before changing/clearing it.
5538         (soup_queue_write_done_cb): Likewise with the write_tag.
5539
5540         * libsoup/soup-transfer.c (issue_final_callback): ref the reader
5541         around the stop+callback.
5542         (soup_transfer_write_cb): Likewise.
5543
5544 2003-06-12  Dan Winship  <danw@ximian.com>
5545
5546         * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
5547         ref_count field.
5548         (soup_transfer_read, create_writer): Set initial ref_count to 2
5549         (one for soup-transfer, one for the caller).
5550         (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
5551         reader
5552         (soup_transfer_read_stop): Clears the GIOChannel callbacks and
5553         drops soup-transfer's ref.
5554         (soup_transfer_read_cancel): Now just a stop+unref
5555         (soup_transfer_write_ref, soup_transfer_write_unref,
5556         soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
5557
5558         * libsoup/soup-message.c (soup_message_cleanup): when setting up
5559         the "finish reading" callbacks, unref the reader so it will be
5560         destroyed once it's done reading.
5561         (soup_message_requeue): Likewise.
5562
5563         * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
5564         prototype change (no longer returns a SoupTransferDone).
5565         (soup_queue_read_chunk_cb): Likewise.
5566
5567         * libsoup/soup-server.c (read_headers_cb): Likewise
5568
5569 2003-06-11  Dan Winship  <danw@ximian.com>
5570
5571         * libsoup/soup-transfer.c: Change all functions to take a
5572         SoupReader * or SoupWriter * instead of a guint.
5573
5574         * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
5575         write_tag pointers instead of guints.
5576
5577 2003-06-02  Chris Toshok  <toshok@ximian.com>
5578
5579         * libsoup/soup-ssl.c: remove #include for soup-nss.h
5580
5581 2003-06-02  Chris Toshok  <toshok@ximian.com>
5582
5583         * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
5584         (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
5585         (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
5586
5587 2003-06-02  Chris Toshok  <toshok@ximian.com>
5588
5589         * configure.in: Bump version to 1.99.23.
5590
5591 2003-05-30  Chris Toshok  <toshok@ximian.com>
5592
5593         * libsoup/soup-queue.c (soup_queue_error_cb): always force a
5594         reconnect when there's an error with ssl connection.  This fixes
5595         #43387, but it runs the risk of sending requests multiple times to
5596         the exchange server, and it results in lots of shorter lived
5597         connections and more forking (in the ssl proxy case), depending on
5598         the length of the operation.
5599
5600 2003-05-21  Dan Winship  <danw@ximian.com>
5601
5602         * configure.in: 1.99.22 (codename: French Onion Soup)
5603
5604 2003-05-20  Dan Winship  <danw@ximian.com>
5605
5606         * libsoup/soup-message.c (soup_message_requeue): Clear the
5607         write_tag as well so we don't double-cancel it. #43395.
5608
5609         * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
5610         be destroyed by the end of the func, so we have to call
5611         soup_connection_set_used at the beginning.
5612
5613         * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
5614         Call g_set_error() so that we don't SEGV immediately after
5615         returning G_IO_STATUS_ERROR.
5616
5617 2003-05-08  Joe Shaw  <joe@ximian.com>
5618
5619         * configure.in: Bump version to 1.99.21
5620
5621         * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
5622         tunnelling fails, the other message which shares our same
5623         connection will free it first, so set ours to NULL.
5624
5625 2003-05-08  Dan Winship  <danw@ximian.com>
5626
5627         * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
5628         return an NTLM request string. Otherwise return the "response"
5629         field (which should include the NTLM authenticate message)
5630         (ntlm_init): Don't bother setting "response" to the NTLM request
5631         string. Just leave it NULL in that case.
5632
5633         * libsoup/soup-message.c (authorize_handler): Never try to reuse
5634         an NTLM auth returned from soup_auth_lookup. Only set the auth on
5635         the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
5636         call soup_auth_set_context() on it just like for non-NTLM auth.
5637         The net effect of all of this is that now we record when a context
5638         needs NTLM auth just like with non-NTLM auth, so that that info
5639         gets preserved across connections.
5640         (soup_message_requeue): No longer need the hackery here to
5641         preserve the connection auth state.
5642
5643 2003-05-07  Dan Winship  <danw@ximian.com>
5644
5645         * libsoup/soup-context.c (soup_connection_set_in_use): New, to
5646         toggle the connection's in_use flag, and set up the death watch
5647         when it's not in use.
5648         (connection_death): This is only hooked up when the connection is
5649         not in use now, so don't need to check that. Should fix the
5650         infinite connection_death loop.
5651         (soup_connection_is_new): Keep a distinct "new" flag rather than
5652         defining "new" as "has been released at least once".
5653         (soup_connection_set_used): Mark a connection no-longer new.
5654         (soup_context_connect_cb): Mark the connection as new. Don't set
5655         up the death watch since it's in_use.
5656         (try_existing_connections): Use soup_connection_set_in_use.
5657         (soup_connection_release): Likewise
5658
5659         * libsoup/soup-message.c (requeue_read_finished): Call
5660         soup_connection_set_used so that the connection isn't still
5661         considered new when we send the message the second time.
5662
5663         * libsoup/soup-queue.c (soup_queue_error_cb): Call
5664         soup_connection_set_used (assuming we don't close the connection)
5665         (soup_queue_read_done_cb): Likewise.
5666
5667         * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
5668         nothing, call soup_transfer_read_error_cb rather than just
5669         cancelling, or else it will get cancelled again later.
5670
5671 2003-05-07  Dan Winship  <danw@ximian.com>
5672
5673         * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
5674         library doesn't depend on them, only the proxy does. #42473
5675
5676 2003-05-06  Dan Winship  <danw@ximian.com>
5677
5678         * src/libsoup/soup-message.c (global_handlers): Change the
5679         redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
5680         SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
5681         for "Location" to get around the non-64-bit-clean union
5682         initialization pointed out by Jeremy Katz <katzj@redhat.com>.
5683         (redirect_handler): Update for that.
5684
5685 2003-04-28  Dan Winship  <danw@ximian.com>
5686
5687         * configure.in: 1.99.20
5688
5689         * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
5690         we always call UNIGNORE_CANCEL. Might fix #41971
5691
5692 2003-04-25  Dan Winship  <danw@ximian.com>
5693
5694         * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
5695         suddenly gets an io error while reading or writing, assume it's a
5696         timeout or something, close the connection, and requeue the
5697         message.
5698
5699 2003-04-23  Dan Winship  <danw@ximian.com>
5700
5701         * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
5702         soup-transfer callbacks to keep reading off the connection unless
5703         we're actually going to keep the connection around afterward.
5704         Otherwise we can just close it.
5705
5706         * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
5707         thingy so that it's possible to cancel a read from inside a
5708         callback so that the above change actually works instead of just
5709         crashing.
5710
5711 2003-04-20  Rodney Dawes  <dobey@ximian.com>
5712
5713         * configure.in: Up version to 1.99.18
5714         * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
5715         
5716 2003-04-11  Dan Winship  <danw@ximian.com>
5717
5718         * libsoup/soup-context.c (soup_connection_purge_idle): New
5719         function to close all idle connections. (Needed for #41117 or else
5720         there's no way to force-discard NTLM authentication.)
5721
5722         * libsoup/soup-queue.c (soup_queue_shutdown): Use it
5723
5724 2003-04-10  Joe Shaw  <joe@ximian.com>
5725
5726         * libsoup/soup-queue.c (proxy_https_connect):
5727         proxy_https_connect_cb() might not get called if connecting to the
5728         proxy fails, and it causes us to double-free the connection.
5729         Always set the message's connection to NULL before freeing it.
5730
5731 2003-04-09  Dan Winship  <danw@ximian.com>
5732
5733         * configure.in: 1.99.17
5734
5735 2003-04-07  Dan Winship  <danw@ximian.com>
5736
5737         * libsoup/soup-context.c (connection_death): Revert Joe's changes.
5738         We can't release the connection there because there may be
5739         SoupMessages still pointing to it. (Needs to be revisited.)
5740
5741 2003-04-03  JP Rosevear  <jpr@ximian.com>
5742
5743         * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
5744         error during waitpid
5745
5746         * libsoup/soup-address.c: ditto
5747
5748 2003-04-02  Joe Shaw  <joe@ximian.com>
5749
5750         * libsoup/soup-context.c (connection_death): Only drop the
5751         connection if we get an error condition on the channel.  Fixes a
5752         double-free.
5753
5754 2003-04-02  Joe Shaw  <joe@ximian.com>
5755
5756         * libsoup/soup-context.c (connection_death): Just call
5757         soup_connection_release() from here and return whether the
5758         connection is in use.
5759
5760 2003-03-31  Ian Peters  <itp@ximian.com>
5761
5762         * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
5763         case of EAGAIN or EINTR, since shutting down an SSL connection
5764         requires more than just closing a socket.
5765
5766 2003-03-28  Dan Winship  <danw@ximian.com>
5767
5768         * libsoup/soup-message.c (soup_message_set_context): If the new
5769         context points to a different server from the old context, call
5770         soup_message_cleanup. Otherwise it tries to reuse the old
5771         connection...
5772
5773 2003-03-25  Joe Shaw  <joe@ximian.com>
5774
5775         * configure.in: Bump up to 1.99.16
5776
5777 2003-03-24  Joe Shaw  <joe@ximian.com>
5778
5779         * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
5780         slightly better error message on various SSL failures than the
5781         previous message.
5782
5783         * soup-queue.c (soup_queue_error_cb): Throw the
5784         SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
5785
5786 2003-03-21  Joe Shaw  <joe@ximian.com>
5787
5788         * soup-server.c: Use non-deprecated g_main_loop_* calls
5789         throughout.
5790         (soup_server_unref): Don't unref the main loop if it's NULL.
5791         Fixes a glib warning.
5792
5793 2003-03-18  Dan Winship  <danw@ximian.com>
5794
5795         * configure.in: comment out NSS checks. The NSS code doesn't work
5796         and there are no current plans to fix it.
5797
5798         * README (Features): Mention GnuTLS, remove NSS and the rest of
5799         the "Planned Features" section.
5800
5801         * MAINTAINERS: remove Alex
5802
5803         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
5804         timeout to 10 seconds (and get rid of the 3 tries) so we don't
5805         fail to connect just because the server is slow/far away.
5806
5807 2003-03-17  Joe Shaw  <joe@ximian.com>
5808
5809         * configure.in: Bump up to 1.99.15.
5810
5811 2003-03-12  Ian Peters  <itp@ximian.com>
5812
5813         * libsoup/soup-gnutls.c: because creating client credentials is
5814         expensive, keep the same one around as long as possible, only
5815         recreating it if the ssl_ca_file changes.  Wrap
5816         gnutls_certificate_credentials in a refcounted struct to avoid
5817         freeing it while another established connection may potentially
5818         need it (say, to rehandshake).
5819
5820 2003-03-11  Frank Belew  <frb@ximian.com>
5821
5822         * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't 
5823         use pkgconfig
5824
5825 2003-03-10  Joe Shaw  <joe@ximian.com>
5826
5827         * configure.in: Bump up to 1.99.14.
5828
5829         * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
5830         libsoup/soup-ssl.c: Add support for GnuTLS.  Patch from Ian
5831         Peters.
5832
5833 2003-03-07  Joe Shaw  <joe@ximian.com>
5834
5835         * configure.in: Bump up to 1.99.13.
5836
5837         * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
5838         the list of conditions to watch.  If the remote end hangs up the
5839         connection, we'll get a successful read of 0 bytes, not a HUP.
5840         The connection will have to be released by the point we check for
5841         it in connection_death().
5842
5843         * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
5844         (apparently) errant resetting of the read and write tags.  I think
5845         this might have been causing some reentrancy and crashes.
5846
5847         * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
5848         channel to NULL encoding and not buffered.
5849
5850         * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
5851         incorrect comments.
5852
5853 2003-02-28  Joe Shaw  <joe@ximian.com>
5854
5855         * configure.in: Bump up to 1.99.12.
5856
5857         * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
5858         header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
5859         this case we probably don't want to call the error callback, we
5860         just want to act like our transfer was cancelled.
5861
5862 2003-02-27  Joe Shaw  <joe@ximian.com>
5863
5864         Try to apply some order to the iochannel refcounting...
5865
5866         * configure.in: Bump up to 1.99.11.
5867
5868         * libsoup/soup-context.c (soup_connection_get_iochannel): The
5869         connections needs to own a reference to the iochannel!  If we're
5870         using HTTPS, release the ref we get from soup_socket_get_iochannel
5871         and replace it with the ref we get from soup_ssl_get_iochannel().
5872         Then, always ref the channel that we return (ugh, but that's the
5873         soup way).
5874         (connection_free): Release the connection's ref to the iochannel.
5875
5876         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
5877         iochannel. The reference we pass back will be owned by the
5878         connection.
5879         (soup_ssl_hup_waitpid): Release our ref.
5880
5881 2003-02-27  Joe Shaw  <joe@ximian.com>
5882
5883         * configure.in: Bump up to 1.99.10.
5884
5885         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
5886         iochannel, return to the status quo.  Sigh.
5887
5888 2003-02-26  Joe Shaw  <joe@ximian.com>
5889
5890         * configure.in: Bump up to 1.99.9.
5891
5892         * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
5893         it's causing problems with HTTPS and proxies; the iochannel
5894         refcounting is waaaaaay horked.
5895
5896 2003-02-26  Frank Belew  <frb@ximian.com>
5897
5898         * libsoup/Makefile.am: added workaround to link ssl-proxy statically
5899
5900 2003-02-11  Joe Shaw  <joe@ximian.com>
5901
5902         * configure.in: Bump up to 1.99.8 for snaps.
5903
5904         * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
5905         It returns the address to the resulting hostent or NULL on failure,
5906         unlike Linux which returns an error code.
5907
5908 2003-02-11  Joe Shaw  <joe@ximian.com>
5909
5910         * configure.in: Bump up to 1.99.7 for snaps.
5911
5912         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
5913         the error string from OpenSSL if we can't establish a connection.
5914
5915 2003-02-04  Joe Shaw  <joe@ximian.com>
5916
5917         * configure.in: Bump up to 1.99.6 for snaps.
5918
5919         * libsoup/soup-server.c (destroy_message): We already assigned
5920         chan, so don't reassign it, and unref it in all cases.
5921         (issue_bad_request): Always unref after a call to
5922         soup_socket_get_iochannel(), because it refs it.
5923         (conn_accept): Fix some funky GIOChannel reffing here.
5924
5925         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
5926         g_io_channel_ref() on the socket.  This is the exact opposite of
5927         what we want to do.  Create a temporary structure containing the
5928         parent pid and the old socket and unref the socket when our
5929         callback is called.  This should fix GIOChannels being leaked on
5930         SSL connections.
5931
5932         * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
5933         main loop quits.
5934
5935 2003-01-22  Joe Shaw  <joe@ximian.com>
5936
5937         * configure.in: Bump up to 1.99.5 for the snaps.
5938
5939         * libsoup/soup-address.c (soup_address_new): If we found the
5940         address in our hash, we need to return NULL or else Soup will
5941         think we're doing an async lookup and do some cancellation on
5942         us.  Besides, we were returning the wrong type anyway and it
5943         was crashing things.
5944
5945 2003-01-17  Joe Shaw  <joe@ximian.com>
5946
5947         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
5948         uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
5949         out, so keep trying until we succeed.
5950
5951 2003-01-10  Joe Shaw  <joe@ximian.com>
5952
5953         * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
5954         strings and print out the error when the cert can't verify.
5955
5956 2003-01-09  Dan Winship  <danw@ximian.com>
5957
5958         * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
5959         overrun noticed by valgrind
5960
5961 2002-12-20  Joe Shaw  <joe@ximian.com>
5962
5963         * libsoup/soup-server.c (soup_server_new_with_host): Added.
5964         Starts a server only on the interface specified, instead of all
5965         network interfaces.
5966
5967 2002-12-16  Jeremy Katz  <katzj@redhat.com>
5968
5969         * configure.in: use $libdir instead of /usr/lib when looking for
5970         libraries
5971
5972 2002-12-11  Joe Shaw  <joe@ximian.com>
5973
5974         * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
5975         Don't set a variable to NULL and then immediately try to
5976         dereference it.
5977
5978 2002-12-09  Joe Shaw  <joe@ximian.com>
5979
5980         * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
5981         timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
5982         we don't hang forever if we don't get more data.
5983
5984         * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
5985         or else we'll hang forever in SSL_connect() if the other side
5986         hangs up.
5987
5988         * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
5989         release the connection on message free, even if the connection was
5990         unsuccessful.
5991
5992 2002-12-03  Joe Shaw  <joe@ximian.com>
5993
5994         * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
5995         g_io_channel_set_close_on_unref() on the second half of the socket
5996         pair so we don't leak file descriptors.
5997
5998 2002-12-03  Frank Belew  <frb@ximian.com>
5999
6000         * libsoup/soup-address.c: add signal.h to the list of headers to 
6001         pick up SIGKILL
6002         
6003 2002-11-25  Joe Shaw  <joe@ximian.com>
6004
6005         * Makefile.am: Build the tests directory again
6006
6007 2002-11-21  Rodney Dawes  <dobey@ximian.com>
6008
6009         * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
6010         
6011 2002-11-20  Michael Meeks  <michael@ximian.com>
6012
6013         * configure.in: require autoconf 2.52 not 2.53.
6014
6015 2002-11-18  Dan Winship  <danw@ximian.com>
6016
6017         * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
6018         since it's apparently non-portable. Use s6_addr instead.
6019         (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
6020
6021         * libsoup/soup-error.c: Fix spelling of
6022         SOUP_ERROR_MOVED_PERMANENTLY and its description.
6023
6024         * libsoup/soup-message.c (soup_message_get_request_header, etc):
6025         Remove long-deprecated API.
6026
6027         * libsoup/soup-socket.c (soup_socket_connect): remove unused
6028         variable.
6029
6030         * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
6031         * libsoup/soup-server.c (cgi_read): Likewise
6032         * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
6033         Likewise.
6034         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
6035         * libsoup/soup-transfer.c (soup_transfer_read_cb,
6036         soup_transfer_write_cb): Likewise.
6037
6038         * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
6039         instead of IPv4. (Tested on OS X.)
6040
6041 2002-11-15  Dan Winship  <danw@ximian.com>
6042
6043         * libsoup/*: Change old Helix Code refs to Ximian (and update
6044         copyright dates).
6045
6046 2002-11-15  Frank Belew  <frb@ximian.com>
6047
6048         * tests/Makefile.am: uncomment lines to make timeserver build 
6049         correctly
6050         
6051 2002-11-14  Joe Shaw  <joe@ximian.com>
6052
6053         * libsoup/soup-address.c (soup_address_new): When we get an
6054         address from the hash, call our address lookup callback or else
6055         the connection will hang.
6056
6057 2002-11-13  Dan Winship  <danw@ximian.com>
6058
6059         * tests/timeserver.c: Oops, commit this.
6060
6061         * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
6062
6063 2002-11-13  Joe Shaw  <joe@ximian.com>
6064
6065         * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
6066         (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
6067         instead of bindir.
6068
6069         * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
6070         to properly shut down the SSL connection before closing the
6071         socket.
6072
6073         * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
6074         iochannels before quitting the main loop.
6075
6076         * tests/Makefile.am: disable building timeserver, the source file
6077         wasn't added.
6078
6079 2002-11-12  Dan Winship  <danw@ximian.com>
6080
6081         * configure.in: Check for IPv6 support in networking headers.
6082
6083         * libsoup/soup-address.c: Make the internal structure of
6084         SoupAddress entirely private, and make SoupAddress be more like a
6085         hostent and less like a sockaddr. (Ie, make it not have a port
6086         associated with it.) Document undocumented functions. Add
6087         completely-untested support for IPv6.
6088         (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
6089         SoupAddress and a port.
6090         (soup_address_ipv4_any, soup_address_ipv6_any): Return static
6091         addresses corresponding to the IPv6 and IPv6 "any" addresses.
6092         (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
6093         (soup_address_make_sockaddr): Now constructs a new sockaddr, which
6094         may be a sockaddr_in or sockaddr_in6.
6095         (soup_address_gethostname, soup_address_gethostaddr): Remove
6096         these. They aren't reliable, especially on multihomed hosts.
6097         (soup_gethostbyname, soup_gethostbyaddr): support IPv6
6098         (soup_address_new): Keep pending lookups in a separate hash table
6099         from completed lookups. Fix a bug when canceling a lookup when
6100         there was more one outstanding request for it.
6101         (soup_address_lookup_in_cache): Removed.
6102
6103         * libsoup/soup-socket.c: Add a port field to SoupSocket (since
6104         it's not in SoupAddress any more).
6105         (soup_socket_connect): Simplify this. Don't use
6106         soup_address_lookup_in_cache, just call soup_address_new, since we
6107         already know the code can deal with the callback being invoked
6108         immediately.
6109         (soup_socket_new_sync, soup_socket_new): Take a port argument.
6110         (soup_socket_server_new): Take a SoupAddress to use as the local
6111         address to bind to. This lets the caller choose between the IPv4
6112         and IPv6 "any" addresses, and also lets you bind to a single
6113         interface of a multi-homed machine.
6114         (soup_socket_server_accept, soup_socket_server_try_accept): Merge
6115         the common code.
6116
6117         * libsoup/soup-server.c (soup_server_new): Pass
6118         soup_address_ipv4_any() to soup_socket_server_new().
6119
6120         * libsoup/soup-socks.c (soup_connect_socks_proxy,
6121         soup_socks_write): Fix up for the API changes, but it won't work
6122         with IPv6 yet.
6123
6124         * tests/timeserver.c: Another really simple test, for the server
6125         socket code.
6126
6127         * tests/Makefile.am: build timeserver
6128
6129 2002-11-11  Dan Winship  <danw@ximian.com>
6130
6131         * libsoup/soup-address.c: Move the SoupAddress code from
6132         soup-socket.c and soup-socket-unix.c to here.
6133
6134         * libsoup/soup-socket.c: Move the remaining code from
6135         soup-socket-unix.c here.
6136
6137         * libsoup/soup-socket-unix.c: Gone
6138
6139         * tests/get.c: really really trivial test program
6140
6141         * configure.in (AC_OUTPUT):
6142         * Makefile.am (SUBDIRS): add tests/
6143
6144 2002-11-05  Dan Winship  <danw@ximian.com>
6145
6146         * Split libsoup out of soup. ChangeLog.old contains the original
6147         soup ChangeLog.
6148
6149         * Makefile.am, etc: Fix things up to work with the new directory
6150         layout. Disable docs until we fix them.
6151
6152         * autogen.sh: Use gnome-autogen.sh
6153
6154         * configure.in: Require autoconf 2.53. Remove stuff that was only
6155         needed for httpd or wsdl code. Remove glib1 support. Bump version
6156         to 2.0.
6157
6158         * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
6159         in ${includedir}/soup-2.0
6160         
6161         * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
6162         SOAP-specific stuff, Windows support, and other things that
6163         weren't being maintained.
6164
6165         * soup-config.in, soupConf.sh: Kill these. We only support
6166         pkg-config now.