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