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