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