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