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