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