1 2008-03-10 Dan Winship <danw@gnome.org>
7 2008-02-28 Dan Winship <danw@gnome.org>
9 * libsoup/soup-session.c (finalize): free priv->user_agent.
10 #518798, Wouter Cloetens.
11 (redirect_handler): PROPFIND is defined to be "safe and
12 idempotent", so allow automatic redirects of it. (Pointed out by
13 Christian Kellner. FIXME: need a way for apps to declare
14 additional safe methods). Also, treat 302 like 307, not like 303,
15 because that behavior is universal in the real world, despite the
18 * tests/redirect-test.c (tests): update POST 302 behavior check
20 * tests/Makefile.am (TESTS): oops, add redirect-test so it gets
21 run by "make check"/"make distcheck"
23 * tests/ssl-test.c: Re-revert the change from 2008-02-09; the
24 problem with ssl-test.c was not that soup_gnutls_init() wasn't
25 thread-safe, it's that the server thread doesn't do anything that
26 would ever cause soup_gnutls_init() to be called, and so if the
27 client thread doesn't start first, the server thread will run
28 without initializing GNUTLS.
30 2008-02-27 Benjamin Otte <otte@gnome.org>
32 * libsoup/soup-socket.c: (read_from_network), (soup_socket_read),
33 (soup_socket_read_until), (soup_socket_write):
34 ensure that nread/nwrote parameters aren't NULL. They are also
35 properly set on error paths now.
37 2008-02-25 Dan Winship <danw@gnome.org>
43 2008-02-25 Dan Winship <danw@gnome.org>
45 * docs/reference/Makefile.am (DOC_MODULE): rename from libsoup to
47 (TARGET_DIR): don't need to override this now
49 * docs/reference/libsoup-2.4.types:
50 * docs/reference/libsoup-2.4-docs.txt:
51 * docs/reference/libsoup-2.4-overrides.txt:
52 * docs/reference/libsoup-2.4-sections.txt: Rename these from
53 unversioned, to match DOC_MODULE
55 Fixes doc installation to work with devhelp again. #518384, Mart
58 2008-02-25 Benjamin Otte <otte@gnome.org>
60 * libsoup/soup-address.h:
61 * libsoup/soup-auth-domain.h:
62 * libsoup/soup-auth.h:
63 * libsoup/soup-message.h:
64 * libsoup/soup-server.h:
65 * libsoup/soup-session-async.h:
66 * libsoup/soup-session-sync.h:
67 * libsoup/soup-session.h:
68 * libsoup/soup-socket.h:
69 * libsoup/soup-types.h:
71 use an underscore for struct definitions. Fixes bug #518317.
73 2008-02-20 Sebastian Dröge <slomo@circular-chaos.org>
75 * libsoup.pc.in: Add gobject-2.0 and gio-2.0 to Requires.
76 Move libxml-2.0 and the SSL dependency to Requires.private
77 as no header is including them. Fixes bug #517631.
79 2008-02-11 Dan Winship <danw@gnome.org>
81 * configure.in: post-release bump to 2.3.3
83 2008-02-11 Dan Winship <danw@gnome.org>
86 (SOUP_CURRENT): bump for API changes
90 2008-02-09 Dan Winship <danw@gnome.org>
92 * Misc gtk-doc fix-ups
94 2008-02-09 Dan Winship <danw@gnome.org>
96 * libsoup/soup-misc.h: remove prototype for
97 soup_signal_connect_once, which is only used by soup-connection
98 now, and will go away once that code is rewritten.
100 * libsoup/soup-connection.c: prototype it here now (the definition
101 is still in soup-misc.c)
103 2008-02-09 Dan Winship <danw@gnome.org>
105 * libsoup/soup-auth-manager-ntlm.c: mark the DES magic number
108 * libsoup/soup-date.c (months, days): add an extra "const" to each
109 of these declarations, as one "const" is apparently not enough.
110 (soup_date_to_time_t): remove redundant copy of days_before array.
112 * libsoup/soup-dns.c (soup_dns_init): use g_once_init_enter/leave
114 * libsoup/soup-gnutls.c (soup_ssl_supported)
115 (soup_gnutls_channel_funcs): Mark these const
116 (soup_gnutls_init, init_dh_params): Use g_once_init_enter/leave
118 * libsoup/soup-status.c (reason_phrases): mark this const
120 * tests/ssl-test.c: Remove the workaround for soup_gnutls_init()
121 not being thread-safe, since it is now.
123 2008-02-08 Dan Winship <danw@gnome.org>
125 * libsoup/soup-message-headers.c (SoupMessageHeadersIter)
126 (soup_message_headers_iter_init, soup_message_headers_iter_next):
127 Add an iterator type for SoupMessageHeaders.
129 * libsoup/soup-message-client-io.c (get_request_headers):
130 * libsoup/soup-message-server-io.c (get_response_headers): Use
131 SoupMessageHeadersIter.
133 * libsoup/soup-logger.c (print_request, print_response): Use
134 SoupMessageHeadersIter. And take advantage of the simplification
135 to fix the kludge where 'direction' was stored as a field in
136 SoupLoggerPrivate rather than being an argument to
139 * tests/get.c (get_url):
140 * tests/header-parsing.c (check_headers):
141 * tests/simple-httpd.c (server_callback): Use
142 SoupMessageHeadersIter
144 2008-02-06 Dan Winship <danw@gnome.org>
146 * libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
147 auth domain when adding it.
149 * tests/continue-test.c (setup_server):
150 * tests/server-auth-test.c (main): Add unrefs here to avoid
153 2008-02-06 Dan Winship <danw@gnome.org>
155 * libsoup/soup-message.c (soup_message_set_chunk_allocator): New
156 method that lets the application set a callback function to use to
157 allocate SoupBuffers for reading into, so as to avoid needing
160 * libsoup/soup-message-body.c (soup_buffer_new_with_owner): new,
161 to create a SoupBuffer pointing to memory owned by another object,
162 with a GDestroyNotify to unref/free that object when the
164 (soup_buffer_get_owner): Returns the owner of a buffer created
165 with soup_buffer_new_with_owner.
166 (soup_buffer_free, etc): update SoupBuffer code for owned buffers.
168 Suggested by Wouter Cloetens, #513810.
170 * tests/simple-httpd.c (do_get): Use mmap() and
171 soup_buffer_new_with_owner(), as a demo/test.
173 2008-02-06 Dan Winship <danw@gnome.org>
175 * libsoup/soup-date.c (soup_date_to_time_t): clamp the result to
176 the time_t range, and document that. Remove the #ifdef HAVE_TIMEGM
179 * configure.in: remove check for timegm
181 2008-02-04 Dan Winship <danw@gnome.org>
183 * libsoup/Makefile.am: Fix the handling of soup-enum-types.h to
184 ensure that it gets built before the things that depend on it.
186 2008-02-03 Benjamin Otte <otte@gnome.org>
188 * libsoup/soup-socket.c: update documentation to new API
190 2008-02-02 Dan Winship <danw@gnome.org>
192 * libsoup/soup-session.c: fix default connections-per-host again;
193 it was defined in two places. Add SOUP_SESSION_USER_AGENT property
194 (setup_message): set the User-Agent request header on the request
196 * libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property
197 (start_request): set the Server response header on the request.
200 * tests/simple-httpd.c: set the User-Agent/Server headers
202 2008-02-02 Dan Winship <danw@gnome.org>
204 * libsoup/soup-headers.c (soup_headers_parse_request): if the
205 request headers contain an unrecognized Expect: header, return
206 SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers
207 in HTTP/1.0 messages as required by 2616 14.10.
208 (soup_headers_parse_response): Likewise handle Connection headers
211 * tests/header-parsing.c: test those things
213 2008-02-02 Dan Winship <danw@gnome.org>
215 * libsoup/soup-session.c (redirect_handler): Misc fixes: don't
216 redirect on "300 Multiple Choices", "304 Not Modified", "305 Use
217 Proxy", or any unrecognized status code. Don't redirect unsafe
218 methods on 301, 302, or 307. Redirect POST to GET on 303.
220 * tests/redirect-test.c: test of redirection handling behavior.
222 2008-02-02 Dan Winship <danw@gnome.org>
224 * libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that
225 direct comparisons against them actually *are* faster than doing
226 strcmp, as the docs claim.
228 * libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP,
229 SOUP_URI_SCHEME_HTTPS): likewise
231 2008-02-01 Dan Winship <danw@gnome.org>
233 * libsoup/soup-address.c: Use GObject properties.
234 (soup_address_new, soup_address_new_from_sockaddr)
235 (soup_address_new_any): Make these just wrappers around
238 * libsoup/soup-message-body.c (soup_message_body_get_type):
239 * libsoup/soup-message-headers.c (soup_message_headers_get_type):
240 * libsoup/soup-server.c (soup_client_context_get_type):
241 Register these as boxed types, for language bindings.
243 * libsoup/soup-date.c (soup_date_get_type):
244 * libsoup/soup-message-body.c (soup_buffer_get_type):
245 * libsoup/soup-value-utils.c (soup_byte_array_get_type):
246 * libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest
247 yummiest type-registering idiom.
249 2008-02-01 Dan Winship <danw@gnome.org>
251 * libsoup/soup-connection.c (soup_connection_disconnect):
252 Reorganize this; emitting DISCONNECTED may cause the session to
253 unref the connection, causing it to be destroyed, so do everything
254 else before that. #437835 and dups. Also, call
255 soup_message_cleanup_response() when requeuing an IO_ERROR-ed
256 message, so soup_session_send_message() will requeue it rather
257 than treating it as failed.
259 * docs/reference/Makefile.am (TARGET_DIR): override this to
260 include the API version, to fix the last remaining parallel
261 install issue between libsoup 2.2 and 2.4. #512810, Daniel
264 * tests/query-test.c (do_test): don't use "stdout" as a variable
265 name; it's allowed to be a macro (and it is one on Solaris).
266 #513602, patch from Jeff Cai.
268 2008-01-31 Dan Winship <danw@gnome.org>
270 * libsoup/soup-date.c (soup_date_to_time_t): new
272 * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded"
273 from name. (And add back-compat #define.)
274 (soup_form_encode): New, takes varargs parameters for each form
276 (soup_form_encode_hash, soup_form_encode_datalist): renamed, with
278 (soup_form_request_new, soup_form_request_new_from_hash)
279 (soup_form_request_new_from_datalist): New methods to construct a
280 GET or POST message with form data.
282 * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes
283 varargs like soup_form_encode().
285 * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals)
286 (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New
287 routines to work with multiple value hash values at once.
288 (soup_value_array_new): tiny wrapper, for naming consistency
289 (soup_value_array_new_with_vals, soup_value_array_append_vals):
290 New routines to work with multiple value array values at once.
292 2008-01-28 Dan Winship <danw@gnome.org>
294 * configure.in: post-release bump to 2.3.1
296 2008-01-28 Dan Winship <danw@gnome.org>
298 * configure.in: Bump version to 2.3.0.1
302 * docs/reference/Makefile.am (content_files): include
305 2008-01-28 Dan Winship <danw@gnome.org>
307 * libsoup/soup-message.c (soup_message_set_auth)
308 (soup_message_set_proxy_auth): Use soup_message_headers_replace(),
309 not soup_message_headers_append(), since only a single
310 Authorization/Proxy-Authorization header is allowed. #512517.
312 * libsoup/soup-auth-manager-ntlm.c (ntlm_request_started): Don't
313 set an NTLM Authorization header if the message already has a
316 * tests/ntlm-test.c: Add some Basic auth and mixed NTLM/Basic auth
319 2008-01-28 Wouter Bolsterlee <wbolster@svn.gnome.org>
321 * docs/reference/libsoup-docs.sgml:
323 Changed section titles so that they actually show
324 something useful in DevHelp.
326 2008-01-27 Dan Winship <danw@gnome.org>
328 * libsoup/soup-dns.c (resolver_thread): fix mutex use to avoid a
331 * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_faultv):
332 (soup_xmlrpc_set_response, soup_xmlrpc_set_fault):
333 (soup_xmlrpc_parse_method_call): Fix misc server-side stuff
334 (soup_xmlrpc_parse_method_response): Fix fault parsing
336 * libsoup/soup-xmlrpc.h (SoupXMLRPCFault): add semi-standard fault
338 http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
340 * tests/xmlrpc-server.php (sum): return a <fault> if the arguments
341 are wrong (so that xmlrpc-test can test that case).
342 (dateChange): change to take two parameters, a date and a struct,
343 instead of putting the date in the struct, since we weren't
344 previously testing multiple parameter handling.
346 * tests/xmlrpc-test.c (main): Add a -u flag to specify an
348 (do_xmlrpc): Remove level 3 debug output, which is now redundant
349 with the SoupLogger stuff.
350 (test_dateChange): update for dateChange prototype change
351 (test_fault_malformed, test_fault_method, test_fault_args): test
354 * tests/xmlrpc-server-test.c: Test the server-side XML-RPC API (by
355 implementing the same methods as xmlrpc-server.php and then
358 2008-01-27 Dan Winship <danw@gnome.org>
360 * libsoup/soup-headers.c (soup_header_parse_quality_list): fix to
361 not sometimes read beyond the end of the string.
363 * libsoup/soup-message-body.c (soup_message_body_append): When
364 appending a 0-length SOUP_MEMORY_TAKE buffer, we need to free the
365 passed-in buffer rather than just ignoring it.
367 * libsoup/soup-message-headers.c (soup_message_headers_free): Fix
368 leak introduced by patch for 511980.
370 * libsoup/soup-server.c (got_headers): fix leak when decoding path
372 * libsoup/soup-session.c (finalize): free ntlm_manager
374 * tests/libsoup.supp: update for libsoup 2.4, glib 2.14, etc
376 * tests/header-parsing.c (do_qvalue_tests):
377 * tests/uri-parsing.c (main): more cleanup
379 2008-01-27 Dan Winship <danw@gnome.org>
381 * libsoup/soup-logger.c (soup_logger_attach): Fix session ids by
382 using weak refs for the logger cleanup rather than trying to use
383 the same qdata for two different things.
384 (print_request, print_response): use full type names in the
385 Soup-Debug line, since SoupSessionSync and SoupSessionAsync get
388 2008-01-27 Dan Winship <danw@gnome.org>
390 * libsoup/soup-session-async.c (final_finished): Don't run the
391 queue again if the callback destroyed the session. #511868, Stef
394 2008-01-25 Srinivasa Ragavan <sragavan@novell.com>
396 ** Fix for bug #511980
398 * libsoup/soup-message-headers.c: (soup_message_headers_clear):
399 Instead of destroying the hashtable, just remove the contents of the
402 2008-01-23 Tor Lillqvist <tml@novell.com>
404 * configure.in: Allow autogening even without AM_PATH_LIBGCRYPT
407 * libsoup/soup-date.c (soup_date_new_from_time_t): Correct use of
410 * libsoup/soup-headers.c (soup_headers_parse_status_line): Return
411 FALSE if neither HTTP nor ICY. Avoids crash in
412 tests/header-parsing.
414 * libsoup/soup-socket.c: On Windows SHUT_RDWR is called SD_BOTH.
415 (set_nonblocking): Fix typo.
417 * tests/continue-test.c: Seems to build fine without <pthread.h>,
420 2008-01-18 Dan Winship <danw@gnome.org>
422 * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH
424 2008-01-18 Dan Winship <danw@gnome.org>
426 * configure.in: require glib 2.15.3, not 2.15.0, since
427 AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
428 out by Matthew Barnes, #510216.
430 2008-01-18 Dan Winship <danw@gnome.org>
432 * libsoup/soup-auth-domain.c
433 (soup_auth_domain_set_generic_auth_callback):
434 (soup_auth_domain_check_password): add a new generic auth callback
435 that can be used with any subclass to do cleartext password
436 checking against messages. Suggested by Mathias Hasselmann.
438 * libsoup/soup-auth-domain-basic.c: Implement generic auth
440 * libsoup/soup-auth-domain-digest.c: Implement generic auth.
441 (soup_auth_domain_digest_evil_check_password): Gone, use the
444 2008-01-17 Dan Winship <danw@gnome.org>
446 * libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
447 (soup_auth_digest_compute_hex_a1)
448 (soup_auth_digest_compute_response): cast the second arg to
449 g_checksum_update to (guchar *) to avoid warnings
451 2008-01-16 Dan Winship <danw@gnome.org>
453 * libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
454 with Shoutcast servers, which return "ICY 200 OK", but are
455 otherwise straight HTTP/1.0. #502325, Wouter Cloetens.
457 * tests/header-parsing.c (resptests): add a test for it
459 2008-01-16 Dan Winship <danw@gnome.org>
461 * libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
462 session authenticate signal to be handled asynchronously, by
463 pausing the message and then authenticating the auth later.
464 (auth_type_compare_func): make this work. oops.
465 (extract_challenge): plug leak
467 * libsoup/soup-auth-manager-ntlm.c: Make this work async too.
469 * libsoup/soup-headers.c (soup_header_parse_list):
470 (soup_header_parse_param_list): plug leaks
472 * tests/auth-test.c (do_async_auth_test): test async auth
474 * docs/reference/client-howto.xml (Handling Authentication):
477 2008-01-16 Dan Winship <danw@gnome.org>
479 * configure.in: Bomb out if glib 2.15.0 isn't found.
480 (AM_PATH_GLIB_2_0 doesn't do this itself.)
482 2008-01-15 Dan Winship <danw@gnome.org>
484 * libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
485 now works as a SoupSession::request_started watcher.
487 * libsoup/soup-connection.c: remove the no-longer-needed
488 "authenticate" signal
490 * libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
491 set. Remove connection-authenticate-signal references.
493 2008-01-15 Dan Winship <danw@gnome.org>
495 * Merge libsoup-2.4 branch to trunk
497 2008-01-15 Dan Winship <danw@gnome.org>
499 * libsoup/soup-dns.c (resolve_status): Fix the logic here
501 2008-01-15 Dan Winship <danw@gnome.org>
503 * docs/reference/porting-2.2-2.4.xml: add a few more updates
505 2008-01-15 Dan Winship <danw@gnome.org>
507 * libsoup/soup-auth-digest.c: Use GChecksum for MD5
509 * libsoup/soup-md5-utils.[ch]: gone
511 2008-01-15 Dan Winship <danw@gnome.org>
513 * libsoup/soup-server.c (soup_server_run_async):
514 (soup_server_quit): Don't ref/unref the server here. It doesn't
515 match the way other things work. #494128, Mathias Hasselmann.
517 2008-01-14 Dan Winship <danw@gnome.org>
519 * libsoup/soup-address.h:
520 * libsoup/soup-auth-domain-basic.h:
521 * libsoup/soup-auth-domain-digest.h:
522 * libsoup/soup-auth-domain.h:
523 * libsoup/soup-auth.h:
524 * libsoup/soup-logger.h:
525 * libsoup/soup-message.h:
526 * libsoup/soup-server.h:
527 * libsoup/soup-session-async.h:
528 * libsoup/soup-session-sync.h:
529 * libsoup/soup-session.h:
530 * libsoup/soup-socket.h: Add padding for future expansion to class
533 2008-01-14 Dan Winship <danw@gnome.org>
535 * libsoup/soup-uri.c: Add more documentation.
536 (soup_uri_is_https): gone, replaced by SOUP_URI_SCHEME_HTTP /
537 SOUP_URI_SCHEME_HTTPS
538 (soup_uri_new): allow passing NULL to get back an "empty" SoupURI.
539 (soup_uri_to_string): rename just_path to just_path_and_query, to
540 avoid fooling people.
541 (soup_uri_decode, soup_uri_normalize): Change these to return the
542 decoded/normalized string rather than modifying it in place.
543 (soup_uri_set_scheme, etc): provide setters for SoupURI parts.
544 (soup_uri_set_query_from_form): set uri->query via
545 soup_form_encode_urlencoded().
547 2008-01-14 Dan Winship <danw@gnome.org>
549 * configure.in: require glib 2.15.0, and gio
551 * libsoup/soup-dns.c (soup_dns_lookup_resolve)
552 (soup_dns_lookup_resolve_async): Add GCancellables, and support
553 cancellation of DNS lookups.
554 (resolve_address, resolve_name): If we get a DNS failure (eg,
555 because we're disconnected from the network), don't cache that
556 result, just try again next time someone asks. [#508593]
558 * libsoup/soup-address.c (soup_address_resolve_async)
559 (soup_address_resolve_sync): Add GCancellables, pass them to
562 * libsoup/soup-socket.c (soup_socket_connect_async)
563 (soup_socket_connect_sync): Add GCancellables and implement
565 (soup_socket_start_ssl, soup_socket_start_proxy_ssl)
566 (soup_socket_read, soup_socket_read_until, soup_socket_write): add
567 GCancellables, though these routines don't actually implement
569 (soup_socket_disconnect): Don't close() the socket if someone is
570 doing I/O on it, as that creates a race condition. (The fd number
571 might be quickly recycled.) Instead, keep the socket open but
572 dead, via shutdown().
574 2008-01-14 Benjamin Otte <otte@gnome.org>
576 * libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for
577 new-connection signal.
579 2008-01-14 Dan Winship <danw@gnome.org>
581 * tests/test-utils.c: renamed from apache-wrappers and expanded.
582 (test_init): do option parsing and general setup
583 (test_cleanup): print error count and do cleanup
584 (debug_printf): define here rather than in each test, and rename
585 from dprintf [#501631]
586 (soup_test_server_new): create a SoupServer, optionally in its own
587 thread, and clean it up when exiting.
588 (soup_test_session_new): create a SoupSession, optionally with
589 an attached SoupLogger (if requested via command line)
591 * tests/*.c: use test-utils
593 2008-01-13 Dan Winship <danw@gnome.org>
595 * libsoup/soup-logger.c: New HTTP debug logging object. (Based on
596 E2K_DEBUG and its clones.)
598 * libsoup/soup-message.c (soup_message_class_init)
599 (soup_message_add_header_handler)
600 (soup_message_add_status_code_handler): Change things around a
601 little; remove the "requeuing or cancelling the message stops
602 signal emission" rule, and instead make that be a feature of just
603 the header and status code handlers. (Makes the basic signal
604 handlers behave more predictably.)
606 2008-01-11 Dan Winship <danw@gnome.org>
608 * libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
609 * libsoup/soup-auth-domain-basic.c
610 (soup_auth_domain_basic_set_auth_callback):
611 * libsoup/soup-auth-domain-digest.c
612 (soup_auth_domain_digest_set_auth_callback):
613 * libsoup/soup-message.c (soup_message_cleanup_response)
614 (soup_message_set_flags, soup_message_set_http_version)
615 (soup_message_set_uri, soup_message_set_status)
616 (soup_message_set_status_full):
617 * libsoup/soup-message-client-io.c (parse_response_headers):
618 * libsoup/soup-message-server-io.c (parse_request_headers):
619 Call g_object_notify() when changing properties.
621 * libsoup/soup-session.c (soup_session_class_init): bump the
622 default value of SOUP_SESSION_MAX_CONNS_PER_HOST down to 2, per
625 * libsoup/soup-message-body.c (soup_buffer_copy): When copying a
626 TEMPORARY buffer, keep a reference to the copy, so that a second
627 copy will get that same buffer, rather than actually copying it
630 * libsoup/soup-types.h: remove SoupMessageFilter, which doesn't
633 2008-01-07 Dan Winship <danw@gnome.org>
635 * libsoup/soup-session.c (soup_session_class_init): Change
636 request_started signal to have a SoupSocket as its last parameter.
638 * libsoup/soup-server.c: Fix request_* signals to all be (server,
639 msg, client) rather than (server, client, msg).
641 2008-01-07 Dan Winship <danw@gnome.org>
643 * docs/reference/porting-2.2-2.4.xml: Notes on porting from 2.2 to
646 2008-01-07 Dan Winship <danw@gnome.org>
648 * libsoup/*.c: Move gtk-doc stuff from docs/reference/tmpl/ to the
649 C files themselves. Some updates.
651 * docs/reference/Makefile.am: fix (kludge?) this up to not require
654 * docs/reference/client-howto.xml:
655 * docs/reference/server-howto.xml: update
657 2008-01-06 Dan Winship <danw@gnome.org>
659 * libsoup/soup-soap-message.c:
660 * libsoup/soup-soap-response.c: For the second time, remove SOAP
661 support from libsoup... These APIs are not really all that helpful
662 in the grand scheme of SOAPiness, and are only used by the
663 Evolution GroupWise backend, which can just import this code and
664 integrate it better there.
666 * libsoup/soup-misc.c (soup_xml_real_node):
667 * libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
668 to soup-xmlrpc, and make it private. libxml is no longer exposed
671 2008-01-06 Dan Winship <danw@gnome.org>
673 * libsoup/soup-date.c (soup_date_new_from_now): new method to
674 generate a date relative to now.
675 (soup_date_new, etc): document SoupDate methods
677 * libsoup/soup-server.c (got_headers): set Date header, as
680 2008-01-06 Dan Winship <danw@gnome.org>
682 * libsoup/soup-server.c (got_headers): if raw_paths isn't set,
683 decode the request's uri->path before doing anything else
684 (soup_server_class_init): add "raw-paths" property, to tell
685 SoupServer to NOT decode the Request-URI path.
687 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): Revert
688 earlier path-decoding change; that happens at the SoupServer level
691 2008-01-06 Dan Winship <danw@gnome.org>
693 * libsoup/soup-message-body.c (soup_buffer_get_type): Register
694 SoupBuffer as a boxed type.
696 * libsoup/soup-message.c (soup_message_class_init): Use
697 SOUP_TYPE_BUFFER in got_chunk signal definition
699 * libsoup/soup-server.c (soup_client_context_get_type): Register
700 SoupClientContext as a pointer type
701 (soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
704 * libsoup/soup-marshal.list: clean this up
706 2008-01-06 Dan Winship <danw@gnome.org>
708 * libsoup/soup-server.c (SoupClientContext): Make this opaque.
709 (soup_client_context_get_socket)
710 (soup_client_context_get_auth_domain)
711 (soup_client_context_get_auth_user): New accessors
712 (soup_server_class_init): Make the signals take a
713 SoupClientContext rather than a SoupSocket.
714 (start_request, check_auth, call_handler, request_finished): Clean
715 these up by using a SoupClientContext to communicate between them.
716 (soup_server_add_handler): tweak the argument order to match the
717 gtk standard (callback, user_data, destroynotify).
719 2008-01-06 Dan Winship <danw@gnome.org>
721 * libsoup/soup-address.c: remove the "dns_result" signal, which
722 was just an implementation detail of soup_address_resolve_async().
724 2008-01-06 Dan Winship <danw@gnome.org>
726 * libsoup/*.c: misc documentation updates/gtk-doc fixes
728 * libsoup/soup-server.c: finally start documenting this properly.
730 * libsoup/soup-status.h (SoupStatusClass): kill this, since
731 soup_message_add_status_class_handler() is gone now.
733 * libsoup/soup-status.c (soup_status_get_phrase): Update docs to
734 explain that you probably don't want to use this.
736 * libsoup/soup-misc.h (SOUP_SSL_ERROR, SoupSSLError): Move these
737 here, since soup-ssl.h isn't installed.
739 * docs/references: start updating this...
741 2008-01-04 Dan Winship <danw@gnome.org>
743 * libsoup/soup-message-body.c (soup_buffer_new)
744 (soup_message_body_append): Reorder the arguments to match
745 soup_message_set_request/response, so it's not confusing.
747 * libsoup/soup-message.c (wrote_chunk): remove the "chunk" arg
748 from the signal, as it turns out to be *in*convenient, since most
749 callers use this signal to mean "need another chunk", so they want
750 it to have the same prototype as "wrote_headers", which means
753 2008-01-04 Dan Winship <danw@gnome.org>
755 * libsoup/soup-auth-domain.c: add documentation
756 (soup_auth_domain_set_filter): take a GDestroyNotify, for better
759 * libsoup/soup-auth-domain-basic.c:
760 * libsoup/soup-auth-domain-digest.c: Add documentation. Replace
761 authentication signals with more-easily-bindable authentication
762 callbacks (with GDestroyNotifys).
763 (soup_auth_domain_digest_evil_check_password): Add this for the
764 benefit of code that depends on being able to do the equivalent
765 of the old soup_server_auth_check_passwd().
767 2008-01-02 Dan Winship <danw@gnome.org>
769 * libsoup/soup-message-body.h (SoupMessageBody): add data and
770 length parameters like SoupBuffer, to make this easier for callers
773 * libsoup/soup-message-body.c (soup_message_body_append)
774 (soup_message_body_append_buffer)
775 (soup_message_body_truncate): Update body->length
776 (soup_message_body_flatten): Fill in body->data (and NUL-terminate
777 it as an added bonus).
779 * libsoup/soup-message.c (got_body): flatten the newly-gotten
781 (soup_message_get_request, soup_message_get_response): gone
783 * libsoup/soup-message-client-io.c (get_request_headers):
784 * libsoup/soup-message-server-io.c (get_response_headers):
785 * libsoup/soup-soap-message.c (soup_soap_message_parse_response):
786 * tests/*.c: simplify
788 2008-01-02 Dan Winship <danw@gnome.org>
790 * libsoup/Makefile.am (soup_headers): oops, move soup-auth.h here
792 2008-01-02 Dan Winship <danw@gnome.org>
794 * libsoup/soup-form.c: new HTML-form-related methods (just URI
795 decoding/encoding at the moment).
797 * libsoup/soup-server.h (SoupServerCallback): change the prototype
798 to include the decoded path and query rather than the undecoded
801 * libsoup/soup-server.c (call_handler): %-decode the URI path
802 before looking up a handler. Decode query if available. Pass path
803 and query to the callback.
805 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): fix this
806 to %-decode the URI path before testing it
808 * libsoup/soup-message-body.c (soup_message_body_append): allow
811 * tests/query-test.c: URI query parsing test
813 2008-01-02 Dan Winship <danw@gnome.org>
815 * libsoup/soup-uri.c:
816 * libsoup/soup-uri.h: Change all the "const SoupURI *" to just
817 "SoupURI *", since the const is just there to be annoying.
821 2008-01-02 Dan Winship <danw@gnome.org>
823 * libsoup/soup-message-body.c (soup_message_body_get_length)
824 (soup_message_body_get_chunk): Use goffset rather than gsize for
825 references to the entire size of the message body. (SoupBuffer
826 still uses gsize, so individual chunks can only be G_MAXSIZE
829 * libsoup/soup-message-headers.c
830 (soup_message_headers_get_content_length):
831 (soup_message_headers_set_content_length): Likewise, use goffset.
833 2008-01-02 Dan Winship <danw@gnome.org>
835 * libsoup/soup-message-headers.c (soup_message_headers_get):
836 Renamed from soup_message_headers_find, and with new behavior; now
837 multiple headers with the same name are automatically merged
838 together into a single comma-separated value, to ensure that apps
839 treat multivalued headers the same regardless of how upstream
840 servers generate them.
841 (soup_message_headers_find_nth): no longer needed/wanted
843 * libsoup/soup-auth-manager.c: Update to deal with
844 SoupMessageHeaders change. (Ugh.)
846 * tests/header-parsing.c: Update multiple-values test, and undo a
847 change that mistakenly got committed while debugging something
850 2008-01-01 Dan Winship <danw@gnome.org>
852 * libsoup/soup-auth-manager.c:
853 * libsoup/soup-dns.c:
854 * libsoup/soup-gnutls.c:
855 * libsoup/soup-message.c:
856 * libsoup/soup-message-io.c:
857 * libsoup/soup-message-queue.c:
858 * libsoup/soup-misc.c:
859 * libsoup/soup-path-map.c:
860 * libsoup/soup-server.c:
861 * libsoup/soup-session.c:
862 * libsoup/soup-session-sync.c:
863 * libsoup/soup-socket.c: Use g_slice.
865 2008-01-01 Dan Winship <danw@gnome.org>
867 * libsoup/soup-session.c (soup_session_cancel_message): add a
868 "status_code" argument rather than having the caller set the
869 status code separately, to prevent a race condition.
871 2008-01-01 Dan Winship <danw@gnome.org>
873 * libsoup/soup-session.c (soup_session_queue_message): change the
874 callback type to include the SoupSession as a parameter as well.
878 2007-12-31 Dan Winship <danw@gnome.org>
880 * libsoup/soup-session.c (soup_session_class_init): change
881 the "authenticate" signal to include a SoupAuth rather than its
882 components, and to have a "retrying" parameter rather than
883 separating "authenticate" and "reauthenticate".
885 * libsoup/soup-connection.c (soup_connection_class_init): Likewise
887 * libsoup/soup-auth-manager.c (authenticate_auth): update
889 * libsoup/soup-auth.c: make various attributes into gobject
891 (soup_auth_is_for_proxy): check whether an auth is plain or proxy
892 (soup_auth_get_host): get the hostname associated with an auth
894 * libsoup/soup-auth-ntlm.c: dummy class used by SoupConnectionNTLM
895 in the authenticate signal
897 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): update for
898 authenticate signals changes; use a fake SoupAuthNTLM to assist.
900 2007-12-20 Dan Winship <danw@gnome.org>
902 * libsoup/soup-message.c (soup_message_add_header_handler)
903 (soup_message_add_status_code_handler): Make these be wrappers
904 around g_signal_connect() rather than having a completely separate
906 (soup_message_class_init): improve signal docs. Use
907 "got_foo_signal_wrapper" to wrap the got-foo signals.
908 (got_foo_signal_wrapper): Wraps the marshaller for the got-foo
909 signals and cancels the signal emission if the message gets
910 cancelled or requeued.
911 (got_informational, got_headers, got_chunk, got_body): remove
912 no-longer-needed default implementations.
914 * libsoup/soup-message-handlers.c: gone
916 * tests/ntlm-test.c (do_message): Simplify now that callback
917 processing doesn't happen in two separate phases.
919 2007-12-20 Dan Winship <danw@gnome.org>
921 * libsoup/soup-auth-domain.c:
922 * libsoup/soup-auth-domain-basic.c:
923 * libsoup/soup-auth-domain-digest.c: New server-side auth system.
925 * libsoup/soup-server.c: remove SoupServerAuth / SoupAuthContext
926 stuff, add SoupAuthDomain support.
927 (SoupServerCallbackFn): improve the args here
928 (SoupClientContext): renamed from SoupServerContext and made less
931 * libsoup/soup-server-auth.c: gone!
933 * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm)
934 (soup_auth_digest_get_algorithm, soup_auth_digest_parse_qop)
935 (soup_auth_digest_get_qop, soup_auth_digest_compute_hex_urp)
936 (soup_auth_digest_compute_hex_a1)
937 (soup_auth_digest_compute_response): New routines shared between
938 client-side and server-side digest auth.
940 * tests/server-auth-test.c: test server-side auth, using curl for
943 * configure.in: check for curl, for server-auth-test
945 2007-12-20 Dan Winship <danw@gnome.org>
947 * libsoup/soup-headers.c (soup_header_parse_list)
948 (soup_header_parse_quality_list): New methods to parse list-type
949 headers (with optional qvalues) correctly.
950 (soup_header_parse_param_list): Rename to match the other methods,
951 and update the semantics a bit.
952 (soup_header_contains): Correctly check for a token in a list
954 * libsoup/soup-message.c (soup_message_is_keepalive):
955 * libsoup/soup-message-client-io.c (get_request_headers):
956 * libsoup/soup-message-server-io.c (parse_request_headers): Use
957 soup_header_contains() with Connection headers.
959 * tests/header-parsing.c (do_qvalue_tests): add
960 soup_header_parse_quality_list() test
962 2007-12-20 Dan Winship <danw@gnome.org>
964 * libsoup/soup-auth-manager.c: Move auth-related code from
965 SoupSession and SoupAuth here, and make various cleanups and
966 beginnings of cleanups.
968 * libsoup/soup-session.c: lots of stuff moved to
971 * libsoup/soup-auth.c (soup_auth_new_from_headers): partly moved
972 to soup-auth-manager.c, partly renamed to soup_auth_new().
973 (soup_auth_update): new method to update an existing auth based on
974 a new WWW-Authenticate/Proxy-Authenticate header. Also replaces
975 the old "construct" method.
977 * libsoup/soup-auth-digest.c (update): Implement. If the new auth
978 has stale=true, don't invalidate the auth, just update the nonce.
979 (get_authorization): add a header handler to the message to catch
980 Authentication-Info/Proxy-Authentication-Info headers so that if
981 there's a nextnonce, we can start using it. #471380.
983 * libsoup/soup-auth-basic.c (update): Implement. (Updating an
984 existing Basic auth always invalidates it.)
986 * tests/http.conf.in:
987 * tests/auth-test.c: add a test for digest nonce handling
989 2007-12-20 Dan Winship <danw@gnome.org>
991 * libsoup/soup-path-map.c: New type representing a sparse
992 path->something mapping
994 * libsoup/soup-server.c: Use SoupPathMap to record handlers. Make
995 SoupServerHandler a private type.
996 (soup_server_new): Rewrite this to just be a thin wrapper, and put
997 all of the code into a constructor override. #491653
998 (soup_server_add_handler): Turn the "unregister" arg into a
999 GDestroyNotify, for better bindability.
1001 2007-12-19 Dan Winship <danw@gnome.org>
1003 * libsoup/soup-server.c: define new request_started, request_read,
1004 request_finished, and request_aborted signals, for finer-grained
1005 tracking than normal handlers allow.
1006 (check_auth): split this out of call_handler, and run it
1007 immediately after "got_headers", not "got_body", so that we can
1008 preemptively reject "Expect: 100-continue" messages that will
1011 * libsoup/soup-message-io.c (io_write, io_read): Fix up
1012 100-continue processing
1014 * tests/continue-test.c: new test of client/server 100-continue
1017 2007-12-19 Dan Winship <danw@gnome.org>
1019 * libsoup/soup-socket.c: Cleanup. Remove the "connect_result"
1020 signal. Make local_address and remote_address
1021 into (construct-only) properties.
1022 (soup_socket_connect_async, soup_socket_connect_sync): Replace
1023 soup_socket_connect. _async takes a callback+user_data (like the
1024 old soup_socket_client_new_async), but doesn't implement the
1025 callback in terms of a connect_result signal.
1026 (soup_socket_client_new_async, soup_socket_client_new_sync): Gone.
1027 (Unused since the async_context addition anyway). Replaced by the
1028 new construct properties and connect methods.
1029 (soup_socket_read, soup_socket_read_until, soup_socket_write):
1030 Make these actually take a GError rather than doing an ugly hack
1031 to preserve the old API.
1032 (SOUP_SOCKET_FLAG_NODELAY, SOUP_SOCKET_FLAG_REUSEADDR)
1033 (SOUP_SOCKET_FLAG_CLOEXEC): kill these off (all three are always
1034 TRUE now); SoupSocket is libsoup's socket API; it's not
1035 necessarily intended to be generically useful for everyone.
1037 * *.c: Update for SoupSocket changes
1039 2007-12-19 Dan Winship <danw@gnome.org>
1041 * libsoup/soup-server-message.c: Kill!
1043 * libsoup/soup-message-server-io.c (parse_request_headers):
1044 Generate the full request URL from the socket's data, since we no
1045 longer have soup_server_message_get_server().
1047 * libsoup/soup-server.c (request_finished, call_handler)
1048 (start_request, new_connection): update
1050 2007-12-19 Dan Winship <danw@gnome.org>
1052 * libsoup/soup-message-headers.c: Add some more fields to
1053 SoupMessageHeaders, and start caching the parsed values of certain
1055 (soup_message_headers_get/set_encoding): replaces old SoupMessage
1056 methods, and only deals with the declared transfer encoding, not
1058 (soup_message_headers_get/set_content_length): Handle
1060 (soup_message_headers_get_expectations): Handle Expect. (Replaces
1061 the SOUP_MESSAGE_EXPECT_CONTINUE flag).
1063 * libsoup/soup-message.c (soup_message_get_request_encoding):
1064 (soup_message_get_response_encoding):
1065 (soup_message_set_response_encoding): replaced by
1066 SoupMessageHeaders methods.
1068 * libsoup/soup-message-client-io.c:
1069 * libsoup/soup-message-server-io.c:
1070 * libsoup/soup-message-io.c: Update for SoupMessageHeaders changes
1071 with encoding/content-length stuff.
1073 2007-12-19 Dan Winship <danw@gnome.org>
1075 * libsoup/soup-message-body.c (SoupMessageBody): new opaque type
1076 for request/response bodies allowing less hacky handling of
1078 (SoupBuffer): refcounted buffer type
1080 * libsoup/soup-message.h (SoupMessage): turn request and response
1081 members into SoupMessageBody.
1082 (SoupOwnership, SoupDataBuffer): gone, replaced by
1083 SoupMessageBody/SoupBuffer.
1085 * libsoup/soup-message.c (soup_message_wrote_chunk)
1086 (soup_message_got_chunk): add the chunk as a signal param rather
1087 than having it be visible in msg->request/response.
1088 (soup_message_add_chunk, soup_message_add_final_chunk)
1089 (soup_message_pop_chunk): replaced by SoupMessageBody methods now.
1091 2007-12-19 Dan Winship <danw@gnome.org>
1093 * libsoup/soup-xmlrpc.c:
1094 * libsoup/soup-value-utils.c: Oops. Change the API a bunch so this
1095 works on x86; apparently I was doing illegal things with va_lists
1096 before that only work on x86_64.
1098 2007-12-14 Dan Winship <danw@gnome.org>
1100 * libsoup/soup-message.c: use GObject properties for SoupMessage
1103 * libsoup/soup-message-server-io.c:
1104 * libsoup/soup-soap-message.c: update for that
1106 2007-12-14 Dan Winship <danw@gnome.org>
1108 * libsoup/soup-uri.c: Rename from SoupUri to SoupURI. Use the
1109 slice allocator and register as a boxed type.
1110 (SoupURI): Rename "protocol" field to "scheme" and "passwd" to
1111 "password". Make scheme an interned string. Replace
1112 SOUP_PROTOCOL_HTTPS with soup_uri_is_https().
1116 2007-12-14 Dan Winship <danw@gnome.org>
1118 * libsoup/Makefile.am: Use glib-mkenums to build soup-enum-types.c
1119 and soup-enum-types.h
1121 * libsoup/soup-address.h (SoupAddressFamily): redo this definition
1122 again, to make glib-mkenums happy.
1124 2007-12-13 Dan Winship <danw@gnome.org>
1126 * libsoup/soup-xmlrpc.c: New easier-to-use and
1127 easier-to-do-language-bindings-of XML-RPC code.
1129 * libsoup/soup-xmlrpc-message.c:
1130 * libsoup/soup-xmlrpc-response.c: gone
1132 * libsoup/soup-value-utils.c: Utilites for working with
1133 GValueArray, and GHashTables of GValues, used by soup-xmlrpc.
1136 * tests/xmlrpc-test.c: Update to use new XML-RPC stuff
1138 2007-12-13 Dan Winship <danw@gnome.org>
1140 * libsoup/soup-date.c: Make a SoupDate type, and redo in terms of
1141 that rather than struct tm and time_t. Also be much more liberal
1144 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_write_datetime):
1145 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_datetime):
1148 * tests/date.c: Use SoupDate, test parsing lots more formats
1150 * tests/xmlrpc-test.c: update for SoupDate
1152 2007-12-12 Dan Winship <danw@gnome.org>
1154 * libsoup/soup-message.c:
1155 * libsoup/soup-message-private.h: Remove SoupMessageStatus,
1156 msg->status, and soup_message_io_* from the public API, as they
1157 all really belong to the session, not the message. (For now
1158 they've just been moved to soup-message-private.h, but some day
1159 they'll be fully refactored away from SoupMessage.)
1161 * libsoup/soup-server.c (soup_server_pause_message)
1162 (soup_server_unpause_message):
1163 * libsoup/soup-session.c (soup_session_pause_message)
1164 (soup_session_unpause_message): session/server-level methods to
1165 replace soup_message_io_pause() and soup_message_io_unpause().
1167 * libsoup/soup-server-message.c: Remove some unused methods
1171 2007-12-05 Dan Winship <danw@gnome.org>
1173 * libsoup/soup-connection.c:
1174 * libsoup/soup-session.c: replace message filters with a
1175 "request_started" signal
1177 * libsoup/soup-message-filter.c: gone
1179 * libsoup/soup-types.h (SOUP_MAKE_INTERFACE): no longer needed
1181 2007-12-05 Dan Winship <danw@gnome.org>
1183 * libsoup/soup-uri.c: Update for RFC 3986 changes, bgo 266516, and
1185 (soup_uri_get_protocol): match protocols case-insensitively
1186 (soup_uri_new_with_base): Don't fully %-decode the fragment,
1187 query, and path, but do %-decode anything which isn't supposed to
1188 be encoded. Recognize IPv6 address literals. Use stricter
1189 "../"-stripping rules on the path. Reject URIs with junk between
1190 the port number and the path.
1191 (soup_uri_to_string): Update for the fact that the host might be
1192 an IPv6 literal, and for the fact that path, query, and fragment
1193 are now pre-escaped.
1194 (soup_uri_equal): compare hostnames case-insensitively
1195 (uri_encoded_char): update to match RFC 3986
1196 (append_uri_encoded): use uppercase hex letters as recommended by
1198 (soup_uri_normalize): decode only %-escapes that don't belong
1201 * docs/reference/tmpl/soup-uri.sgml: add some more SoupUri docs
1203 * tests/uri-parsing.c: Add new tests from RFC 3986, RFC 2732, RFC
1204 2616, bgo 266516, and elsewhere. Update some tests to match new
1205 parsing/unparsing rules.
1207 2007-12-05 Dan Winship <danw@gnome.org>
1209 * libsoup/soup-message.c (soup_message_new)
1210 (soup_message_new_from_uri): g_intern_string() the method name
1211 rather than assuming it's static. Also remove the NULL==GET
1214 * libsoup/soup-method.c:
1215 * libsoup/soup-method.h: remove the SOUP_METHOD_ID_* macros, and
1216 have the SOUP_METHOD_* macros return interned strings
1218 * libsoup/soup-server.h (SoupServerContext): remove method_id
1221 * libsoup/soup-server-message.c (finalize): no longer needed,
1222 since smsg->method is now an interned string just like with a
1225 * libsoup/soup-soap-message.c (soup_soap_message_new_from_uri):
1226 remove NULL==GET assumption
1230 2007-12-05 Dan Winship <danw@gnome.org>
1232 * libsoup/soup-message.h (SoupHTTPVersion): rename (from
1235 * libsoup/soup-message-headers.c: New opaque type representing
1236 message headers, and new methods that work on it. Uses an array
1237 rather than a hash table, to preserve header ordering as required
1238 by RFC 2616. (Also fixes the API wart that
1239 "soup_message_get_header", etc, did not actually take a
1242 * libsoup/soup-message.c: Kill off old header-manipulating
1245 * libsoup/soup-headers.c (soup_headers_parse_request): return a
1246 guint rather than gboolean, so we can properly return
1247 SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED where appropriate. Also fix
1248 up HTTP-Version parsing to conform with the RFC.
1249 (soup_headers_parse_status_line): Likewise update HTTP-Version
1252 * libsoup/soup-message-server-io.c (parse_request_headers): set
1253 return status appropriately on parse errors
1255 * tests/header-parsing.c: update / add more tests
1259 2007-12-05 Dan Winship <danw@gnome.org>
1261 * libsoup/soup-misc.c: remove deprecated base64 methods
1263 * tests/auth-test.c (identify_auth): oops, update to use
1266 2007-12-05 Dan Winship <danw@gnome.org>
1268 * libsoup/Makefile.am (libsoupinclude_HEADERS): remove
1269 soup-connection.h and soup-message-queue.h
1271 * libsoup/soup-types.h: remove SoupConnection and SoupMessageQueue
1272 which are no longer public
1274 * libsoup/soup.h: sync this to reality for the first time in years
1276 * libsoup/soup-session.c (soup_session_get_queue): Add this, for
1277 subclasses, as the queue is no longer a public part of the session
1280 * libsoup/soup-message.h:
1281 * libsoup/soup-message-private.h: Move soup_message_send_request()
1282 and soup_message_receive_request() to soup-message-private.h,
1283 remove soup_message_send_request_internal().
1285 * libsoup/soup-session-private.h: Move "protected" SoupSession
1286 methods (soup_session_get_connection,
1287 soup_session_try_prune_connection) here from soup-session.h
1288 Add soup_session_get_queue.
1290 2007-12-05 Dan Winship <danw@gnome.org>
1292 * configure.in: bump version to 2.3.0 and SOUP_API_VERSION to 2.4,
1293 and drop AGE/CURRENT/REVISION all to 0.
1295 * libsoup/Makefile.am: Rename library to libsoup-2.4.la
1297 (start of libsoup-2.4 branch)
1299 2007-11-26 Dan Winship <danw@gnome.org>
1301 * configure.in: 2.2.104
1305 2007-11-21 Dan Winship <danw@gnome.org>
1307 * libsoup/soup-message-io.c (soup_message_io_cleanup): make this
1310 * libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
1311 rather than soup_message_io_stop(), to avoid leaks when finalizing
1312 an unfinished message. (Another part of #498509, Wouter Cloetens.)
1314 2007-11-20 Dan Winship <danw@gnome.org>
1316 Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens
1318 * libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
1321 * libsoup/soup-server.c (soup_server_quit): disconnect the
1322 "new_connection" handler.
1323 (soup_server_get_async_context): Convenience method to return the
1324 server's async_context.
1326 * libsoup/soup-server-message.c: don't circularly ref the server,
1327 there's no need anyway.
1329 * libsoup/soup-session.c (soup_session_get_async_context):
1330 Convenience method to return the session's async_context.
1332 * libsoup/soup-session-async.c (queue_message): call run_queue in
1333 the session's async_context, not the main context.
1334 (send_message): don't leak the async_context
1336 * libsoup/soup-session-sync.c (queue_message_thread): don't leak
1339 * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
1342 2007-11-20 Dan Winship <danw@gnome.org>
1344 * libsoup/soup-connection.c (soup_connection_connect_async): don't
1345 leak the SoupAddress.
1347 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
1348 when re-looking up an address
1350 * libsoup/soup-session.c (soup_session_abort): close all
1351 connections in addition to cancelling messages (needed because
1352 connections currently end up holding a ref on their session,
1353 preventing them from being destroyed).
1355 * tests/auth-test.c:
1356 * tests/ntlm-test.c:
1357 * tests/proxy-test.c:
1360 * tests/xmlrpc-test.c: clean up more memory on exit, to help find
1361 leaks in the library
1363 * tests/libsoup.supp: add a zillion new suppressions so we
1364 can use --leak-resolution=med
1366 2007-11-16 Dan Winship <danw@gnome.org>
1368 * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
1369 around the got_chunk emission so that it doesn't get messed up if
1370 you pause the I/O from the got_chunk handler. (#452280, Marco
1372 (soup_message_io_pause, soup_message_io_unpause): Update docs
1373 again; these are now allowed with client-side I/O as well. Fix
1374 unpause() to unpause asynchronously on async sockets.
1376 * libsoup/soup-session-async.c (send_message): Iterate session's
1377 async_context, not the default main context.
1379 * tests/pull-api.c: Test/sample of creating a pull-style API using
1382 * tests/index.txt: new file to act as DirectoryIndex for the
1383 tests. (In particular, pull-api wants this to be largeish.)
1385 2007-10-28 Dan Winship <danw@gnome.org>
1387 * configure.in: 2.2.103
1391 2007-10-28 Dan Winship <danw@gnome.org>
1393 * libsoup/soup-server.c (start_request, request_finished): ref the
1394 socket around the processing of the message, since otherwise it
1395 might already be freed when request_finished runs. #459896.
1397 * libsoup/soup-message-io.c (soup_message_io_pause)
1398 (soup_message_io_unpause): Clarify the docs here; this is for
1399 server-side use only. Inspired by #452280.
1401 * docs/reference/server-howto.xml: You need to watch the
1402 "finished" signal on the message if using soup_message_io_pause()
1403 or chunked encoding, because the client might disconnect while
1404 you're paused. Clarification inspired by #471385.
1406 * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
1407 server-howto.xml points to it as an example of what to do.
1409 2007-10-28 Dan Winship <danw@gnome.org>
1411 * libsoup/soup-session.c (finalize): free proxy-related stuff
1413 * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
1414 pointer. (From the dev repo, but identical to a patch from Rob
1415 Bradford in #484988.)
1417 * tests/*.c: fix leaks
1419 2007-10-28 Dan Winship <danw@gnome.org>
1421 * tests/auth-test.c:
1423 * tests/header-parsing.c:
1424 * tests/ntlm-test.c:
1425 * tests/proxy-test.c:
1426 * tests/uri-parsing.c:
1427 * tests/xmlrpc-test.c: Make these less verbose by default (to make
1428 it easier to see what failed when a "make check" fails).
1430 2007-10-15 Dan Winship <danw@gnome.org>
1432 * configure.in: 2.2.102
1436 2007-10-08 Dan Winship <danw@gnome.org>
1438 * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
1440 * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
1442 2007-10-05 Dan Winship <danw@gnome.org>
1444 * configure.in: 2.2.101
1448 * tests/httpd.conf.in:
1449 * tests/Makefile.am:
1450 * tests/ssl-test.c: srcdir != builddir fixes
1452 2007-10-05 Dan Winship <danw@gnome.org>
1454 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
1455 if the authenticate callback returns a username and no password
1456 (even though it's not supposed to do that). #480987
1458 2007-09-24 Dan Winship <danw@gnome.org>
1460 * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
1461 (SoupAuthClass) remove "get_realm" virtual method.
1463 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
1464 WWW-Authenticate/Proxy-Authenticate header here, set realm, and
1465 pass the params hash to the construct method.
1466 (soup_auth_get_info): Return an identifier for the auth:
1469 * libsoup/soup-auth-basic.c:
1470 * libsoup/soup-auth-digest.c: update
1472 * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
1473 use soup_auth_get_info().
1475 2007-09-24 Dan Winship <danw@gnome.org>
1477 * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
1478 improvement suggested by RFC2616 19.3.
1480 * libsoup/soup-headers.c (soup_headers_parse_request): allow
1481 erroneous trailing whitespace after HTTP version. #475169
1483 * libsoup/soup-message-server-io.c (parse_request_headers): fix
1484 the parsing of the Host header to assume it already includes the
1485 port (which it should; the only reason this ever worked is because
1486 SoupUri ignores the second port number when parse_request_headers
1487 generates a URL like "http://localhost:9999:9999/").
1489 * tests/header-parsing.c (reqtests): add a test for #475169
1491 2007-09-23 Dan Winship <danw@gnome.org>
1493 * libsoup/soup-message.c (soup_message_class_init): remove a
1494 mysterious partial sentence in the ::wrote-chunk docstring.
1497 * docs/reference/libsoup-sections.txt: Remove documentation of MD5
1498 methods, which are not public. #440092
1500 2007-09-23 Dan Winship <danw@gnome.org>
1502 * libsoup/soup-message.c (soup_message_set_auth)
1503 (soup_message_set_proxy_auth): Only remove the Authorization /
1504 Proxy-Authorization header from the message if it was previously
1505 set by soup_message_set_auth(). (Eg, not if it was added by
1506 SoupConnectionNTLM.) #471389
1508 * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
1510 * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
1511 test the crypto/encoding bits, just that the right headers are
1512 being sent at the right times.
1514 2007-09-14 Dan Winship <danw@gnome.org>
1516 Make "make check" pass on Fedora 7:
1518 * configure.in: update apache/php tests with additional filenames
1520 * tests/httpd.conf.in: updates for configure.in changes and
1521 slightly-more-recent apache
1523 * tests/ssl-test.c (start_writing): fix uninitialized struct field
1524 (main): start server after setting up client since otherwise
1525 there's a race condition since soup_gnutls_init() isn't actually
1526 thread-safe. (FIXME)
1528 * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
1529 (which only exists if register_globals is set)
1531 2007-06-01 Dan Winship <danw@novell.com>
1533 * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
1534 fix. noted by "cascardo" on libsoup-list.
1536 2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
1538 * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
1539 headers so that libsoup can be used from C++ programs. #438776
1541 2007-04-16 Dan Winship <danw@novell.com>
1543 * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
1544 than just using gpointer
1546 * libsoup/soup-server.c (SoupServerPrivate): use it
1548 * libsoup/soup-session.c (SoupSessionPrivate): use it
1550 * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
1551 rather than "cred" as the abbreviation for "credentials".
1553 * docs/reference/libsoup-sections.txt:
1554 * docs/reference/tmpl/soup-misc.sgml:
1555 * docs/reference/tmpl/soup-ssl.sgml: update
1557 2007-03-29 Dan Winship <danw@novell.com>
1559 * libsoup/soup-session-sync.c (queue_message): Implement this by
1560 sending the message (synchronously) in another thread and then
1561 queueing the callback back in the main thread.
1563 * libsoup/soup-session.c (soup_session_queue_message): update docs
1564 to be more explicit about what thread the callback occurs in
1566 2007-03-17 Dan Winship <danw@novell.com>
1568 * libsoup/soup-message.c (soup_message_set_auth)
1569 (soup_message_get_auth, soup_message_set_proxy_auth)
1570 (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
1573 * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
1574 soup_message_set_proxy_auth.
1575 (update_auth_internal): Call soup_message_get_auth or
1576 soup_message_get_proxy_auth to determine the message's prior auth,
1577 rather than calling lookup_auth() again, since it isn't guaranteed
1578 to return the same thing now as it did when the message was
1579 originally sent. Fixes erroneous 401s when queuing multiple
1580 messages at once to an as-yet-unauthenticated-to server. #271540
1582 * libsoup/soup-session-async.c (queue_message): don't run the
1583 queue right away, do it at idle time. Otherwise in some cases
1584 (especially errors), the message callbacks could be invoked before
1585 queue_message returns.
1587 * tests/auth-test.c: add a regression test for #271540.
1589 2007-03-17 Dan Winship <danw@novell.com>
1591 * configure.in: require glib 2.12. check for timegm().
1593 * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
1594 (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
1595 patch from Emmanuele Bassi.
1597 * libsoup/soup-types.h: remove local copy of
1598 G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
1601 * libsoup/soup-misc.c (soup_base64_encode_close)
1602 (soup_base64_encode_step, soup_base64_encode)
1603 (soup_base64_decode_step): Make these just be wrappers around the
1604 glib base64 methods. (For now; eventually they'll just go away.)
1606 * libsoup/soup-auth-basic.c (authenticate):
1607 * libsoup/soup-auth-digest.c (authenticate):
1608 * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
1609 (soup_ntlm_response):
1610 * libsoup/soup-server-auth.c (soup_server_auth_new):
1611 * libsoup/soup-soap-message.c (soup_soap_message_write_base64):
1612 * libsoup/soup-xmlrpc-message.c
1613 (soup_xmlrpc_message_write_base64):
1614 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1615 Use glib base64 methods
1617 2007-03-16 Dan Winship <danw@novell.com>
1619 * libsoup/soup-message.c (soup_message_get_response_encoding):
1620 update the handling of CONNECT: it has no response body by
1621 default, but does have a body if its headers say so.
1623 * tests/proxy-test.c: test libsoup's behavior when talking to
1626 * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
1627 sections configuring them, for proxy-test
1629 * configure.in: update the apache-module-dir-finding code to deal
1630 with the fact that some modules (eg, mod_ssl) might only be in the
1631 mpm-specific module dir, while others (eg, mod_php5) might only be
1632 in the generic module dir.
1634 2007-03-12 Dan Winship <danw@novell.com>
1636 * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
1637 ssl-test. #417617, patch from Elijah Newren.
1639 2007-03-12 Dan Winship <danw@novell.com>
1641 * libsoup/soup-session-sync.c (wait_for_connection): if
1642 soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
1643 try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
1644 where-the-proxy-closes-the-connection-when-returning-407. (Reported
1647 * tests/get.c: Rewrite to use soup_session_send_message rather
1648 than soup_session_queue_message, and add a "-s" flag to use
1649 SoupSessionSync rather than SoupSessionAsync (so we can test bugs
1650 in the sync code paths).
1652 2007-03-08 Dan Winship <danw@novell.com>
1654 * libsoup/soup-gnutls.c (do_handshake): don't return
1655 G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
1656 until the handshake is complete.
1657 (soup_gnutls_read, soup_gnutls_write): if we get
1658 GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
1659 returning G_IO_STATUS_AGAIN; if the socket is blocking then
1660 G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
1661 might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
1662 or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
1664 #415402, based on a patch from Jacob Berkman.
1666 * tests/ssl-test.c: basic ssl test. In particular, tests that
1667 rehandshake requests are handled correctly during both synchronous
1668 and asynchronous I/O. Might eventually test other stuff too...
1671 * tests/Makefile.am: updates for ssl-test
1673 2007-02-19 Dan Winship <danw@novell.com>
1675 * configure.in: Get gcrypt libs/cflags.
1677 * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
1678 gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
1680 2007-02-12 Dan Winship <danw@novell.com>
1682 * configure.in: 2.2.100
1684 2007-02-12 Dan Winship <danw@novell.com>
1686 * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
1687 this to handle "\0"-terminated status lines (eg, from WebDAV
1688 responses), like the docs say it does. #406997
1689 (soup_headers_parse): Balance that out by rejecting internal "\0"s
1691 (soup_headers_parse_request, soup_headers_parse_response): Update
1692 docs to warn that @dest may be modified even on error. (This was
1693 always true, it just wasn't documented.)
1695 2007-01-16 Dan Winship <danw@novell.com>
1697 * tests/header-parsing.c (do_request_tests, do_response_tests):
1698 initialize "errors" to 0. duh. Pointed out by Michael Wolf.
1700 2007-01-08 Dan Winship <danw@novell.com>
1702 * configure.in: 2.2.99
1706 2007-01-06 Dan Winship <danw@novell.com>
1708 * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
1709 easier to understand and more correct, and make the "str" param
1710 const rather than overwriting it during parsing.
1711 (soup_headers_parse_request, soup_headers_parse_response):
1712 Likewise, make "str" param const. Fix the doc comment to describe
1713 the correct constraint on str. Make the parsing slightly more
1714 lenient as per sections 4.1 and 19.3 of RFC 2616.
1716 * tests/header-parsing.c: new regression test, for Request-Line,
1717 Status-Line, and message-header parsing.
1719 Inspired by #391970 (crash in SoupServer when certain invalid
1720 requests are received).
1722 2006-12-05 Dan Winship <danw@novell.com>
1724 * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
1725 to soup_message_io_stop() here; the corresponding calls were
1726 needed back in the SoupContext days, but they are wrong now and
1727 cause async-redirects-to-other-hosts to fail. #382251. Also
1728 clarify docs with respect to soup_session_requeue_message().
1730 * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
1732 * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
1735 2006-11-20 Dan Winship <danw@novell.com>
1737 * configure.in: 2.2.98
1741 2006-11-20 Dan Winship <danw@novell.com>
1743 Patch from Andrew W. Nosenko:
1745 * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
1746 memory leak when parse_response_headers() is called on a message
1747 that has a 'reason_phrase' already for some reason.
1749 * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
1750 hostname was not freed.
1751 (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
1752 'chan' was not freed in case of initialization error. Avoid double
1753 close of the "real" (plain, non-ssl) channel FD.
1755 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
1756 memory leak: the "real" (plain, non-ssl) GIOChannel was never
1757 "finally" unreffed (one more *_ref() than *_unref()) in case of
1760 2006-11-20 Dan Winship <danw@novell.com>
1762 * libsoup/soup-connection-ntlm.c (send_request):
1763 * libsoup/soup-session-sync.c (queue_message):
1764 * libsoup/soup-status.c (reason_phrases): Add some missing
1765 "static"s. Patch from Matthias Clasen, #376387
1767 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
1768 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
1769 same thing as <value><string>foo</string></value>. Pointed out by
1770 Todd Kulesza. #364490
1772 2006-11-06 Dan Winship <danw@novell.com>
1774 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
1775 addition of soup_xml_real_node.
1779 2006-11-06 Dan Winship <danw@novell.com>
1781 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
1782 "real" (ie, not comment or whitespace) xml node
1784 * libsoup/soup-soap-response.c (parse_parameters)
1785 (soup_soap_response_from_string)
1786 (soup_soap_parameter_get_first_child)
1787 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
1788 Based on a patch from Andrew W. Nosenko.
1790 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1791 don't call xmlKeepBlanksDefault, which changes libxml's behavior
1792 globally! Instead, use soup_xml_real_node() when traversing the
1795 * libsoup/soup-xmlrpc-response.c
1796 (soup_xmlrpc_response_from_string): don't call
1797 xmlKeepBlanksDefault.
1798 (exactly_one_child): rewrite in terms of soup_xml_real_node()
1799 (which means it handles comments now as well)
1800 (soup_xmlrpc_value_get_struct)
1801 (soup_xmlrpc_value_array_get_iterator)
1802 (soup_xmlrpc_value_array_iterator_prev)
1803 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
1805 2006-11-05 Dan Winship <danw@novell.com>
1807 * libsoup/soup-headers.c (soup_headers_parse_request): document
1808 this (in particular, point out that str+len must point to exactly
1809 the right place). Allow req_method and req_path to be NULL.
1810 (soup_headers_parse_status_line, soup_headers_parse_response):
1811 document. Also, change "status_phrase" argument to "reason_phrase"
1812 to match the spec. Inspired by #339889.
1814 2006-11-03 Dan Winship <danw@novell.com>
1816 * libsoup/*.c: fix lots of warnings. Partially from patches from
1817 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
1819 2006-11-03 Dan Winship <danw@novell.com>
1821 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
1822 Based on #356809 from Matthew Barnes.
1824 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
1825 Paolo Borelli. #351500
1827 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
1828 pointed out by Andrew W. Nosenko.
1830 * configure.in: Use pkgconfig to find gnutls. Remove old static
1831 linking stuff that was only needed for rcd.
1833 * acinclude.m4: remove gnutls stuff
1835 * libsoup.pc.in: Use Requires rather than putting xml/ssl
1836 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
1839 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
1840 cygwin. From "Cygwin Ports maintainer", #321827.
1842 2006-07-24 Dan Winship <danw@novell.com>
1844 * configure.in: 2.2.96. bump AGE and CURRENT for new API
1848 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1849 New, from Fernando Herrera, bug 348532.
1851 2006-07-21 Dan Winship <danw@novell.com>
1853 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
1854 constructed auth doesn't have a realm, it's invalid, as per RFC
1855 2617. Based on a patch from Nate Nielsen on libsoup-list.
1856 (soup_auth_get_realm): remove "if available" from docs; all auths
1857 always have a realm.
1859 * libsoup/soup-message-server-io.c (get_response_headers): If the
1860 server handler set a Content-Length header on the message, don't
1861 add a second one. (Preserves compatibility with an old hacky way
1862 that people might have been handling HEAD from SoupServer.)
1864 * README: update to mention mailing list and bugzilla
1866 * HACKING: kill this since there's nothing here that isn't either
1867 obvious, or redundant with the README
1869 2006-07-21 Dan Winship <danw@novell.com>
1871 * libsoup/soup-server-message.c (soup_server_message_init):
1872 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
1873 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
1874 actually worked here, and so there was an undocumented requirement
1875 that you manually set the encoding on every response
1876 (which SoupServer itself was not doing on internal errors).
1877 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
1878 (soup_server_message_set_encoding): reject the new
1879 SoupTransferEncoding values, for compatibility
1881 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
1882 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
1883 public API, it always has been, due to bugs. Add some new values,
1884 currently just for internal use: SOUP_TRANSFER_NONE (for cases
1885 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
1886 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
1887 actually implemented yet).
1889 * libsoup/soup-message.c (soup_message_get_request_encoding,
1890 soup_message_get_response_encoding): figure out the body encoding
1891 being used by the request/response, including all the tricky
1892 cases like HEAD/1xx/etc.
1893 (soup_message_is_keepalive): if the response encoding is
1894 SOUP_TRANSFER_EOF, then the message isn't keepalive.
1896 * libsoup/soup-message-client-io.c (parse_response_headers): use
1897 soup_message_get_response_encoding.
1899 * libsoup/soup-message-server-io.c (parse_request_headers): use
1900 soup_message_get_request_encoding.
1901 (get_response_headers): use both soup_server_message_get_encoding
1902 and soup_message_get_response_encoding, to properly distinguish
1903 between the wire encoding and the alleged-by-headers encoding
1904 (which differ for HEAD, etc).
1906 * libsoup/soup-message-io.c (io_error, read_body_chunk):
1907 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
1908 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
1909 SOUP_MESSAGE_IO_STATE_FINISHING.
1911 * libsoup/soup-server.c (request_finished): Check
1912 soup_socket_is_connected() *before* soup_message_is_keepalive(),
1913 since the message will be invalid if the client unexpectedly
1914 dropped the connection.
1916 * tests/simple-httpd.c (server_callback): handle HEAD requests.
1917 Remove no-longer-necessary soup_server_message_set_encoding()
1920 * tests/get.c: add -d (debug) flag to print headers, and -h flag
1921 to do a HEAD rather than GET
1923 2006-07-10 Dan Winship <danw@novell.com>
1925 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
1926 time. Pointed out by Daniel Holbach.
1928 2006-07-10 Dan Winship <danw@novell.com>
1930 * configure.in: 2.2.95
1934 2006-06-19 Dan Winship <danw@novell.com>
1936 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
1937 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
1939 * configure.in: fix some quoting
1941 2006-06-14 Dan Winship <danw@novell.com>
1943 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
1945 * tests/xmlrpc-test.c: XML-RPC regression test
1947 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
1949 * tests/httpd.conf.in: add php stuff
1951 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
1952 rather than "stop", so that it stops listening on the socket
1953 before exiting, so that we can immediately start another apache
1954 (eg, in "make check").
1956 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
1959 * libsoup/soup-xmlrpc-message.c
1960 (soup_xmlrpc_message_write_datetime): rename from
1961 "..._write_time", to make it consistent with the XML-RPC type name
1962 and the corresponding SoupXmlrpcResponse method. Also, fix it to
1963 use the same ISO 8601 format as the spec, and use the right value
1964 for the seconds field.
1965 (soup_xmlrpc_message_write_base64): Change the buf arg to a
1966 gconstpointer rather than a const char *.
1968 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1969 Return a GByteArray containing the decoded data, rather than
1970 the base64-encoded string.
1971 (soup_xmlrpc_value_dump_internal): Update for that (and don't
1973 (soup_xmlrpc_value_array_get_iterator,
1974 soup_xmlrpc_value_array_iterator_get_value): Make these actually
1977 2006-06-12 Dan Winship <danw@novell.com>
1979 * configure.in: 2.2.94
1983 2006-06-12 Dan Winship <danw@novell.com>
1985 * docs/reference/client-howto.xml:
1986 * docs/reference/server-howto.xml: New client and server API
1989 * docs/reference/*: reorganize, regenerate, fill in some missing
1992 * libsoup/soup-connection.c (soup_connection_new): document the
1995 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
1997 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
2000 2006-06-12 Dan Winship <danw@novell.com>
2002 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
2003 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
2005 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
2006 the output parameter and make the return value match the other
2009 2006-06-09 Dan Winship <danw@novell.com>
2011 * configure.in: Add tests for apache, output tests/httpd.conf
2015 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
2017 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
2018 to start/stop apache
2020 * tests/auth-test.c: Use apache-wrapper functions to start a local
2021 apache process to test authentication against, since the auth-test
2022 tree at developer.ximian.com went missing a long time ago. #311825
2024 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
2025 (TESTS): include auth-test if HAVE_APACHE.
2027 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
2028 URI pointing to a directory rather than a file.
2030 2006-06-08 Dan Winship <danw@novell.com>
2032 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
2033 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
2034 Check return value of strtol/g_ascii_strtod correctly. #344222,
2035 patch from Brent Smith.
2037 2006-06-07 Dan Winship <danw@novell.com>
2039 * libsoup/soup-xmlrpc-response.c
2040 (soup_xmlrpc_response_from_string): record whether or not the
2041 response was a fault.
2042 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
2045 2006-05-29 Dan Winship <danw@novell.com>
2047 * configure.in: 2.2.93
2051 2006-05-29 Dan Winship <danw@novell.com>
2053 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
2054 "FINISHING" which means "done I/O, but not yet done processing and
2055 cleanup" before "DONE" (which now always means "completely done").
2056 (soup_message_io_stop): disconnect the socket if the read state is
2057 "< FINISHING", not "!= DONE".
2058 (io_error): on an EOF-that-signals-end-of-data, set state to
2059 FINISHING and run io_read().
2060 (io_read, io_write): remove the g_return_if_fails from before.
2061 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
2062 listening for the readable/writable signal (eg, so we don't end up
2063 reading a following pipelined request), and set the state to DONE.
2064 (soup_message_io_unpause): Only reconnect the readable/writable
2065 signals if the io state isn't DONE. Guard the calls to
2066 io_read/io_write better so that it's safe to call this even after
2067 they are both DONE, since it may be easier for us to test that
2068 than for the caller to.
2070 Fixes 334469, 342640, and another bug caused by the earlier
2071 workaround to 334469. Based on patches and analysis from William
2072 Jon McCann and Armin Bauer.
2074 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
2075 this work again. (Pointed out by Alex Larsson)
2077 2006-05-26 Dan Winship <danw@novell.com>
2079 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
2082 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
2083 SSL after CONNECTing! Doh. Part of bnc #174255.
2084 (SoupConnectionMode): new enum for the three types of
2085 SoupConnection (direct, proxy, tunnel).
2086 (set_property): set priv->mode according to proxy_uri and
2088 (socket_connect_result, soup_connection_connect_sync): use
2089 priv->mode to decide whether or not to tunnel.
2090 (send_request): Only pass TRUE for is_proxy to
2091 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
2092 (Also part of bnc #174255).
2094 2006-05-26 Dan Winship <danw@novell.com>
2096 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
2097 if IO is currently in progress on a message.
2099 * libsoup/soup-session-async.c (run_queue): don't process messages
2100 that are io_in_progress. #342545, fix based on analysis from Wang
2101 Xin. (In the future we may want to re-fix this by adding a
2102 REQUEUED message status separate from QUEUED.)
2104 2006-05-22 Dan Winship <danw@novell.com>
2106 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
2107 while holding host_lock; that's not allowed and can cause
2108 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
2109 part of bnc #174255.
2111 2006-04-10 Dan Winship <danw@novell.com>
2113 * configure.in: bump version to 2.2.92
2117 2006-04-10 Dan Winship <danw@novell.com>
2119 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
2120 if these get called after the IO is done. This isn't supposed to
2121 happen, but apparently does. Workaround for #334469.
2123 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
2124 NULL-terminate these so we don't crash when trying to parse an
2125 invalid value. (Flip side of the previous #328615 patch.)
2127 2006-04-02 Dan Winship <danw@novell.com>
2129 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
2130 Write out correct digest algorithm value. #328615.
2132 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
2133 Request-Line-parsing code to not have a lame max length. #335040.
2135 * Makefile.am (install-data-local): Install the .pc file mode 644,
2138 * libsoup/soup-auth-digest.c:
2139 * libsoup/soup-auth.c:
2140 * libsoup/soup-message-client-io.c:
2141 * libsoup/soup-message-server-io.c:
2142 * libsoup/soup-message.c:
2143 * libsoup/soup-method.c:
2144 * libsoup/soup-server-auth.c:
2145 * tests/get.c: replace locale-ish strcasecmps with
2148 * libsoup/*.c: fix most signed/unsigned mismatch warnings
2150 2006-03-03 Dan Winship <danw@novell.com>
2152 * configure.in: bump version to 2.2.91.
2156 2006-03-03 Dan Winship <danw@novell.com>
2158 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
2159 GMainContext as well, and update the resolution code to dispatch
2160 each lookup result in the correct context.
2162 * libsoup/soup-address.c (soup_address_resolve_async_full): New
2163 method that takes a GMainContext to pass to
2164 soup_dns_lookup_resolve_async.
2166 * libsoup/soup-socket.c (soup_socket_connect): Use
2167 soup_address_resolve_async_full. Fixes a problem reported by Armin
2170 * configure.in: update to require glib 2.6, since apparently the
2173 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
2175 * libsoup/soup-connection.c:
2176 * libsoup/soup-session.c:
2177 * libsoup/soup-socket.c: add a "timeout" property,
2178 which gets passed from server to socket, and session to connection
2179 to socket, allowing blocking non-responsive sync connections to
2180 return. Combination of "EAGAIN" && "Blocking" connection is treated
2181 as error and the connection will be terminated and the control
2182 is returned to the caller immediately.
2184 2006-02-02 Tor Lillqvist <tml@novell.com>
2186 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
2187 on Windows, as they are present by default on XP only. We do want
2188 to support Windows 2000, too.
2190 2005-12-21 Dan Winship <danw@novell.com>
2192 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
2195 * tests/date.c: add three more ISO 8601 cases, to exercise all the
2198 #324671, from Emmanuele Bassi
2200 2005-11-25 Dan Winship <danw@novell.com>
2202 * README: sync to text on wiki, and point to wiki
2204 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
2206 2005-11-17 Dan Winship <danw@novell.com>
2208 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
2209 right away, to protect against this being re-entered mid-cleanup
2210 (when we unref the connection). #321208, based on a patch from
2213 2005-11-16 Dan Winship <danw@novell.com>
2215 * libsoup/soup-xmlrpc-message.c
2216 (soup_xmlrpc_message_start_member): add the "name" element to the
2217 struct member. #321362, patch from Sebastian Bauer.
2219 2005-11-10 Dan Winship <danw@novell.com>
2221 * configure.in: bump version to 2.2.90. This will not be
2222 officially released, but once these patches have gotten some
2223 testing they may be pulled up to the gnome-2-12 branch.
2225 * libsoup/soup-connection.c:
2226 * libsoup/soup-server.c:
2227 * libsoup/soup-session.c:
2228 * libsoup/soup-socket.c: add an "async-context" property,
2229 which gets passed from server to socket, and session to connection
2230 to socket, allowing async usage outside the main thread. Based on
2231 patches from Armin Bauer and JĂ¼rg Billeter.
2233 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
2234 soup_add_timeout): utility routines to add watches, idles, and
2235 timeouts to non-default GMainContexts.
2237 * libsoup/soup-message-io.c (io_write): set the read state
2238 appropriately after writing a "100 Continue" response
2239 (io_read): More 100-Continue stuff. I don't think this is quite
2240 right so it will probably change again later.
2242 2005-11-01 Dan Winship <danw@novell.com>
2244 * docs/reference/libsoup-docs.sgml: tell it to generate an index
2246 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
2248 2005-11-01 Dan Winship <danw@novell.com>
2250 * libsoup/soup-connection.c (set_current_request,
2251 clear_current_request): Cast the argument to
2252 g_object_add/remove_weak_pointer to the wrong type, to make gcc
2253 4.1 happy, because C is stupid and "void **" means "a pointer to a
2254 void *", not "a pointer to any kind of pointer".
2256 * libsoup/soup-xmlrpc-response.c
2257 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
2260 2005-10-27 Dan Winship <danw@novell.com>
2262 * libsoup/soup-socket.c (soup_socket_client_new_async,
2263 soup_socket_client_new_sync): unref the SoupAddress passed to
2264 soup_socket_connect to avoid a leak. Based on a patch from Wang
2266 (socket_read_watch, read_from_network, socket_write_watch,
2267 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
2268 events when polling, since poll() will return them whether or not
2269 you asked for them, but glib will ignore them unless you did,
2270 which will result in CPU suckage if such an error occurs. #319305,
2271 patch from Jonathan Matthew.
2273 2005-10-27 Dan Winship <danw@novell.com>
2275 bgo #316313 / bnc #116762, and probably also bgo #318252
2277 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
2278 after releasing it, to make sure we can't accidentally release it
2281 * libsoup/soup-connection.c (clear_current_request): Call
2282 soup_message_io_stop() on the cleared request.
2284 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
2285 little dance here to make sure the session can't queue another
2286 message on the connection while we're in the process of requeuing
2289 2005-08-30 Tor Lillqvist <tml@novell.com>
2291 * libsoup-zip.in: Include documentation in developer zipfile.
2293 2005-08-22 Dan Winship <danw@novell.com>
2295 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
2296 g_type_class_add_private.
2298 * configure.in: Bump to 2.2.6.1
2302 2005-08-22 Dan Winship <danw@novell.com>
2304 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
2305 soup_server_get_socket() addition.
2309 2005-08-22 Dan Winship <danw@novell.com>
2311 * libsoup/soup-connection.c (set_current_request,
2312 clear_current_request): Fix g_object_add/remove_weak_pointer usage
2313 to prevent a crash when canceling a request. From Tambet.
2315 2005-08-16 Dan Winship <danw@novell.com>
2317 Fix a connection leak reported by Tambet.
2319 * libsoup/soup-connection.c (send_request): rather than tracking
2320 the message progress via signals, call
2321 soup_message_send_request_internal() and have it call
2322 soup_connection_release() when it's done.
2323 (request_restarted, request_done): gone
2324 (clear_current_request): handle disconnecting (if necessary) and
2325 updating last_used time here.
2326 (soup_connection_release): Call clear_current_request().
2327 (dispose): Call clear_current_request()
2329 * libsoup/soup-message-client-io.c
2330 (soup_message_send_request_internal): New. Takes a SoupConnection
2331 in addition to the other args, and passes that on to
2334 * libsoup/soup-message-io.c (SoupMessageIOData): add a
2335 SoupConnection field.
2336 (io_cleanup): if io->conn is set, unref it.
2337 (soup_message_io_stop): if io->conn is set, and we ended in a
2338 clean state, call soup_connection_release() on it.
2339 (soup_message_io_client): Add a SoupConnection arg, which gets
2340 reffed and stored in io->conn.
2342 * TODO: misc updates
2344 2005-08-15 Dan Winship <danw@novell.com>
2346 * libsoup/soup-connection.h (soup_connection_new):
2347 * libsoup/soup-server.h (soup_server_new):
2348 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
2349 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
2350 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
2352 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
2353 definition of this from glib 2.8 for use when compiling against
2356 2005-08-15 Tambet Ingo <tambet@ximian.com>
2358 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
2361 * libsoup/soup-server.c (soup_server_get_listener): ditto.
2363 2005-08-12 Dan Winship <danw@novell.com>
2365 * libsoup/soup-server.c (soup_server_get_listener): new method to
2366 get the server's listening socket.
2368 * libsoup/soup-socket.c: add a new "cloexec" property, to set
2369 FD_CLOEXEC on the socket. Update everything for that.
2371 2005-08-05 Dan Winship <danw@novell.com>
2373 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
2375 (soup_socket_connect): Make sure that get_iochannel() gets called
2376 if the connect succeeds right away, or the socket will fail on
2377 the first read or write. [#312540]
2379 2005-08-01 Dan Winship <danw@novell.com>
2381 * configure.in: drop version back down to 2.2.5 and
2382 SOUP_API_VERSION back to 2.2; due to various snafus, there has
2383 never yet been an official release of the 2.4 API and the GNOME
2384 2.12 betas have been shipping with libsoup 2.2 tarballs (while
2385 jhbuild has been using 2.4, with evolution and related packages
2386 having configure hacks to build against either). As there never
2387 ended up being any API-incompatible changes in the 2.4 series, we
2388 can just merge it back into the 2.2 series and kill off 2.4.
2390 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
2393 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
2395 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
2396 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
2397 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
2398 let us use a variable.
2400 2005-08-01 Dan Winship <danw@novell.com>
2402 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
2403 SoupMD5Context and write out the digest in hex digits.
2405 * libsoup/soup-auth-digest.c (authenticate, compute_response):
2406 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
2407 rather than duplicating the code in both places here.
2409 Patch from Wim Lewis.
2411 2005-07-15 Dan Winship <danw@novell.com>
2413 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
2414 since some servers are lame. Based on a patch from Jean-Yves
2417 * tests/uri-parsing.c: add some more tests to make sure that
2418 things that should be %-escaped do get %-escaped
2420 2005-07-06 Tor Lillqvist <tml@novell.com>
2422 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
2423 that gmtime() is thread-safe on Windows.
2424 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
2426 2005-06-14 Dan Winship <danw@novell.com>
2428 * configure.in: check for gmtime_r
2430 * libsoup/soup-date.c: date/time-manipulation functions
2432 * libsoup/soup-xmlrpc-message.c:
2433 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
2434 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
2437 * tests/date.c: soup-date test code
2439 * tests/getbug.c: XMLRPC test code. (Should be switched to use
2440 bugzilla.gnome.org once bgo supports XMLRPC.)
2442 * TODO: XMLRPC is implemented now (but shares the problem with
2443 SOAP that the API is not very good).
2445 2005-06-14 Dan Winship <danw@novell.com>
2447 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
2450 * docs/reference/*: update, fix, etc
2452 2005-06-13 Tor Lillqvist <tml@novell.com>
2454 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
2455 that we do have inet_pton() and inet_ntop() on Windows (because we
2456 implement them ourselves in soup-dns.c).
2458 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
2459 implementations, they were completely bogus.
2460 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
2462 2005-06-08 Dan Winship <danw@novell.com>
2464 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
2465 use just the domain name for the domain, not the whole
2466 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
2468 2005-05-26 Dan Winship <danw@novell.com>
2470 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
2471 this, since it can be called from set_property(). Possible fix for
2474 2005-05-05 Dan Winship <danw@novell.com>
2476 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
2477 --type-init-func to force g_thread_init to be called. [#302674]
2479 2005-04-18 Tor Lillqvist <tml@novell.com>
2481 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
2482 Automake conditional OS_WIN32. Pre-cache information that we do
2483 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
2484 wouldn't notice as they don't include the necessary headers or
2485 link with -lws2_32. Easiest to just pre-cache it.)
2487 * libsoup-zip.in: New file, to build zipfile-based distribution of
2490 * Makefile.am (EXTRA_DIST)
2491 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
2493 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
2494 WinSock library -lws2_32.
2496 * libsoup/soup-portability.h: New file. On Unix it includes the
2497 traditional BSD socket etc headers. On Win32 it includes
2498 winsock2.h and ws2tcpip.h.
2501 * libsoup/*.h: Correspondingly, don't include the BSD socket API
2504 * libsoup/soup-address.h
2505 * libsoup/soup-dns.h: Include soup-portability.h
2507 * libsoup/soup-address.c (soup_address_class_init): This function
2508 should get called before libsoup uses the WinSock API, so this is
2509 a good place to call WSAStartup().
2511 * libsoup/soup-auth-digest.c (get_protection_space): Use
2512 g_strsplit() instead of the relatively unportable strtok_r().
2514 * libsoup/soun-dns.c: Remove unused headers. Implement
2515 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
2516 and WSAAddressToString().
2518 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
2519 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
2521 (soup_socket_class_init): Call soup_address_get_type() to make
2522 sure WSAStartup() gets called (through soup_address_class_init()).
2523 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
2524 (soup_socket_write): Conditionalize SIGPIPE use.
2526 * tests/get.c: mkdir() is different in Microsoft's C library.
2528 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
2529 some clash with winsock2.h (which includes windows.h). The Win32
2530 headers pollute the namespace wildly.
2532 2005-04-15 Dan Winship <danw@novell.com>
2534 * libsoup/soup-dns.c (resolve_name): make this work with
2535 pre-EAI_OVERFLOW glibc [#300620]
2537 2005-04-12 Dan Winship <danw@novell.com>
2539 * configure.in: Remove the various gethostbyname_r checks and just
2540 check for getnameinfo/getaddrinfo.
2542 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
2543 forking. Change the API around a bunch in the process.
2545 * libsoup/soup-address.c: Update for soup-dns changes
2547 * tests/dns.c: take multiple hostnames on the command line and
2548 resolve them all at once (patch from tml)
2550 2005-04-11 Dan Winship <danw@novell.com>
2552 * configure.in: require glib-2.0 >= 2.4.0
2554 * libsoup/*.c: use G_DEFINE_TYPE and
2555 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
2557 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
2558 SOUP_MAKE_TYPE_WITH_IFACE
2560 * tests/revserver.c: use GThread. (patch from tml)
2562 2005-04-11 Dan Winship <danw@novell.com>
2564 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
2567 * libsoup.pc.in: rename from libsoup-2.2.pc.in
2569 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
2570 install the .pc file by hand, renaming it to include the
2573 * libsoup/Makefile.am: s/2.2/2.4/
2575 2005-03-09 Dan Winship <danw@novell.com>
2577 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
2578 if gnutls returns 0. [#73352]
2579 (verify_certificate): put an #ifdef around
2580 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
2582 2005-01-08 Not Zed <NotZed@Ximian.com>
2584 ** See ximian bug #70323.
2586 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
2587 types with guint32, as the code needs 32 bit longs.
2589 2004-10-20 Dan Winship <danw@novell.com>
2591 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
2592 commit, which somehow did not actually get committed then.
2594 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
2595 indicating whether or not the connection is connected.
2596 (tunnel_connect_finished): If successful, set connected. If the
2597 server returns a 3xx response, translate it to 407 (under the
2598 assumption that it's trying to redirect us to an HTML login page,
2599 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
2600 soup_socket_start_ssl().
2601 (socket_connect_result, soup_connection_connect_sync): If
2602 successful, set connected
2603 (soup_connection_disconnect): Don't emit "disconnected" if we
2604 aren't yet connected, or the message that was waiting for this
2605 connection may get stranded in the queue. (also part of 68531)
2607 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
2608 SSL and lets the caller pass the expected hostname. Fixes a
2609 problem where SSL certification validation would always fail if
2610 you used a proxy, because it was comparing the cert against the
2611 proxy's hostname. (68583)
2613 2004-10-06 Dan Winship <danw@novell.com>
2615 * libsoup/soup-ssl.h (SoupSocketError): add
2616 SOUP_SSL_ERROR_CERTIFICATE.
2618 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
2620 (verify_certificate): Set the GError appropriately rather than
2623 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
2624 the GIOChannel operation returns an error, store it as GOBject
2625 data on the socket (as a hack so soup-message-io.c can access it
2626 without us needing to change SoupSocket's API).
2628 * libsoup/soup-message-io.c (io_error): peek at the socket's
2629 "last_error" datum and set the message's status to SSL_FAILED
2630 (with the GError's message string) rather than IO_ERROR, if
2631 appropriate. For 64414.
2633 2004-09-30 Dan Winship <danw@novell.com>
2635 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
2636 extra initialization needed for libgcrypt 1.2 or higher. Fixes
2638 (soup_ssl_get_client_credentials,
2639 soup_ssl_get_server_credentials): Call soup_gnutls_init().
2641 2004-08-26 Dan Winship <danw@novell.com>
2643 * configure.in: Bump version to 2.2.0.
2645 * AUTHORS: Update this to reflect the last 2 years.
2647 * NEWS: Brief summary of 1.99.x -> 2.2 changes
2649 * README, TODO: Updates
2651 2004-08-26 Dan Winship <danw@novell.com>
2653 * libsoup/*: add/fix lots of gtk-doc comments
2655 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
2656 Fix bug noticed while documenting. (We were using the
2657 locale-case-insensitive functions rather than the g_ascii_ ones.)
2659 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
2660 implemented) NO_PIPELINE and NO_COOKIE flags.
2662 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
2663 There are still problems here with gtk-doc not recognizing many of
2664 the objects in libsoup...
2666 2004-08-13 JP Rosevear <jpr@novell.com>
2668 * configure.in: bump version, libtool number
2670 2004-08-09 Dan Winship <danw@novell.com>
2672 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
2673 use conn after emitting the "connect_result" signal, since it
2674 might be destroyed by that. Based on a patch from hpj.
2676 2004-08-02 Dan Winship <danw@novell.com>
2678 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
2680 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
2681 set, don't re-encode the URL parts. Based on a patch by
2682 Alfred.Peng@Sun.COM.
2684 2004-07-19 JP Rosevear <jpr@novell.com>
2686 * configure.in: bump version, libtool number
2688 2004-07-15 Dan Winship <danw@novell.com>
2690 * libsoup/soup-session-sync.c (send_message): Simplify this. If
2691 the message comes back from soup_connection_send_request not
2692 FINISHED, get a new connection rather than reusing the old one.
2693 This fixes a race condition in which a connection could end up
2694 double-booked, and fixes the handling of messages that get
2695 redirected to another server.
2697 2004-07-13 Dan Winship <danw@novell.com>
2699 * libsoup/soup-session.c (connect_result): If the connection
2700 attempt succeeded, reserve the connection before releasing
2701 host_lock. Otherwise, another thread might find it in the
2702 connection pool before the caller can queue a message on it.
2705 * libsoup/soup-session-async.c (got_connection): Call
2706 soup_connection_release(), since we don't have a specific message
2707 in mind for the connection, so we need it to be considered idle.
2709 * libsoup/soup-connection.c (soup_connection_release): New
2710 function, to undo a soup_connection_reserve().
2711 (soup_connection_send_request, soup_connection_reserve,
2712 soup_connection_authenticate, soup_connection_reauthenticate):
2715 2004-07-12 Dan Winship <danw@novell.com>
2717 * libsoup/soup-session-sync.c (send_message): signal the
2718 "connections available" condition after the message finishes. Duh.
2720 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
2722 2004-07-08 Dan Winship <danw@novell.com>
2724 * libsoup/soup-soap-response.c: Revert previous change for now; it
2725 breaks the build on distros with older libxmls.
2727 2004-07-08 Dan Winship <danw@novell.com>
2729 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
2732 2004-07-07 Fernando Herrera <fherrera@onirica.com>
2734 * libsoup/soup-soap-response.c: (finalize), (init),
2735 (soup_soap_response_from_string): Use a parse context for the
2736 xml document, so we can safely use the option to ignore
2737 blank spaces and '\n'.
2739 2004-07-06 Dan Winship <danw@novell.com>
2741 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
2742 http or https, require a hostname. For #61049
2744 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
2746 2004-06-03 JP Rosevear <jpr@novell.com>
2748 * configure.in: bump version to 2.1.11, libtool number
2750 2004-06-01 Dan Winship <danw@novell.com>
2752 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
2753 macros to not use ?: expressions as lvalues, since that's
2754 apparently a GNU extension.
2755 (soup_address_resolve_async): Use a timeout rather than an idle
2756 handler to poll the dns result. (soup-dns really should be
2757 rewritten to not require polling, but this is easier for now.)
2760 * libsoup/soup-server.c (call_handler): Don't use GNU-only
2761 non-constant structure initialization
2763 * tests/dns.c: Simple test of the dns code
2765 * tests/Makefile.am (noinst_PROGRAMS): build it
2767 2004-05-19 JP Rosevear <jpr@novell.com>
2769 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
2771 2004-05-18 Dan Winship <danw@novell.com>
2773 * libsoup/soup-ssl.h:
2774 * libsoup/soup-nossl.c: define some GError codes and stuff
2776 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
2777 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
2778 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
2781 * libsoup/soup-socket.c (soup_socket_write): Handle
2782 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
2783 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
2785 (read_from_network): Handle the reverse case (which would cause
2786 hanging rather than spinning, and might be the cause of some
2787 connector 1.5 slowness?)
2789 2004-05-11 Dan Winship <danw@novell.com>
2791 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
2792 kludgefully, using the magic of GClosure, to fix x86_64 problems
2795 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
2797 * libsoup/soup-soap-message.c (finalize) : free
2798 the elements of priv structure before freeing priv
2800 2004-04-20 Dan Winship <danw@ximian.com>
2802 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
2803 re-sending the message, call soup_message_restarted()
2804 (send_request): Connect to "restarted" signal, and remove the 401
2805 handlers from there; doing it here didn't work because if the
2806 connection was closed, the message would be re-sent on a new
2807 connection, but would still have the handlers from the old
2808 connection attached to it, which would make authentication fail.
2810 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
2811 Copy the handler list before starting, to protect against handlers
2812 that modify the handler list.
2814 2004-04-15 Dan Winship <danw@ximian.com>
2816 * libsoup/soup-connection.c (soup_connection_connect_sync):
2817 Connect to the socket's "disconnect" signal. (We were only doing
2818 this from the async version before, which meant that synchronous
2819 SoupConnections could outlive their sockets and start causing
2822 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
2823 Authorization header before adding a new one.
2825 2004-04-02 JP Rosevear <jpr@ximian.com>
2827 * configure.in: bump version, libtool number
2829 2004-03-15 Dan Winship <danw@ximian.com>
2831 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
2832 types to kill a warning with -Wall -O2
2834 2004-03-05 JP Rosevear <jpr@ximian.com>
2836 * configure.in: bump version, libtool number
2838 2004-03-02 Dan Winship <danw@ximian.com>
2840 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
2841 bytes_read is -1, since the value of errno is irrelevant when
2842 bytes_read is 0. Probably #54960.
2844 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
2846 * libsoup/soup-soap-response.h: removed not-implemented function's
2849 2004-02-27 Rodney Dawes <dobey@ximian.com>
2852 * libsoup/Makefile.am: Use a different variable for linking to the
2853 static version of gnutls, so we don't pull the .a files into the .pc
2857 2004-02-20 Dan Winship <danw@ximian.com>
2859 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
2860 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
2861 to make this work on 64-bit platforms. (Grr. C type checking
2864 * tests/revserver.c: Likewise
2866 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
2870 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
2871 don't leak the value returned from xmlNodeGetContent().
2872 (soup_soap_parameter_get_string_value,
2873 soup_soap_parameter_get_property): return a g_strdup'ed
2874 string, not the value returned by xmlNodeGetContent, so that
2875 callers can use g_free, and not xmlFree.
2877 * libsoup/soup-soap-response.h: made soup_parameter_get_property
2880 2004-02-17 Dan Winship <danw@ximian.com>
2882 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
2883 typo. #54433, from Mariano Suarez-Alvarez.
2885 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
2888 2004-02-17 Rodney Dawes <dobey@ximian.com>
2890 * libsoup/soup-message.c (soup_message_new): HTTP connections require
2891 a hostname, and we also hash on the host for message queueing in the
2892 session, if the host is NULL we free the SoupUri and return NULL
2894 2004-02-14 Dan Winship <danw@ximian.com>
2896 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
2897 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
2899 2004-02-12 Joe Shaw <joe@ximian.com>
2901 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
2902 loop to prevent DNS errors from short reads.
2904 2004-02-11 Joe Shaw <joe@ximian.com>
2906 * configure.in: Bumped version number to 2.1.7 and libtool
2909 2004-02-11 Dan Winship <danw@ximian.com>
2911 * libsoup/soup-connection.c (soup_connection_disconnect): Update
2912 Joe's comment here with a gory explanation of exactly what's going
2913 on. (It's not just an SSL bug either, it affects all connections.)
2915 2004-02-10 Joe Shaw <joe@ximian.com>
2917 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
2918 workaround for SSL connections which time-out but don't close the
2919 socket until we try sending data again later.
2921 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
2922 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
2923 own it, the SoupAddress does.
2925 2004-02-09 JP Rosevear <jpr@ximian.com>
2927 * configure.in: Bump libtool numbers
2929 2004-02-05 Dan Winship <danw@ximian.com>
2931 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
2933 (soup_session_remove_filter): And unref it here (we were already
2934 unreffing it in dispose().)
2936 2004-02-05 Joe Shaw <joe@ximian.com>
2938 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
2939 hostent if it's NULL.
2940 (soup_dns_entry_check_lookup): If the entry is resolved, but the
2941 hostent is NULL, uncache it.
2943 2004-02-04 Dan Winship <danw@ximian.com>
2945 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
2946 remove the WWW-Authenticate headers before returning, so the
2947 session won't fall back to Basic auth. Also, leave the connection
2948 in the "authenticating" state rather than setting it to
2950 (ntlm_authorize_post): Only requeue the message if it's in the
2951 "authenticating" state (and set it to "authenticated"). Fixes an
2952 "unepectedly disconnected" error if authentication fails.
2954 2004-02-03 Dan Winship <danw@ximian.com>
2956 * libsoup/soup-message-io.c (io_cleanup): Call
2957 soup_message_io_stop so we don't get a callback on the io after
2958 it's been cleaned up.
2960 * libsoup/soup-session.c (add_auth): Only remove the Authorization
2961 header if we have another one to add. (Otherwise it messes up
2962 SoupConnectionNTLM.)
2964 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
2965 memcpy here, since the source and destination will overlap if
2966 *nread is small and read_buf->len is large. (Noticed by valgrind,
2969 2004-02-02 Joe Shaw <joe@ximian.com>
2971 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
2972 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
2973 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
2974 when there are no messages on the wire on a non-blocking socket.
2975 This sends a SSL hangup message and then allows us to immediately
2978 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
2980 * configure.in: bumped version number to 2.1.6.
2982 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2984 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
2987 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2989 * libsoup/soup-soap-response.[ch]
2990 (soup_soap_parameter_get_string_value): removed 'const' from return
2993 2004-01-29 Joe Shaw <joe@ximian.com>
2995 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
2996 certificate before we try to use it. Ahem.
2998 2004-01-23 Joe Shaw <joe@ximian.com>
3000 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
3002 2004-01-21 Joe Shaw <joe@ximian.com>
3004 * configure.in: Require at least GnuTLS 1.0.0.
3006 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
3008 (verify_certificate): Use gnutls_x509_crt_import() and
3009 gnutls_x509_crt_check_hostname() instead of
3010 gnutls_x509_check_certificates_hostname().
3011 (init_dh_params): Use gnutls_dh_params_generate2() instead of
3012 gnutls_dh_params_generate() and gnutls_dh_params_set().
3014 2004-01-20 Joe Shaw <joe@ximian.com>
3016 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
3017 close the socket itself, so we need to do it or else our
3018 connections stay in CLOSE_WAIT forever.
3020 2004-01-16 Jason Leach <leach@wam.umd.edu>
3022 * libsoup/Makefile.am: builddir != srcdir fixes.
3024 2004-01-14 Joe Shaw <joe@ximian.com>
3026 * libsoup/soup-gnutls.c (verify_certificate): Remove the
3027 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
3029 2004-01-12 JP Rosevear <jpr@ximian.com>
3031 * configure.in: bump version and libtool revision
3033 2004-01-12 Dan Winship <danw@ximian.com>
3035 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
3038 2004-01-10 Larry Ewing <lewing@ximian.com>
3040 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
3043 2004-01-09 Joe Shaw <joe@ximian.com>
3045 * acinclude.m4: Include the libgnutls.m4 file.
3047 * configure.in: Remove manual checking for libgnutls-config and
3048 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
3049 version, which is 0.9.7 for now.
3051 * libsoup/Makefile.am: Some changes for the above change.
3053 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
3054 HAVE_GNUTLS_GNUTLS_H.
3055 (verify_certificate): Uncomment the SSL certificate hostname
3058 * libsoup/soup-session.c (set_property): Be smart about flushing
3059 our SSL credentials only when the CA file is set to something
3060 different than it was before.
3062 2004-01-09 Harish K <kharish@novell.com>
3063 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
3064 added code to ignore Header element, if present, while creating
3067 2004-01-05 Dan Winship <danw@ximian.com>
3069 * configure.in: Remove no-longer-relevant socklen_t check
3071 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
3072 Marcus Clarke, #52566)
3074 * libsoup/soup-dns.c: Likewise
3076 2003-12-29 JP Rosevear <jpr@ximian.com>
3078 * configure.in: bump version and libtool numbers
3080 2003-12-22 Dan Winship <danw@ximian.com>
3082 * README, TODO: Update these
3084 2003-12-22 Dan Winship <danw@ximian.com>
3086 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
3087 you can disconnect a socket from one thread while doing I/O in
3090 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
3091 soup_message_io_stop() and io_cleanup(), to separate out the "stop
3092 reading/writing" and "free data" phases to allow thread-safe
3093 synchronous cancellation.
3094 (soup_message_io_finished): call both soup_message_io_stop() and
3096 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
3097 doesn't already have a transport error status (eg, CANCELLED).
3098 (new_iostate): Call io_cleanup() if needed.
3100 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
3101 clearer that it's not a status.
3103 * libsoup/soup-message.c (finalize, restarted, finished,
3104 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
3105 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
3107 * libsoup/soup-connection.c (send_request): Remove
3108 soup_message_io_cancel call.
3110 * libsoup/soup-session-sync.c (send_message): Connect to the
3111 connection's "disconnected" signal rather than using a weak ref,
3112 since that's what we really care about, and it's possible that the
3113 connection may have an extra ref on it somewhere that would keep
3114 it from being destroyed even if it was disconnected.
3116 2003-12-20 Joe Shaw <joe@ximian.com>
3118 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
3119 the non-proxy case, then use the root ("/").
3121 2003-12-19 Dan Winship <danw@ximian.com>
3123 * libsoup/soup-message-filter.c: New. An interface for objects
3124 that want to act on every message passing through a session.
3125 (Initially being used for authentication, but could also be used
3126 for cache handling, cookie management, etc.)
3128 * libsoup/soup-connection.c (class_init, etc): Add a message
3130 (send_request): If the connection has a message filter set, run
3131 it on the message before sending it.
3132 (soup_connection_connect_async, etc): When setting up a tunnel, if
3133 we get back a 407 and the session tries to requeue the message,
3134 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
3135 whether or not the proxy closed the connection).
3136 (soup_connection_connect_sync): Likewise
3137 (send_request, request_done): Ref/unref the connection
3139 * libsoup/soup-session.c (soup_session_get_type): Implement the
3140 SoupMessageFilter interface.
3141 (soup_session_get_connection): Use the session as the connection's
3143 (soup_session_add_filter, soup_session_remove_filter): Add/remove
3144 filters from the session
3145 (setup_message): do auth handling, and call each of the session's
3146 filters' setup_message methods as well.
3147 (soup_session_send_message_via): No longer needed.
3148 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
3150 * libsoup/soup-session-async.c (run_queue): Use
3151 soup_connection_send_request, since soup_session_send_message_via
3154 * libsoup/soup-session-sync.c (send_message): Likewise
3156 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
3157 response to a CONNECT is always keepalive, even if it's HTTP/1.0
3158 with no Connection header.
3160 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
3162 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
3163 gobject interface types.
3165 * tests/get.c (main): Add a -p flag to specify a proxy
3167 * tests/simple-proxy.c: Fix #includes
3169 2003-12-18 Dan Winship <danw@ximian.com>
3171 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
3172 disconnect the socket rather than just unreffing it, since the IO
3173 code may be holding an extra ref on it.
3174 (send_request): connect to the "restarted" signal too
3175 (request_restarted): Deal with "Connection: close"
3177 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
3178 not go into an infinite loop if the server only supports Basic.
3180 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
3182 * libsoup/Makefile.am: install soup-message-queue.h with the rest
3185 2003-12-17 Dan Winship <danw@ximian.com>
3187 * configure.in: Add gthread to glib check
3189 * libsoup/soup-session.c: Make this an abstract class.
3191 * libsoup/soup-session-async.c: A SoupSession class for
3192 asynchronous gmain-based operation; replaces the old SoupSession.
3194 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
3195 blocking operation for use with threaded apps.
3197 * libsoup/soup-types.h, libsoup/soup.h: add the new session
3200 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
3201 try to unref the socket if the socket creation fails.
3202 (soup_connection_reserve): New, to explicitly mark a connection as
3203 being in use without queueing a message on it.
3205 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
3206 "block" flag to not be reversed.
3208 * libsoup/soup-message.c (finished): set status to FINISHED here.
3209 (soup_message_cancel): Gone; needs to be done at the session
3212 * libsoup/soup-message-queue.c: Add a mutex and make all of the
3213 operations thread-safe.
3215 * libsoup/soup-socket.c (disconnect_internal): Make this
3217 (soup_socket_connect): Make the sync case work correctly.
3219 * libsoup/Makefile.am: add the SoupSession subclasses
3221 * tests/Makefile.am: libsoup depends on libgthread now, so
3222 revserver doesn't need to explicitly.
3224 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
3225 soup_session_async_new().
3227 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
3229 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
3232 2003-12-16 Joe Shaw <joe@ximian.com>
3234 * libsoup/soup-connection.c (socket_connect_result,
3235 soup_connection_connect_sync): Only set up a tunnel if the
3236 destination protocol is HTTPS.
3238 * libsoup/soup-message.c (class_init): Add a default handler for
3240 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
3241 (soup_message_cancel): Don't set the status to
3242 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
3243 status is already SOUP_MESSAGE_STATUS_FINISHED.
3245 * libsoup/soup-session.c (set_property): Don't cancel the session
3246 if the proxy URI set as a property isn't different from the old
3248 (get_host_for_message): Refactor some code so that we can easily
3249 get the right SoupSessionHost for proxies as well as from the
3251 (authenticate_auth): Take a gboolean proxy parameter. Check it to
3252 see which URI (message URI or proxy URI) to use for
3253 authentication. Add a long comment about lack of clarity in RFC
3254 2617 with respect to proxies and protection spaces.
3256 2003-12-15 Dan Winship <danw@ximian.com>
3258 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
3259 soup_socket_write): s/guint/gsize/ to match the definitions in
3260 soup-socket.c. #52167.
3262 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
3264 * libsoup/soup-soap-message.c: removed debugging of the messages here.
3266 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
3268 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
3269 added information for SOAP-ENV namespace.
3271 2003-12-10 Dan Winship <danw@ximian.com>
3273 * libsoup/soup-message-client-io.c (parse_response_headers): if we
3274 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
3275 message's http_version so the keep-alive handling is correct.
3276 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
3278 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
3279 "restarted" signal as suggested by Joe.
3281 * libsoup/soup-message-io.c (soup_message_io_finished): emit
3282 either "restarted" or "finished" as appropriate
3284 * libsoup/soup-session.c (soup_session_queue_message): Connect to
3285 "restarted" and run the queue if a message gets restarted
3287 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
3290 2003-12-10 Tambet Ingo <tambet@ximian.com>
3292 * configure.in: Use autoconfig to check for socklen_t ...
3294 * libsoup/soup-address.c: ... and remove it from here ...
3296 * libsoup/soup-dns.c: ... and here.
3298 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
3300 * libsoup/soup-soap-message.c (soup_soap_message_persist):
3301 (soup_soap_message_parse_response): print out request/response's
3302 contents, if in debug mode.
3304 2003-12-07 JP Rosevear <jpr@ximian.com>
3306 * configure.in: Bump version
3308 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
3310 * libsoup/soup-soap-response.[ch]
3311 (soup_soap_parameter_get_first_child,
3312 soup_soap_parameter_get_first_child_by_name,
3313 soup_soap_parameter_get_next_child,
3314 soup_soap_parameter_get_next_child_by_name): new functions to
3315 manage SoupSoapParameter's children.
3316 (soup_soap_response_get_first_parameter): dont return a GList, but
3317 a SoupSoapParameter contained in the GList.
3319 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
3321 * libsoup/soup-soap-response.[ch]
3322 (soup_soap_parameter_get_string_value): new function.
3324 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
3326 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
3327 structure, to "hide" the usage of xmlNode's.
3328 (soup_soap_parameter_get_name): functions to manage SOAP
3329 response parameters.
3330 (soup_soap_response_get_first_parameter,
3331 soup_soap_response_get_first_parameter_by_name,
3332 soup_soap_response_get_next_parameter,
3333 soup_soap_response_get_next_parameter_by_name):
3334 new functions for an easy access to the response's parameters.
3335 (soup_soap_response_from_string): removed warnings.
3337 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
3339 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
3342 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
3344 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
3345 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
3347 (finalize): NULL out new private fields.
3348 (soup_soap_response_from_string): added validation code.
3350 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
3352 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
3355 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
3358 * libsoup/Makefile.am: added new files.
3360 2003-11-18 Rodney Dawes <dobey@ximian.com>
3362 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
3364 2003-11-18 Rodney Dawes <dobey@ximian.com>
3366 * acinclude.m4: Add GTK_DOC_CHECK
3368 2003-11-18 Dan Winship <danw@ximian.com>
3370 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
3371 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
3373 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
3375 * Makefile.am: updates for gtk-doc
3376 (SUBDIRS): add back "docs"
3378 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
3379 aren't around any more
3381 * docs/reference/*: set up gtk-doc
3383 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
3384 "libsoup". Remove unused defines.
3386 * libsoup/soup-connection.c: Fix doc comments
3387 * libsoup/soup-message.c: Likewise
3388 * libsoup/soup-misc.c: Likewise
3389 * libsoup/soup-socket.c: Likewise
3390 * libsoup/soup-uri.c: Likewise
3392 * libsoup/soup-address.h: Fixes to please gtk-doc
3393 * libsoup/soup-connection.h: Likewise
3394 * libsoup/soup-message.h: Likewise
3395 * libsoup/soup-message-private.h: Likewise
3396 * libsoup/soup-misc.h: Likewise
3397 * libsoup/soup-server-auth.h: Likewise
3398 * libsoup/soup-socket.h: Likewise
3399 * libsoup/soup-status.h: Likewise
3401 2003-11-18 Dan Winship <danw@ximian.com>
3403 * configure.in: Fix up the SSL checks some. Remove some useless
3406 * libsoup/soup-misc.h: declare soup_ssl_supported.
3408 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
3410 * libsoup/soup-nossl.c: Not an SSL implementation, built if
3411 HAVE_SSL is not defined.
3413 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
3415 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
3417 (listen_watch): Deal with soup_socket_start_ssl failing.
3419 * libsoup/soup-connection.c (tunnel_connect_finished,
3420 socket_connect_result, soup_connection_connect_sync): Deal with
3421 the soup_socket_start_ssl failing.
3423 * libsoup/soup-server.c (soup_server_new): Deal with
3424 soup_ssl_get_server_credentials failing
3426 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
3428 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
3429 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
3430 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
3431 soup_soap_message_end_header,
3432 soup_soap_message_start_header_element,
3433 soup_soap_message_end_header_element, soup_soap_message_write_int,
3434 soup_soap_message_write_double, soup_soap_message_write_base64,
3435 soup_soap_message_write_time, soup_soap_message_write_string,
3436 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
3437 soup_soap_message_set_null, soup_soap_message_add_attribute,
3438 soup_soap_message_add_namespace,
3439 soup_soap_message_set_default_namespace,
3440 soup_soap_message_get_namespace_prefix,
3441 soup_soap_message_set_encoding_style, soup_soap_message_reset,
3442 soup_soap_message_persist): new functions from old SoupSerializer.
3444 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3446 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
3447 soup_soap_message_new_from_uri): added a bunch of initialization
3449 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
3450 soup_soap_message_end_envelope, soup_soap_message_start_body,
3451 soup_soap_message_end_body, soup_soap_message_start_element,
3452 soup_soap_message_end_element):
3455 * configure.in: depend on libxml-2.0 for the SOAP code.
3457 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
3459 2003-11-17 Joe Shaw <joe@ximian.com>
3461 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
3464 * acinclude.m4: Include the gpg-error macros.
3466 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3468 * libsoup/soup-soap-message.[ch]: new class to make it easier to
3469 build SOAP messages.
3471 * libsoup/Makefile.am: added new files.
3473 * configure.in: increased version number.
3475 2003-10-24 Joe Shaw <joe@ximian.com>
3477 * libsoup/soup-address.c (update_address_from_entry): Call
3478 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
3479 one in addr->priv->lookup. Fixes a crash on synchronous DNS
3482 * libsoup/soup-server.c (soup_server_new): We need to ref the
3483 address we're binding to, because soup_socket_get_local_address()
3486 2003-10-23 Dan Winship <danw@ximian.com>
3488 * libsoup/soup-socket.c (init): Initialize flags to default
3491 2003-09-23 Dan Winship <danw@ximian.com>
3493 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
3494 note whether or not the CA file has been loaded.
3495 (SoupGNUTLSChannel): add a "hostname" field.
3496 (verify_certificate): Remove the comment about not being able to
3497 verify the hostname because of soup problems. Now it's because of
3498 GNUTLS problems instead.
3499 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
3500 and takes a hostname and a creds argument now.
3501 (soup_ssl_get_client_credentials,
3502 soup_ssl_get_server_credentials): Return client/server credentials
3504 (soup_ssl_free_client_credentials,
3505 soup_ssl_free_server_credentials): and free them.
3507 * libsoup/soup-session.c (class_init, set_property, get_property):
3508 add ssl_ca_file property
3509 (get_host_for_message): when returning an SSL host for the first
3510 time, create a client credentials structure for the session.
3511 (run_queue): Pass the ssl creds to the new connection. Also fix an
3512 unrelated bug that caused infinite loops on "bad hostname".
3514 * libsoup/soup-server.c: Use GObject properties, including
3515 ssl_cert_file and ssl_key_file properties.
3516 (soup_server_new): Remove "protocol" argument; if the cert file
3517 and key file properties were set, create a server credential
3518 structure from them and pass that to soup_socket_server_new.
3520 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
3521 dest_uri to origin_uri to match RFC 2616 terminology. Add an
3523 (class_init, set_property, get_property): add SSL_CREDS property
3524 (soup_connection_connect_async, soup_connection_connect_sync):
3525 Pass ssl_creds to soup_socket_client_new calls.
3527 * libsoup/soup-socket.c: Use GObject properties, including an
3529 (soup_socket_set_flags): Gone (replaced with boolean properties)
3530 (soup_socket_new): Make this take a list of properties
3531 (listen_watch): copy ssl creds from listener to new socket
3532 (soup_socket_start_ssl): Pass remote hostname and socket creds
3533 structure to soup_ssl_wrap_iochannel.
3534 (soup_socket_client_new_async, soup_socket_client_new_sync,
3535 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
3538 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
3539 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
3540 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
3543 * tests/get.c: add a "-c CAfile" argument, for loading a CA
3544 certificate file to validate https connections against
3546 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
3547 arguments for loading an SSL server certificate. Only start an SSL
3548 server if those arguments were used.
3550 * tests/test-cert.pem:
3551 * tests/test-key.pem: SSL certificate for testing simple-httpd
3553 * tests/revserver.c: Update for API changes
3554 * tests/simple-proxy.c: Likewise
3556 2003-09-22 Dan Winship <danw@ximian.com>
3558 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
3561 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
3562 (soup_set_security_policy, soup_get_security_policy): Remove,
3563 since the GNUTLS backend doesn't actually implement it.
3564 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
3566 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
3569 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
3572 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
3573 soup_ssl_get_server_iochannel into a single function that takes a
3576 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
3577 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
3578 (soup_gnutls_set_security_policy): Gone
3580 * libsoup/soup-gnutls.h
3581 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
3584 * libsoup/soup-socket.c: Move soup_sockaddr_max
3585 #define here from soup-private.h
3586 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
3589 * libsoup/soup-private.h: Gone
3591 * libsoup/soup-address.c: Fix #includes for soup-private.h and
3593 * libsoup/soup-auth-digest.c: Likewise
3594 * libsoup/soup-auth.c: Likewise
3595 * libsoup/soup-connection-ntlm.c: Likewise
3596 * libsoup/soup-connection.c: Likewise
3597 * libsoup/soup-dns.c: Likewise
3598 * libsoup/soup-gnutls.c: Likewise
3599 * libsoup/soup-headers.c: Likewise
3600 * libsoup/soup-message-client-io.c: Likewise
3601 * libsoup/soup-message-handlers.c: Likewise
3602 * libsoup/soup-message-io.c: Likewise
3603 * libsoup/soup-message-server-io.c: Likewise
3604 * libsoup/soup-message.c: Likewise
3605 * libsoup/soup-server-message.c: Likewise
3606 * libsoup/soup-server.c: Likewise
3607 * libsoup/soup-session.c: Likewise
3608 * libsoup/soup-socket.c: Likewise
3609 * tests/auth-test.c: Likewise
3611 2003-09-19 Dan Winship <danw@ximian.com>
3613 * libsoup/soup-address.c (update_address_from_entry): free the
3616 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
3619 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
3620 iochannel initialization. Not sure how this worked before...
3622 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
3623 from soup_message_prepare (and a few things removed).
3625 * libsoup/soup-message-client-io.c (soup_message_send_request):
3626 s/soup_message_prepare/soup_message_cleanup_response/
3628 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
3629 with "\0" on the headers before passing them to the parse
3631 (io_read): Call soup_message_cleanup_response after returning an
3632 informational response so the data doesn't leak.
3634 * libsoup/soup-headers.c (soup_headers_parse): Update for
3635 soup-message-io.c:io_read change
3637 * libsoup/soup-server.c (soup_server_new,
3638 soup_server_new_with_host): Don't leak the SoupAddress.
3640 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
3642 (set_property): If the proxy uri changes, call
3643 soup_session_abort() and cleanup_hosts().
3644 (request_finished, final_finished): Fix a bug when requeuing
3647 * tests/libsoup.supp: valgrind suppression file for soup tests
3649 * tests/Makefile.am (EXTRA_DIST): dist it.
3650 (noinst_PROGRAMS): move the former check_PROGRAMS to
3651 noinst_PROGRAMS instead.
3653 2003-09-18 Dan Winship <danw@ximian.com>
3655 * libsoup/soup-message.c: Add wrote_informational and
3656 got_informational signals.
3658 * libsoup/soup-message-client-io.c (get_request_headers): Set the
3659 EXPECT_CONTINUE flag on the message if that header is set.
3661 * libsoup/soup-message-server-io.c (parse_request_headers):
3664 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
3665 when blocking on an expect-continue. Emit wrote_informational
3666 instead of wrote_headers in the 1xx case.
3667 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
3668 reading a 100 Continue response. Emit got_informational instead of
3669 got_headers in the 1xx case.
3671 * libsoup/soup-session.c (soup_session_send_message): Reorder
3672 things to deal with the fact that the message could finish right
3673 away if there is a connection available and the server is very
3676 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
3677 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
3679 2003-09-17 Dan Winship <danw@ximian.com>
3681 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
3682 (one that pruned too little, one that pruned too much).
3683 (queue_message): When requeuing, don't run the queue;
3684 final_finished will take care of that later.
3685 (soup_session_abort): New, to cancel all pending requests.
3687 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
3688 the socket while waiting for the address to resolve
3690 2003-09-17 Dan Winship <danw@ximian.com>
3692 * libsoup/soup-connection.c (soup_connection_new): Replaces the
3693 three previous soup_connection_new* functions and uses gobject
3694 properties to set the destination and proxy uris.
3695 (class_init): set up two more signals, authenticate and
3697 (soup_connection_send_request): virtualize
3698 (send_request): Default implementation
3700 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
3701 also handles NTLM authentication. Includes all of the NTLM code
3702 formerly in soup-auth-ntlm.c.
3704 * libsoup/soup-auth-ntlm.[ch]: Gone.
3706 * libsoup/soup-auth.c: Remove NTLM refs
3708 * libsoup/soup-session.c (class_init): Add gobject properties for
3709 proxy, max_conns, use_ntlm. Change the "authenticate" and
3710 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
3711 can be used for authenticating SoupConnectionNTLM as well, which
3712 doesn't use a SoupAuth).
3713 (soup_session_new): Renamed from soup_session_new_default.
3714 (soup_session_new_with_options): Replaces
3715 soup_session_new_with_proxy and soup_session_new_full. Takes
3717 (run_queue): Create a new connection of type SoupConnection or
3718 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
3719 to its authenticate and reauthenticate signals.
3720 (connection_authenticate, connection_reauthenticate): proxy these
3723 * libsoup/soup-address.c (update_address_from_entry): Fix a
3724 crasher when failing to resolve the address.
3726 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
3727 working before" bugs.
3729 * libsoup/soup-message-client-io.c (soup_message_send_request):
3730 call soup_message_prepare() to clean up the existing response
3733 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
3734 when processing an OK EOF.
3736 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
3737 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
3739 * tests/auth-test.c (authenticate, reauthenticate): Update for new
3741 (main): Use soup_session_new.
3742 * tests/get.c (main): Likewise.
3743 * tests/simple-proxy.c (main): Likewise.
3745 2003-09-10 Dan Winship <danw@ximian.com>
3747 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
3749 (invalidate_auth): Remove the call to soup_auth_invalidate.
3750 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
3751 contain authentication, then emit "authenticate" or
3752 "reauthenticate" (depending on whether or not this is the first
3753 time we've asked for a password for this auth).
3754 (update_auth_internal): If the server rejects our
3755 username/password, don't bail out immediately. Try doing a
3756 "reauthenticate" first.
3758 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
3760 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
3762 (soup_auth_invalidate): Remove this; it doesn't actually do
3763 anything useful for us.
3765 * libsoup/soup-auth-basic.c (invalidate): Remove
3766 * libsoup/soup-auth-digest.c: (invalidate): Remove
3767 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
3769 * libsoup/soup-uri.c: Remove all references to "authmech".
3770 (soup_uri_set_auth): Remove this too.
3772 * tests/auth-test.c: Update to use the "authenticate" and
3773 "reauthenticate" signals instead of encoding usernames and
3774 passwords in the URIs. Add a few more test cases.
3776 2003-09-10 Dan Winship <danw@ximian.com>
3778 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
3779 "status" field from here, since it's mostly used by SoupSession,
3780 which shouldn't need access to SoupMessagePrivate.
3782 * libsoup/soup-message.h (SoupMessage): Move it here.
3783 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
3784 (soup_message_set_uri): also moved from soup-message-private.h
3786 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
3788 * libsoup/soup-message-handlers.c:
3789 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
3791 * libsoup/soup-message-io.c (soup_message_io_client,
3792 soup_message_io_server, soup_message_io_unpause): Don't set up an
3793 idle handler, just jump right in to reading/writing; if this is a
3794 synchronous socket, then the caller wants to block, and if it's
3795 not, then we'll quickly get an EAGAIN anyway.
3797 * libsoup/soup-session.c: (queue_message): Likewise.
3798 (*) Update for SoupMessageStatus move and remove
3799 soup-message-private.h include.
3801 * libsoup/soup-server-message.c: Remove soup-message-private.h
3804 * libsoup/soup-server.c: Likewise.
3806 * libsoup/soup-connection.c (soup_connection_is_connected,
3807 soup_connection_is_new): Remove these, since they weren't being
3810 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
3811 avoid namespace pollution.
3813 * libsoup/soup-auth-digest.c: Update for that.
3814 * libsoup/soup-server-auth.c: Likewise
3816 * tests/auth-test.c: Remove soup-message-private.h include
3818 2003-09-09 Dan Winship <danw@ximian.com>
3820 Beginnings of improved synchronous API support
3822 * libsoup/soup-dns.c: Simplify this by making it not automatically
3823 return the result: force the caller to poll. (This isn't really a
3824 performance issue: the results should come back quickly anyway.)
3825 Also, make the cache thread-safe.
3826 (soup_dns_entry_from_name): Was soup_gethostbyname
3827 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
3828 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
3829 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
3830 blocks if it's not resolved yet).
3832 * libsoup/soup-address.c: Update for soup-dns changes.
3833 (soup_address_new): Don't automatically start resolving the
3834 hostname now, since we don't know if the caller is going to want
3835 it resolved synchronously or asynchronously.
3836 (soup_address_resolve_async): Renamed from soup_address_resolve.
3837 (soup_address_resolve_sync): New routine to do blocking
3840 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
3841 status value directly when connecting synchronously.
3842 (soup_socket_client_new_async, soup_socket_client_new_sync):
3843 Separate async/sync client socket functions.
3844 (soup_socket_get_iochannel): Made static since it was not used
3845 outside soup-socket.
3847 * libsoup/soup-connection.c (soup_connection_new,
3848 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
3849 up the data, don't actually start connecting.
3850 (soup_connection_connect_async, soup_connection_connect_sync): New
3851 async and sync SoupConnection connecting routines.
3852 (soup_connection_get_socket): Remove this since it wasn't being
3855 * libsoup/soup-session.c (final_finished): Run the queue since a
3856 connection is now freed up.
3857 (run_queue): Update for soup_connection_new* changes.
3859 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
3860 wasn't being used any more.
3862 * libsoup/soup-private.h: Remove some prototypes for functions
3863 that no longer exist.
3865 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
3866 (copies the protocol, host, and port of a SoupUri).
3868 * tests/auth-test.c:
3870 * tests/simple-proxy.c: belatedly update for soup-session change
3872 * tests/revserver.c: Handle each new connection in its own thread,
3873 using synchronous SoupSocket calls.
3875 2003-09-05 Dan Winship <danw@ximian.com>
3877 * libsoup/soup-session.c: Move a bunch of logic here from
3878 soup-context. Now the session keeps track of hosts (instead of
3879 having a global soup_hosts hash) and their connections.
3880 (soup_session_new_with_proxy, soup_session_new_full): New session
3881 constructors to specify a proxy or a proxy and connection limits
3882 (send_request): Add Authorization and Proxy-Authorization headers
3883 before sending off the request.
3884 (soup_session_queue_message, et al): Improve the way this works.
3885 There's no need to use timeouts to wait for connections to become
3886 free; we *know* when they become free.
3888 * libsoup/soup-private.h: Remove SoupHost and some other
3889 no-longer-used stuff.
3891 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
3892 soup_set_connection_limit, soup_set_connection_limit): Gone. These
3893 are all per-session now.
3895 * libsoup/soup-message.c: Remove all SoupContext references
3896 (mostly replaced with SoupUri references)
3897 (cleanup_message): priv->connect_tag and priv->connection are gone
3898 now, so this was just soup_message_io_cancel(). So remove
3899 cleanup_message and replace it with that everywhere.
3900 (soup_message_disconnect): Gone.
3901 (soup_message_set_uri): Replaces soup_message_set_context.
3902 (soup_message_set_connection, soup_message_get_connection): Gone
3904 * libsoup/soup-message-server-io.c (parse_request_headers):
3905 s/soup_message_set_context/soup_message_set_uri/
3907 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
3908 connect_tag, context, and connection.
3910 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
3912 * libsoup/soup-context.c: Gone
3914 * tests/auth-test.c (identify_auth): update for session/context
3917 2003-09-03 Dan Winship <danw@ximian.com>
3919 * libsoup/soup-status.h: Renamed from soup-error.h, with types
3920 and defines renamed accordingly.
3922 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
3923 status_code and errorphrase to reason_phrase. Remove errorclass.
3924 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
3925 as being either "errors" or "not errors", so its semantics are
3926 guaranteed to be wrong sometimes.
3928 * libsoup/soup-message.c (soup_message_set_status,
3929 soup_message_set_status_full): Renamed
3931 * libsoup/soup-message-handlers.c
3932 (soup_message_add_status_code_handler,
3933 soup_message_add_status_class_handler): Rename.
3935 * libsoup/soup-session.c (soup_session_send_message): Make this
3936 return a status code rather than a status class.
3938 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
3939 unrelated unused fields (retries, callback, user_data).
3943 2003-09-02 Dan Winship <danw@ximian.com>
3945 * libsoup/soup-session.c: First draft at the new object to
3946 maintain formerly-global state. (Not yet complete; still need to
3947 get rid of SoupContext).
3949 * libsoup/soup-message-queue.c: Data structure used by SoupSession
3951 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
3952 some bits went into soup-connection.
3954 * libsoup/soup-connection.c (soup_connection_send_request): New,
3955 to send a request on a connection. The connection updates its
3956 internal state and then hands off to soup_message_send_request.
3957 (request_done): Callback set up by soup_connection_send_request.
3958 Marks the connection as no-longer-in-use, and disconnects it if
3959 the message says to.
3960 (soup_connection_set_in_use, soup_connection_mark_old): No longer
3961 needed; the connection takes care of this itself now.
3962 (soup_connection_new_proxy): New, to create a new connection that
3963 is explicitly marked as being through an HTTP proxy.
3964 (soup_connection_new_tunnel): New, to create a new HTTPS
3965 connection through a proxy. (Includes the code to send the
3968 * libsoup/soup-context.c (try_existing_connections): Don't need to
3969 call soup_connection_set_in_use.
3970 (try_create_connection): Use soup_connection_new,
3971 soup_connection_new_proxy, or soup_connection_new_tunnel as
3974 * libsoup/soup-message.c (soup_message_prepare): Replaces
3976 (soup_message_queue, soup_message_requeue, soup_message_prepare):
3977 Gone. This must be done via a SoupSession now.
3978 (soup_message_set_connection): don't need to mark in_use/not
3979 in_use. Also, msg->priv->socket is gone now.
3980 (soup_message_get_socket): Gone.
3982 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
3983 Remove references to global handlers.
3984 (redirect_handler, authorize_handler): Moved to soup-session.c.
3986 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
3987 session to shut down now.
3989 * libsoup/soup.h: add soup-session.h
3991 * libsoup/Makefile.am: updates
3993 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
3996 2003-08-29 Dan Winship <danw@ximian.com>
3998 * libsoup/soup-message-io.c: Major rewrite. There is now only a
3999 single IO state object (instead of one for reading and one for
4000 writing), and the IO code handles switching back and forth between
4001 reading and writing as appropriate (including handling the extra
4002 switches needed for "Expect: 100-continue").
4003 (soup_message_io_client, soup_message_io_server): The new entry
4005 (soup_message_io_cancel): If the caller cancels the IO when we
4006 were expecting to read more data, disconnect the socket.
4008 * libsoup/soup-message.h (SoupMessageFlags): add
4009 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
4010 do the special expect-continue handling.
4012 * libsoup/soup-message.c: Move all the signal stuff here. Remove
4013 the "done_reading" and "done_writing" signals and replace them
4014 with a single "finished" signal. (A single signal. Say that 10
4016 (soup_message_got_headers, etc): Functions to emit signals.
4017 (got_headers, got_chunk, got_body): Default signal methods that
4018 call soup_message_run_handlers.
4019 (finished): Default signal method that replaces
4020 soup_message_issue_callback.
4021 ([various]): s/soup_message_issue_callback/soup_message_finished/
4022 (soup_message_requeue): There's no soup_message_set_read_callbacks
4023 any more, so if the caller requeues while it's still reading, just
4025 (soup_message_add_chunk, soup_message_add_final_chunk,
4026 soup_message_pop_chunk): Moved here from soup-server-message,
4027 although we don't actually quite support using chunked encoding
4030 * libsoup/soup-server-message.c (soup_server_message_new): No
4031 longer takes a socket argument.
4032 (soup_server_message_add_chunk, soup_server_message_get_chunk):
4033 Moved into SoupMessage.
4035 * libsoup/soup-message-handlers.c (global_handlers): Make these
4036 POST_BODY rather than PRE_BODY, so they won't mess up the IO
4037 channel when the requeue the message.
4038 (soup_message_run_handlers): Don't need to issue the message
4039 callback from here any more.
4040 (authorize_handler): Just leave the error as 401 or 407 (see
4041 soup-error.h change)
4043 * libsoup/soup-message-client-io.c (soup_message_send_request):
4044 Replaces soup_message_write_request and
4045 soup_message_read_response.
4047 * libsoup/soup-message-server-io.c: Parallel to
4048 soup-message-client-io.c, this defines the server-side header
4050 (soup_message_read_request): Its entry point.
4052 * libsoup/soup-server.c: Lots of code moved into
4053 soup-message-server-io.c. Update for other changes.
4055 * libsoup/soup-queue.c: Update for changes
4057 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
4058 Don't call soup_socket_disconnect() on an error, just return
4059 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
4060 signals that will mess up the caller of the read/write function.
4062 * libsoup/soup-connection.c (soup_connection_disconnect): When
4063 disconnecting the socket, disconnect from its signals first to
4064 prevent bad reentrancy.
4066 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
4067 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
4068 anything that SOUP_ERROR_UNATHORIZED and
4069 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
4070 "transport" errors actually are transport-related.)
4072 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
4074 * tests/simple-proxy.c: Complicate this a bunch. In particular,
4075 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
4076 pass the data back to the client in chunked format.
4078 2003-08-27 Dan Winship <danw@ximian.com>
4080 * libsoup/soup-types.h: New header with typedefs, to avoid
4081 #include loops among other headers.
4083 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
4085 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
4087 2003-08-26 Dan Winship <danw@ximian.com>
4089 * libsoup/soup-message-client-io.c (soup_message_write_request,
4090 soup_message_read_response): Higher-than-soup-message-io-level
4091 functions to do client-side IO. (Code that used to be in
4093 (get_request_header_cb): Fix a bug in the generation of the Host:
4094 header; need to include the port number if it's not the default.
4096 * libsoup/soup-message-io.c (soup_message_write,
4097 soup_message_write_simple): Take separate user_datas for the get_*
4098 callbacks and the done callbacks.
4100 * libsoup/soup-queue.c: Update to use soup_message_write_request
4101 and soup_message_read_response.
4103 * libsoup/soup-connection.c (soup_connection_new): Change the
4104 prototype to take a SoupUri and a callback.
4106 * libsoup/soup-context.c (try_create_connection,
4107 soup_context_connect_cb): Update for soup_connection_new change.
4109 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
4110 for soup_message_write changes
4112 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
4115 2003-08-26 Dan Winship <danw@ximian.com>
4117 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
4118 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
4119 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
4121 * libsoup/soup-message.c (class_init): set up signals
4122 (requeue_read_finished): Update for changes.
4124 * libsoup/soup-message-io.c (soup_message_read): Split out
4125 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
4126 arg to say where to store the message body. Set up
4127 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
4129 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
4130 (read_body_chunk): emit READ_CHUNK.
4131 (issue_final_callback): Set r->body. emit READ_BODY.
4132 (failed_read): emit READ_ERROR.
4133 (soup_message_read_set_callbacks): Disconnect old signal handlers,
4135 (soup_message_read_cancel): Disconnect signal handlers.
4136 (soup_message_write, soup_message_write_simple): Set up
4137 wrote_body_cb and error_cb as signal handlers.
4138 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
4139 nothing currently ever listens for them. emit WROTE_BODY when
4141 (failed_write): emit WRITE_ERROR
4143 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
4144 soup_queue_read_headers_cb): Split this into two unequal chunks.
4145 (read_header_cb only runs the pre-body handlers).
4146 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
4148 (soup_queue_write_done_cb): Update call to soup_message_read
4150 * libsoup/soup-server.c (parse_headers_cb): Renamed from
4152 (read_done_cb): Update prototype
4153 (start_request): Update soup_message_read call.
4155 2003-08-25 Dan Winship <danw@ximian.com>
4157 * libsoup/soup-message-io.c (soup_message_read,
4158 soup_message_write, soup_message_write_simple): Add a "user_data"
4159 arg, pass it to the callbacks.
4161 * libsoup/soup-message.c (soup_message_requeue,
4162 requeue_read_finished, requeue_read_error): Update for that
4164 * libsoup/soup-queue.c: Likewise
4166 * libsoup/soup-server.c: Likewise
4168 2003-08-25 Dan Winship <danw@ximian.com>
4170 * libsoup/soup-message.c (soup_message_new): Take a uri string
4171 instead of a context. Also, swap the args (so the method comes
4172 before the URI, just like in the protocol).
4173 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
4174 SoupUri instead of a string
4175 (soup_message_set_request, soup_message_set_response): Replace
4176 soup_message_new_full.
4177 (cleanup_message): Was soup_message_cleanup, but is static now.
4178 (queue_message): Do the pre-queuing message cleanup here instead
4179 of in soup_queue_message.
4180 (soup_message_queue): Set the callback and user_data, then call
4182 (requeue_read_error, requeue_read_finished, soup_message_requeue):
4184 (soup_message_get_uri): Replaces soup_message_get_context.
4186 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
4187 part of SoupMessagePrivate now)
4189 * libsoup/soup-context.c: #include soup-message-private
4190 (soup_context_from_uri): constify the uri arg.
4192 * libsoup/soup-queue.c: Various context/uri fixes
4193 (proxy_https_connect): Use soup_message_new_from_uri.
4194 (soup_queue_message): Drastically simplified since most of the
4195 work is in soup-messsage.c:queue_message() now
4197 * libsoup/soup-auth-digest.c (compute_response,
4198 get_authorization): Use soup_message_get_uri.
4200 * libsoup/soup-server-auth.c (parse_digest): Likewise
4202 * libsoup/soup-server.c (call_handler): Likewise
4204 * tests/simple-httpd.c (server_callback): Likewise.
4206 * tests/simple-proxy.c (server_callback): Likewise
4208 * tests/get.c (got_url): Likewise.
4209 (get_url): Update soup_message_new usage.
4211 * tests/auth-test.c: #include soup-message-private. Update for
4212 context changes and soup_message_new change.
4214 2003-08-22 Dan Winship <danw@ximian.com>
4216 * libsoup/soup-message-private.h: New file containing
4217 SoupMessagePrivate and some other soup-message-internal
4218 types/functions. Also includes the new, expanded SoupMessageStatus
4221 * libsoup/soup-message-io.c: Replaces what used to be in
4222 soup-transfer, but now all the interfaces take SoupMessages
4223 instead of SoupReader/SoupWriter and deal with maintaining
4224 msg->priv->{read,write}_state themselves. Fixes up all the
4225 refcounting madness.
4227 * libsoup/soup-message-handlers.c: Move the handler code here,
4228 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
4229 to make the distinction from SoupHandlerKind clearer.)
4231 * libsoup/soup-message.c: Update for soup-message-io and new
4232 SoupMessageStatus values. Remove handler code.
4233 (soup_message_cleanup): Remove the hack to try to preserve the
4234 connection if the message gets cleaned up before it finishes
4235 reading. soup_message_requeue handles this in the requeuing case,
4236 and there's no especially compelling reason to bother doing it in
4237 any other case. (And the soup-message-io api doesn't support
4238 having a read operation that's not connected to any message.)
4240 * libsoup/soup-private.h: remove SoupMessagePrivate
4242 * libsoup/soup-queue.c: Update for soup-message-io and new
4243 SoupMessageStatus values.
4245 * libsoup/soup-server-message.c: Likewise
4247 * libsoup/soup-server.c: Likewise
4249 * libsoup/soup-transfer.c: Gone (yay)
4251 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
4253 2003-08-20 Dan Winship <danw@ximian.com>
4255 * libsoup/soup-message.c: Make this a GObject. (Note that since
4256 SoupMessage was not refcounted before, it's not really refcounted
4258 (soup_message_free): Gone, replaced by g_object_unref
4259 (soup_message_copy, soup_message_foreach_remove_header): Remove
4260 these, since neither was currently functional.
4261 (soup_message_is_keepalive): New utility function to look at
4262 HTTP version and request/response headers to decide if a message
4263 indicates the connection should be kept alive.
4264 (soup_message_set_connection, soup_message_get_connection): New
4265 (soup_message_get_socket): New
4267 * libsoup/soup-server-message.c: Make this a subclass of
4269 (soup_server_message_new): Now takes a SoupServer and SoupSocket
4270 (soup_server_message_get_server): New
4271 (soup_server_message_set_encoding,
4272 soup_server_message_get_encoding): Get/set whether the message
4273 should be sent with content-length or chunked encoding
4274 (soup_server_message_is_started, soup_server_message_is_finished):
4275 Private member accessors.
4276 (soup_server_message_add_chunk): Renamed from add_data
4277 (soup_server_message_get_chunk): Pops a chunk from the list.
4278 (soup_server_message_get_source): Gone
4280 * libsoup/soup-server.c: Update for SoupServerMessage changes.
4281 (error_cb, write_done_cb): All the cleanup stuff that used to be
4282 here happens automatically by unreffing the message now.
4283 (get_response_header): Remove some erroneous leftover CGI stuff
4284 (issue_bad_request): add "Connection: close" to the response.
4285 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
4286 with no Host header as per RFC 2616.
4288 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
4289 (soup_connection_set_in_use): Let the caller set the connection to
4290 "not in use" even after the socket has been disconnected.
4292 * libsoup/soup-context.c: Use soup_message_get_connection
4294 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
4295 check on request length, since it was rejecting
4296 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
4298 * libsoup/soup-queue.c: Use soup_message_get_connection and
4299 soup_message_get_socket.
4300 (soup_queue_read_done_cb): Use soup_message_is_keepalive
4301 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
4302 soup_connection_start_ssl
4304 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
4305 handlers if the socket hasn't been disconnected yet.
4307 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
4308 reader_read): Fix these so that reader_read will exit properly if
4309 the read is cancelled.
4311 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
4313 * tests/simple-httpd.c (server_callback): set the message to
4314 content-length encoding.
4315 * tests/simple-proxy.c (server_callback): Likewise
4317 2003-08-19 Dan Winship <danw@ximian.com>
4319 * libsoup/soup-socket.c (soup_socket_read,
4320 soup_socket_read_until, soup_socket_write): New API for doing
4321 socket IO. Works both synchronously and asynchronously, and
4322 buffers data to prevent the "100 Continue" problem.
4323 (soup_socket_set_flag): Replaces formerly-private
4324 soup_set_sockopts. (primarily to let the caller turn off
4325 SOUP_SOCKET_FLAG_NONBLOCKING).
4327 * libsoup/soup-transfer.c (soup_transfer_read,
4328 soup_transfer_write, soup_transfer_write_simple): Take a
4329 SoupSocket instead of a GIOChannel. Use the new socket IO api.
4330 Changed the prototypes of some of the callbacks to be less
4333 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
4334 soup_connection_get_iochannel.
4336 * libsoup/soup-message.c: Fix up for soup-transfer changes
4338 * libsoup/soup-queue.c: Likewise
4340 * libsoup/soup-server.c: Likewise
4342 * tests/revserver.c: A slightly more complicated replacement for
4343 timeserver. (Does both reads and writes)
4345 2003-08-19 Dan Winship <danw@ximian.com>
4347 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
4348 configure it, and no one has complained, and it looks like the
4349 SOCKS5 auth code doesn't actually work anyway...
4351 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
4353 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
4354 SOUP_PROTOCOL_SOCKS5
4356 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
4358 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
4361 2003-08-19 Dan Winship <danw@ximian.com>
4363 * libsoup/soup-server.c: Make this a GObject. Remove
4364 SoupServerMessage code (to soup-server-message.c). Remove CGI
4365 server code (for now?)
4366 (soup_server_add_handler, soup_server_remove_handler): Rename
4367 (from register/unregister) to make it clearer what they do.
4369 * libsoup/soup-server-message.c: Moved out of soup-server.c
4371 * libsoup/soup-private.h: Remove SoupServer def
4373 * libsoup/Makefile.am (libsoupinclude_HEADERS,
4374 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
4376 * tests/simple-httpd.c:
4377 * tests/simple-proxy.c: Update for SoupServer changes
4379 2003-08-18 Dan Winship <danw@ximian.com>
4381 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
4382 a struct sockaddr again (like it used to be). In particular, add
4383 back the "port" field. Add a bunch of macros to try (and fail) to
4384 simplify some of the code.
4385 (soup_address_new): Now returns a SoupAddress directly rather than
4386 a random handle, and the caller can just use g_object_unref to
4387 cancel the lookup. Also, the callback now uses a
4388 SoupKnownErrorCode rather than a special-purpose address-lookup
4390 (soup_address_new_cancel): No longer needed.
4391 (soup_address_new_sync): Removed
4392 (soup_address_new_any): Replaces soup_address_ipv4_any and
4393 soup_address_ipv6_any.
4394 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
4396 (soup_address_get_physical): Renamed from
4397 soup_address_get_canonical_name.
4398 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
4400 * libsoup/soup-socket.c: Update for SoupAddress changes and make
4401 similar changes here.
4402 (soup_socket_new): Just creates a generic SoupSocket now.
4403 (soup_socket_connect): Client setup
4404 (soup_socket_listen): Server setup. Now also sets up an iochannel
4405 listening for connects and emits a "new_connection" signal as they
4407 (soup_socket_start_ssl): Turns on SSL.
4408 (soup_socket_client_new, soup_socket_server_new): Utility
4409 functions that wrap the above.
4410 (soup_socket_new_cancel, soup_socket_new_sync): Gone
4411 (soup_socket_server_accept, soup_socket_server_try_accept): No
4413 (soup_socket_get_iochannel): No longer adds a ref when returning
4414 the iochannel. Also, we set it to "close_on_unref" so that if a
4415 caller adds a ref to it, the connection will actually remain open
4416 even after the SoupSocket is destroyed.
4417 (soup_socket_get_local_address, soup_socket_get_remote_address):
4418 Let the caller get both of these.
4420 * libsoup/soup-connection.c: Don't keep a private copy of the
4422 (soup_connection_new): Don't need to set socket options here.
4424 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
4425 (soup_connection_get_iochannel): Just return the socket's
4426 iochannel (and don't ref it)
4428 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
4429 SOUP_ERROR_CANT_RESOLVE_PROXY
4431 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
4432 Remove the "FIXME add a CANT_RESOLVE error" and return
4433 SOUP_ERROR_CANT_RESOLVE instead.
4435 * libsoup/soup-server.c: Update for socket/address changes. Don't
4436 poke into SoupSocket's private fields.
4437 (soup_server_run_async): Just connect to the socket's
4438 "new_connection" signal.
4440 * libsoup/soup-context.c (try_create_connection,
4441 soup_context_connect_cb): Update for socket changes. Replace
4442 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
4444 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
4445 to connect to a signal handler and connect another function to
4446 clean up the first signal handler after its first invocation.
4447 (Lets us use signals to replace one-off callbacks.)
4449 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
4450 actually private now.
4451 (struct _SoupServer): Remove accept_tag.
4453 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
4454 Don't unref the iochannel.
4455 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
4457 * libsoup/soup-socks.c: Update for socket/address changes
4459 * tests/simple-httpd.c (main):
4460 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
4461 * tests/simple-proxy.c (main): Likewise
4463 * tests/timeserver.c: Update for SoupSocket's "new_connection"
4464 signal, and for SoupAddress changes.
4466 2003-08-14 Dan Winship <danw@ximian.com>
4468 * libsoup/soup-connection.c: New, split out from soup-context and
4469 made into a GObject.
4470 (soup_connection_disconnect): Disconnects the connection and emits
4471 a signal. (Replaces the old "keep_alive" flag.)
4472 (soup_connection_is_connected): Checks if the connection is still
4474 (connection_died): Just disconnect, rather than freeing the
4475 connection. This way if anyone else is still referencing it they
4476 won't end up with an invalid pointer.
4478 * libsoup/soup-context.c: Make this a GObject, remove all the
4479 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
4480 SoupContext can keep track of connection auth stuff there without
4481 SoupConnection needing to care. Various other updates.
4483 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
4486 * libsoup/*.c, tests/get.c: Update for context/connection changes
4488 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
4489 definition to deal with the fact that there's no
4490 soup_connection_get_context any more.
4492 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
4493 with connection persistence here.
4494 (soup_queue_read_done_cb): Do it here instead. Disconnect the
4495 connection when appropriate.
4496 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
4497 Reference-count the connection properly. (I think.)
4499 * libsoup/soup-marshal.list: New, for SoupConnection's
4500 "disconnected" signal.
4502 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
4504 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
4505 GLIB_GENMARSHAL gets set too.
4507 2003-08-14 Dan Winship <danw@ximian.com>
4509 * libsoup/soup-error.c: Fix a spelling mistake.
4511 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
4513 2003-08-12 Dan Winship <danw@ximian.com>
4515 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
4516 of the interfaces around a little bit.
4518 * libsoup/soup-auth-basic.c: subclass for Basic auth
4520 * libsoup/soup-auth-digest.c: subclass for Digest auth
4522 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
4523 the code from soup-ntlm.c here, and make it private.
4525 * libsoup/soup-ntlm.c: gone
4527 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
4528 here, and change the signature of SoupAuthorizeFn.
4530 * libsoup/soup-context.c: Use g_object_unref to free auths, use
4531 methods instead of directly access private fields.
4533 * libsoup/soup-queue.c: Likewise
4535 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
4536 NTLM references. We have no plans to implement server-side NTLM
4539 * tests/auth-test.c (identify_auth): Update for auth api changes
4541 2003-08-12 Dan Winship <danw@ximian.com>
4543 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
4546 * libsoup/soup-address.c: Make this a GObject.
4547 (soup_address_ref, soup_address_unref): Gone.
4548 (soup_address_copy): Gone. Wasn't being used anyway.
4550 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
4551 here from soup-address.c, so that soup-address doesn't need to
4552 worry about trying to cache zero-ref addresses.
4554 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
4555 consistently for port numbers.
4556 (soup_socket_ref, soup_socket_unref): Gone.
4558 * libsoup/soup-private.h: Change the SoupSocket definition to be
4559 SoupSocketPrivate. (Still need to keep this here since soup-server
4560 pokes around in its internals.)
4561 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
4563 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
4564 reader/writer rather than leaking them.
4566 * libsoup/*: Use GObject methods for socket/address refcounting
4568 * tests/auth-test.c (main)
4569 * tests/timeserver.c (main): Call g_type_init.
4571 * tests/get.c (main): Call g_type_init.
4572 (get_url, got_url): Fix some bugs that could make -r mode get into
4573 infinite loops downloading the same files over and over. Plug some
4574 memory leaks to make this more useful for valgrinding libsoup.
4576 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
4577 handler for SIGINT so we can exit cleanly, since valgrind won't
4578 give a leak report if you don't. Plug a few memory leaks.
4580 * tests/simple-proxy.c (main): Likewise
4582 2003-08-12 Dan Winship <danw@ximian.com>
4584 Pull over some new test programs from the soup-refactoring branch,
4585 along with the SoupUri changes they depend on.
4587 * tests/simple-httpd.c: A really simple HTTP server, to test the
4590 * tests/simple-proxy.c: An even simpler HTTP proxy
4592 * tests/get.c: Add "-r" flag to recursively get files (thereby
4593 testing multiple-connections-at-once code). Also good for setting
4594 up a tree to use with simple-httpd.
4596 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
4599 * tests/uri-parsing.c: Regression test for the new soup-uri.c
4601 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
4602 pull in some optimizations from camel-url. Also, make SoupProtocol
4603 a GQuark so we can still compare them with ==, but we can also
4604 recognize any protocol.
4605 (soup_uri_new_with_base): New, to merge base and relative URIs
4606 (soup_uri_to_string): Update this. Change the "show_password" flag
4607 (which we always passed FALSE for) to "just_path", for places that
4608 want the path+query without the protocol, host, etc.
4610 * libsoup/soup-queue.c (soup_get_request_header): Just use
4611 soup_uri_to_string to generate the request URI.
4613 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
4614 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
4615 the URI by hand badly.
4616 * libsoup/soup-server-auth.c (parse_digest): Likewise
4618 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
4619 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
4622 * libsoup/soup-context.c (soup_context_uri_hash,
4623 soup_context_uri_equal): s/querystring/query/
4625 2003-08-12 Dan Winship <danw@ximian.com>
4627 * configure.in: Bump API version to 2.2 and package version to
4628 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
4629 libgnutls-config to find GNUTLS.
4631 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
4633 * Makefile.am: Update for pc file rename
4635 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
4636 and libsoup-ssl-proxy stuff.
4638 * libsoup/soup-ssl-proxy.c
4639 * libsoup/soup-nss.[ch]
4640 * libsoup/soup-openssl.[ch]: gone
4642 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
4644 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
4645 auth_test_LDADD): Update libsoup version
4647 2003-08-07 Dan Winship <danw@ximian.com>
4649 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
4650 soup_auth_invalidate): These are all really SoupContext functions,
4651 so move them to soup-context.c (and rename them appropriately).
4652 (soup_auth_get_protection_space): New method to get the
4653 "protection space" of an auth (paths where it is valid).
4654 (soup_auth_invalidate): New method to try to un-authenticate an
4655 auth (so we can keep the domain info cached even if the auth info
4657 (basic_pspace_func): Basic protection space is all directories
4658 below the current one.
4659 (basic_invalidate_func): Clear the encoded username/password
4660 (digest_pspace_func): Digest protection space is either the whole
4661 server, or "what the domain parameter says" (though we don't deal
4662 with cross-host domains).
4663 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
4665 (digest_parse_func, digest_free): Set/free domain parameter
4666 (ntlm_pspace): NTLM protection space is always the whole server.
4667 (ntlm_invalidate): Clear the auth state.
4668 (soup_auth_new_ntlm): Make this non-static
4669 (SoupAuth): Replace the quad-state "status" field with an
4670 "authenticated" boolean.
4672 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
4673 hash with separate "auth_realms" (path->realm) and "auths"
4674 (realm->auth) hashes. Also add a "use_ntlm" flag.
4676 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
4678 (connection_free): Don't the connection's auth, just free it.
4679 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
4680 does two-stage lookup (path->realm then realm->auth) and also
4681 deals with NTLM hacks.
4682 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
4683 but also large parts of authorize_handler. Updates the auth hashes
4684 based on information from a 401 or 407 response. Does a better job
4685 than authorize_handler did of not throwing away good information.
4686 (soup_context_preauthenticate): New; fakes up auth info so that
4687 requests will end up using authentication without the server
4688 needing to return an error first.
4689 (soup_context_authenticate_auth): Moved out of authorize_handler
4690 so it can be used at request-sending time too, if we know that we
4691 need it. (That way we can avoid requeuing the request if it isn't
4692 going to be able to be authenticated.)
4693 (soup_context_invalidate_auth): Sort of like the old
4694 soup_auth_invalidate, but only destroys the auth data, while still
4695 remembering the path->realm mapping.
4697 * libsoup/soup-message.c (authorize_handler): Mostly moved into
4698 soup_context_update_auth.
4699 (maybe_validate_auth): Remove this; it was only useful because of
4700 bugs elsewhere in the auth handling.
4702 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
4703 soup_context_lookup_auth. If the returned auth isn't
4704 authenticated, call soup_context_authenticate_auth() on it.
4706 * tests/auth-test.c: New (from soup-refactoring branch). Tests
4707 that the Basic/Digest auth code does the right thing. (TODO: find
4708 a good way to add NTLM tests too.)
4710 * tests/Makefile.am (check_PROGRAMS): add auth-test
4712 2003-07-29 Dan Winship <danw@ximian.com>
4714 * configure.in: 1.99.25 ("Potato and Leek Soup")
4716 * libsoup/soup-message.c (requeue_read_finished,
4717 release_connection): Free the passed-in body data. Otherwise the
4718 response body ends up getting leaked on most 3xx and 4xx
4720 (soup_message_cleanup): Remove a piece of code that didn't
4721 actually do anything and its associated confused comment.
4723 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
4725 * libsoup/soup-context.c (connection_free): plug a non-occasional
4728 2003-06-26 Joe Shaw <joe@ximian.com>
4730 * configure.in: Version 1.99.24
4732 2003-06-24 Dan Winship <danw@ximian.com>
4734 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
4735 it, and (b) depends on lots of new things sometimes (like on RH9).
4737 * libsoup/soup-openssl.c:
4738 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
4739 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
4742 2003-06-19 Dan Winship <danw@ximian.com>
4744 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
4745 old read_tag before changing/clearing it.
4746 (soup_queue_write_done_cb): Likewise with the write_tag.
4748 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
4749 around the stop+callback.
4750 (soup_transfer_write_cb): Likewise.
4752 2003-06-12 Dan Winship <danw@ximian.com>
4754 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
4756 (soup_transfer_read, create_writer): Set initial ref_count to 2
4757 (one for soup-transfer, one for the caller).
4758 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
4760 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
4761 drops soup-transfer's ref.
4762 (soup_transfer_read_cancel): Now just a stop+unref
4763 (soup_transfer_write_ref, soup_transfer_write_unref,
4764 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
4766 * libsoup/soup-message.c (soup_message_cleanup): when setting up
4767 the "finish reading" callbacks, unref the reader so it will be
4768 destroyed once it's done reading.
4769 (soup_message_requeue): Likewise.
4771 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
4772 prototype change (no longer returns a SoupTransferDone).
4773 (soup_queue_read_chunk_cb): Likewise.
4775 * libsoup/soup-server.c (read_headers_cb): Likewise
4777 2003-06-11 Dan Winship <danw@ximian.com>
4779 * libsoup/soup-transfer.c: Change all functions to take a
4780 SoupReader * or SoupWriter * instead of a guint.
4782 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
4783 write_tag pointers instead of guints.
4785 2003-06-02 Chris Toshok <toshok@ximian.com>
4787 * libsoup/soup-ssl.c: remove #include for soup-nss.h
4789 2003-06-02 Chris Toshok <toshok@ximian.com>
4791 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
4792 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
4793 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
4795 2003-06-02 Chris Toshok <toshok@ximian.com>
4797 * configure.in: Bump version to 1.99.23.
4799 2003-05-30 Chris Toshok <toshok@ximian.com>
4801 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
4802 reconnect when there's an error with ssl connection. This fixes
4803 #43387, but it runs the risk of sending requests multiple times to
4804 the exchange server, and it results in lots of shorter lived
4805 connections and more forking (in the ssl proxy case), depending on
4806 the length of the operation.
4808 2003-05-21 Dan Winship <danw@ximian.com>
4810 * configure.in: 1.99.22 (codename: French Onion Soup)
4812 2003-05-20 Dan Winship <danw@ximian.com>
4814 * libsoup/soup-message.c (soup_message_requeue): Clear the
4815 write_tag as well so we don't double-cancel it. #43395.
4817 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
4818 be destroyed by the end of the func, so we have to call
4819 soup_connection_set_used at the beginning.
4821 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
4822 Call g_set_error() so that we don't SEGV immediately after
4823 returning G_IO_STATUS_ERROR.
4825 2003-05-08 Joe Shaw <joe@ximian.com>
4827 * configure.in: Bump version to 1.99.21
4829 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
4830 tunnelling fails, the other message which shares our same
4831 connection will free it first, so set ours to NULL.
4833 2003-05-08 Dan Winship <danw@ximian.com>
4835 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
4836 return an NTLM request string. Otherwise return the "response"
4837 field (which should include the NTLM authenticate message)
4838 (ntlm_init): Don't bother setting "response" to the NTLM request
4839 string. Just leave it NULL in that case.
4841 * libsoup/soup-message.c (authorize_handler): Never try to reuse
4842 an NTLM auth returned from soup_auth_lookup. Only set the auth on
4843 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
4844 call soup_auth_set_context() on it just like for non-NTLM auth.
4845 The net effect of all of this is that now we record when a context
4846 needs NTLM auth just like with non-NTLM auth, so that that info
4847 gets preserved across connections.
4848 (soup_message_requeue): No longer need the hackery here to
4849 preserve the connection auth state.
4851 2003-05-07 Dan Winship <danw@ximian.com>
4853 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
4854 toggle the connection's in_use flag, and set up the death watch
4855 when it's not in use.
4856 (connection_death): This is only hooked up when the connection is
4857 not in use now, so don't need to check that. Should fix the
4858 infinite connection_death loop.
4859 (soup_connection_is_new): Keep a distinct "new" flag rather than
4860 defining "new" as "has been released at least once".
4861 (soup_connection_set_used): Mark a connection no-longer new.
4862 (soup_context_connect_cb): Mark the connection as new. Don't set
4863 up the death watch since it's in_use.
4864 (try_existing_connections): Use soup_connection_set_in_use.
4865 (soup_connection_release): Likewise
4867 * libsoup/soup-message.c (requeue_read_finished): Call
4868 soup_connection_set_used so that the connection isn't still
4869 considered new when we send the message the second time.
4871 * libsoup/soup-queue.c (soup_queue_error_cb): Call
4872 soup_connection_set_used (assuming we don't close the connection)
4873 (soup_queue_read_done_cb): Likewise.
4875 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
4876 nothing, call soup_transfer_read_error_cb rather than just
4877 cancelling, or else it will get cancelled again later.
4879 2003-05-07 Dan Winship <danw@ximian.com>
4881 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
4882 library doesn't depend on them, only the proxy does. #42473
4884 2003-05-06 Dan Winship <danw@ximian.com>
4886 * src/libsoup/soup-message.c (global_handlers): Change the
4887 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
4888 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
4889 for "Location" to get around the non-64-bit-clean union
4890 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
4891 (redirect_handler): Update for that.
4893 2003-04-28 Dan Winship <danw@ximian.com>
4895 * configure.in: 1.99.20
4897 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
4898 we always call UNIGNORE_CANCEL. Might fix #41971
4900 2003-04-25 Dan Winship <danw@ximian.com>
4902 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
4903 suddenly gets an io error while reading or writing, assume it's a
4904 timeout or something, close the connection, and requeue the
4907 2003-04-23 Dan Winship <danw@ximian.com>
4909 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
4910 soup-transfer callbacks to keep reading off the connection unless
4911 we're actually going to keep the connection around afterward.
4912 Otherwise we can just close it.
4914 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
4915 thingy so that it's possible to cancel a read from inside a
4916 callback so that the above change actually works instead of just
4919 2003-04-20 Rodney Dawes <dobey@ximian.com>
4921 * configure.in: Up version to 1.99.18
4922 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
4924 2003-04-11 Dan Winship <danw@ximian.com>
4926 * libsoup/soup-context.c (soup_connection_purge_idle): New
4927 function to close all idle connections. (Needed for #41117 or else
4928 there's no way to force-discard NTLM authentication.)
4930 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
4932 2003-04-10 Joe Shaw <joe@ximian.com>
4934 * libsoup/soup-queue.c (proxy_https_connect):
4935 proxy_https_connect_cb() might not get called if connecting to the
4936 proxy fails, and it causes us to double-free the connection.
4937 Always set the message's connection to NULL before freeing it.
4939 2003-04-09 Dan Winship <danw@ximian.com>
4941 * configure.in: 1.99.17
4943 2003-04-07 Dan Winship <danw@ximian.com>
4945 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
4946 We can't release the connection there because there may be
4947 SoupMessages still pointing to it. (Needs to be revisited.)
4949 2003-04-03 JP Rosevear <jpr@ximian.com>
4951 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
4952 error during waitpid
4954 * libsoup/soup-address.c: ditto
4956 2003-04-02 Joe Shaw <joe@ximian.com>
4958 * libsoup/soup-context.c (connection_death): Only drop the
4959 connection if we get an error condition on the channel. Fixes a
4962 2003-04-02 Joe Shaw <joe@ximian.com>
4964 * libsoup/soup-context.c (connection_death): Just call
4965 soup_connection_release() from here and return whether the
4966 connection is in use.
4968 2003-03-31 Ian Peters <itp@ximian.com>
4970 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
4971 case of EAGAIN or EINTR, since shutting down an SSL connection
4972 requires more than just closing a socket.
4974 2003-03-28 Dan Winship <danw@ximian.com>
4976 * libsoup/soup-message.c (soup_message_set_context): If the new
4977 context points to a different server from the old context, call
4978 soup_message_cleanup. Otherwise it tries to reuse the old
4981 2003-03-25 Joe Shaw <joe@ximian.com>
4983 * configure.in: Bump up to 1.99.16
4985 2003-03-24 Joe Shaw <joe@ximian.com>
4987 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
4988 slightly better error message on various SSL failures than the
4991 * soup-queue.c (soup_queue_error_cb): Throw the
4992 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
4994 2003-03-21 Joe Shaw <joe@ximian.com>
4996 * soup-server.c: Use non-deprecated g_main_loop_* calls
4998 (soup_server_unref): Don't unref the main loop if it's NULL.
4999 Fixes a glib warning.
5001 2003-03-18 Dan Winship <danw@ximian.com>
5003 * configure.in: comment out NSS checks. The NSS code doesn't work
5004 and there are no current plans to fix it.
5006 * README (Features): Mention GnuTLS, remove NSS and the rest of
5007 the "Planned Features" section.
5009 * MAINTAINERS: remove Alex
5011 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
5012 timeout to 10 seconds (and get rid of the 3 tries) so we don't
5013 fail to connect just because the server is slow/far away.
5015 2003-03-17 Joe Shaw <joe@ximian.com>
5017 * configure.in: Bump up to 1.99.15.
5019 2003-03-12 Ian Peters <itp@ximian.com>
5021 * libsoup/soup-gnutls.c: because creating client credentials is
5022 expensive, keep the same one around as long as possible, only
5023 recreating it if the ssl_ca_file changes. Wrap
5024 gnutls_certificate_credentials in a refcounted struct to avoid
5025 freeing it while another established connection may potentially
5026 need it (say, to rehandshake).
5028 2003-03-11 Frank Belew <frb@ximian.com>
5030 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
5033 2003-03-10 Joe Shaw <joe@ximian.com>
5035 * configure.in: Bump up to 1.99.14.
5037 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
5038 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
5041 2003-03-07 Joe Shaw <joe@ximian.com>
5043 * configure.in: Bump up to 1.99.13.
5045 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
5046 the list of conditions to watch. If the remote end hangs up the
5047 connection, we'll get a successful read of 0 bytes, not a HUP.
5048 The connection will have to be released by the point we check for
5049 it in connection_death().
5051 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
5052 (apparently) errant resetting of the read and write tags. I think
5053 this might have been causing some reentrancy and crashes.
5055 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
5056 channel to NULL encoding and not buffered.
5058 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
5061 2003-02-28 Joe Shaw <joe@ximian.com>
5063 * configure.in: Bump up to 1.99.12.
5065 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
5066 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
5067 this case we probably don't want to call the error callback, we
5068 just want to act like our transfer was cancelled.
5070 2003-02-27 Joe Shaw <joe@ximian.com>
5072 Try to apply some order to the iochannel refcounting...
5074 * configure.in: Bump up to 1.99.11.
5076 * libsoup/soup-context.c (soup_connection_get_iochannel): The
5077 connections needs to own a reference to the iochannel! If we're
5078 using HTTPS, release the ref we get from soup_socket_get_iochannel
5079 and replace it with the ref we get from soup_ssl_get_iochannel().
5080 Then, always ref the channel that we return (ugh, but that's the
5082 (connection_free): Release the connection's ref to the iochannel.
5084 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
5085 iochannel. The reference we pass back will be owned by the
5087 (soup_ssl_hup_waitpid): Release our ref.
5089 2003-02-27 Joe Shaw <joe@ximian.com>
5091 * configure.in: Bump up to 1.99.10.
5093 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
5094 iochannel, return to the status quo. Sigh.
5096 2003-02-26 Joe Shaw <joe@ximian.com>
5098 * configure.in: Bump up to 1.99.9.
5100 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
5101 it's causing problems with HTTPS and proxies; the iochannel
5102 refcounting is waaaaaay horked.
5104 2003-02-26 Frank Belew <frb@ximian.com>
5106 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
5108 2003-02-11 Joe Shaw <joe@ximian.com>
5110 * configure.in: Bump up to 1.99.8 for snaps.
5112 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
5113 It returns the address to the resulting hostent or NULL on failure,
5114 unlike Linux which returns an error code.
5116 2003-02-11 Joe Shaw <joe@ximian.com>
5118 * configure.in: Bump up to 1.99.7 for snaps.
5120 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
5121 the error string from OpenSSL if we can't establish a connection.
5123 2003-02-04 Joe Shaw <joe@ximian.com>
5125 * configure.in: Bump up to 1.99.6 for snaps.
5127 * libsoup/soup-server.c (destroy_message): We already assigned
5128 chan, so don't reassign it, and unref it in all cases.
5129 (issue_bad_request): Always unref after a call to
5130 soup_socket_get_iochannel(), because it refs it.
5131 (conn_accept): Fix some funky GIOChannel reffing here.
5133 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
5134 g_io_channel_ref() on the socket. This is the exact opposite of
5135 what we want to do. Create a temporary structure containing the
5136 parent pid and the old socket and unref the socket when our
5137 callback is called. This should fix GIOChannels being leaked on
5140 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
5143 2003-01-22 Joe Shaw <joe@ximian.com>
5145 * configure.in: Bump up to 1.99.5 for the snaps.
5147 * libsoup/soup-address.c (soup_address_new): If we found the
5148 address in our hash, we need to return NULL or else Soup will
5149 think we're doing an async lookup and do some cancellation on
5150 us. Besides, we were returning the wrong type anyway and it
5151 was crashing things.
5153 2003-01-17 Joe Shaw <joe@ximian.com>
5155 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
5156 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
5157 out, so keep trying until we succeed.
5159 2003-01-10 Joe Shaw <joe@ximian.com>
5161 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
5162 strings and print out the error when the cert can't verify.
5164 2003-01-09 Dan Winship <danw@ximian.com>
5166 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
5167 overrun noticed by valgrind
5169 2002-12-20 Joe Shaw <joe@ximian.com>
5171 * libsoup/soup-server.c (soup_server_new_with_host): Added.
5172 Starts a server only on the interface specified, instead of all
5175 2002-12-16 Jeremy Katz <katzj@redhat.com>
5177 * configure.in: use $libdir instead of /usr/lib when looking for
5180 2002-12-11 Joe Shaw <joe@ximian.com>
5182 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
5183 Don't set a variable to NULL and then immediately try to
5186 2002-12-09 Joe Shaw <joe@ximian.com>
5188 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
5189 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
5190 we don't hang forever if we don't get more data.
5192 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
5193 or else we'll hang forever in SSL_connect() if the other side
5196 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
5197 release the connection on message free, even if the connection was
5200 2002-12-03 Joe Shaw <joe@ximian.com>
5202 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
5203 g_io_channel_set_close_on_unref() on the second half of the socket
5204 pair so we don't leak file descriptors.
5206 2002-12-03 Frank Belew <frb@ximian.com>
5208 * libsoup/soup-address.c: add signal.h to the list of headers to
5211 2002-11-25 Joe Shaw <joe@ximian.com>
5213 * Makefile.am: Build the tests directory again
5215 2002-11-21 Rodney Dawes <dobey@ximian.com>
5217 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
5219 2002-11-20 Michael Meeks <michael@ximian.com>
5221 * configure.in: require autoconf 2.52 not 2.53.
5223 2002-11-18 Dan Winship <danw@ximian.com>
5225 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
5226 since it's apparently non-portable. Use s6_addr instead.
5227 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
5229 * libsoup/soup-error.c: Fix spelling of
5230 SOUP_ERROR_MOVED_PERMANENTLY and its description.
5232 * libsoup/soup-message.c (soup_message_get_request_header, etc):
5233 Remove long-deprecated API.
5235 * libsoup/soup-socket.c (soup_socket_connect): remove unused
5238 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
5239 * libsoup/soup-server.c (cgi_read): Likewise
5240 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
5242 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
5243 * libsoup/soup-transfer.c (soup_transfer_read_cb,
5244 soup_transfer_write_cb): Likewise.
5246 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
5247 instead of IPv4. (Tested on OS X.)
5249 2002-11-15 Dan Winship <danw@ximian.com>
5251 * libsoup/*: Change old Helix Code refs to Ximian (and update
5254 2002-11-15 Frank Belew <frb@ximian.com>
5256 * tests/Makefile.am: uncomment lines to make timeserver build
5259 2002-11-14 Joe Shaw <joe@ximian.com>
5261 * libsoup/soup-address.c (soup_address_new): When we get an
5262 address from the hash, call our address lookup callback or else
5263 the connection will hang.
5265 2002-11-13 Dan Winship <danw@ximian.com>
5267 * tests/timeserver.c: Oops, commit this.
5269 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
5271 2002-11-13 Joe Shaw <joe@ximian.com>
5273 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
5274 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
5277 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
5278 to properly shut down the SSL connection before closing the
5281 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
5282 iochannels before quitting the main loop.
5284 * tests/Makefile.am: disable building timeserver, the source file
5287 2002-11-12 Dan Winship <danw@ximian.com>
5289 * configure.in: Check for IPv6 support in networking headers.
5291 * libsoup/soup-address.c: Make the internal structure of
5292 SoupAddress entirely private, and make SoupAddress be more like a
5293 hostent and less like a sockaddr. (Ie, make it not have a port
5294 associated with it.) Document undocumented functions. Add
5295 completely-untested support for IPv6.
5296 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
5297 SoupAddress and a port.
5298 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
5299 addresses corresponding to the IPv6 and IPv6 "any" addresses.
5300 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
5301 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
5302 may be a sockaddr_in or sockaddr_in6.
5303 (soup_address_gethostname, soup_address_gethostaddr): Remove
5304 these. They aren't reliable, especially on multihomed hosts.
5305 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
5306 (soup_address_new): Keep pending lookups in a separate hash table
5307 from completed lookups. Fix a bug when canceling a lookup when
5308 there was more one outstanding request for it.
5309 (soup_address_lookup_in_cache): Removed.
5311 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
5312 it's not in SoupAddress any more).
5313 (soup_socket_connect): Simplify this. Don't use
5314 soup_address_lookup_in_cache, just call soup_address_new, since we
5315 already know the code can deal with the callback being invoked
5317 (soup_socket_new_sync, soup_socket_new): Take a port argument.
5318 (soup_socket_server_new): Take a SoupAddress to use as the local
5319 address to bind to. This lets the caller choose between the IPv4
5320 and IPv6 "any" addresses, and also lets you bind to a single
5321 interface of a multi-homed machine.
5322 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
5325 * libsoup/soup-server.c (soup_server_new): Pass
5326 soup_address_ipv4_any() to soup_socket_server_new().
5328 * libsoup/soup-socks.c (soup_connect_socks_proxy,
5329 soup_socks_write): Fix up for the API changes, but it won't work
5332 * tests/timeserver.c: Another really simple test, for the server
5335 * tests/Makefile.am: build timeserver
5337 2002-11-11 Dan Winship <danw@ximian.com>
5339 * libsoup/soup-address.c: Move the SoupAddress code from
5340 soup-socket.c and soup-socket-unix.c to here.
5342 * libsoup/soup-socket.c: Move the remaining code from
5343 soup-socket-unix.c here.
5345 * libsoup/soup-socket-unix.c: Gone
5347 * tests/get.c: really really trivial test program
5349 * configure.in (AC_OUTPUT):
5350 * Makefile.am (SUBDIRS): add tests/
5352 2002-11-05 Dan Winship <danw@ximian.com>
5354 * Split libsoup out of soup. ChangeLog.old contains the original
5357 * Makefile.am, etc: Fix things up to work with the new directory
5358 layout. Disable docs until we fix them.
5360 * autogen.sh: Use gnome-autogen.sh
5362 * configure.in: Require autoconf 2.53. Remove stuff that was only
5363 needed for httpd or wsdl code. Remove glib1 support. Bump version
5366 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
5367 in ${includedir}/soup-2.0
5369 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
5370 SOAP-specific stuff, Windows support, and other things that
5371 weren't being maintained.
5373 * soup-config.in, soupConf.sh: Kill these. We only support