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