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