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