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