2008-02-11 Dan Winship * configure.in: 2.3.2 (SOUP_CURRENT): bump for API changes * NEWS: update 2008-02-09 Dan Winship * Misc gtk-doc fix-ups 2008-02-09 Dan Winship * libsoup/soup-misc.h: remove prototype for soup_signal_connect_once, which is only used by soup-connection now, and will go away once that code is rewritten. * libsoup/soup-connection.c: prototype it here now (the definition is still in soup-misc.c) 2008-02-09 Dan Winship * libsoup/soup-auth-manager-ntlm.c: mark the DES magic number arrays const * libsoup/soup-date.c (months, days): add an extra "const" to each of these declarations, as one "const" is apparently not enough. (soup_date_to_time_t): remove redundant copy of days_before array. * libsoup/soup-dns.c (soup_dns_init): use g_once_init_enter/leave * libsoup/soup-gnutls.c (soup_ssl_supported) (soup_gnutls_channel_funcs): Mark these const (soup_gnutls_init, init_dh_params): Use g_once_init_enter/leave * libsoup/soup-status.c (reason_phrases): mark this const * tests/ssl-test.c: Remove the workaround for soup_gnutls_init() not being thread-safe, since it is now. 2008-02-08 Dan Winship * libsoup/soup-message-headers.c (SoupMessageHeadersIter) (soup_message_headers_iter_init, soup_message_headers_iter_next): Add an iterator type for SoupMessageHeaders. * libsoup/soup-message-client-io.c (get_request_headers): * libsoup/soup-message-server-io.c (get_response_headers): Use SoupMessageHeadersIter. * libsoup/soup-logger.c (print_request, print_response): Use SoupMessageHeadersIter. And take advantage of the simplification to fix the kludge where 'direction' was stored as a field in SoupLoggerPrivate rather than being an argument to soup_logger_print. * tests/get.c (get_url): * tests/header-parsing.c (check_headers): * tests/simple-httpd.c (server_callback): Use SoupMessageHeadersIter 2008-02-06 Dan Winship * libsoup/soup-server.c (soup_server_add_auth_domain): Ref the auth domain when adding it. * tests/continue-test.c (setup_server): * tests/server-auth-test.c (main): Add unrefs here to avoid leaking now 2008-02-06 Dan Winship * libsoup/soup-message.c (soup_message_set_chunk_allocator): New method that lets the application set a callback function to use to allocate SoupBuffers for reading into, so as to avoid needing extra copies. * libsoup/soup-message-body.c (soup_buffer_new_with_owner): new, to create a SoupBuffer pointing to memory owned by another object, with a GDestroyNotify to unref/free that object when the SoupBuffer is freed. (soup_buffer_get_owner): Returns the owner of a buffer created with soup_buffer_new_with_owner. (soup_buffer_free, etc): update SoupBuffer code for owned buffers. Suggested by Wouter Cloetens, #513810. * tests/simple-httpd.c (do_get): Use mmap() and soup_buffer_new_with_owner(), as a demo/test. 2008-02-06 Dan Winship * libsoup/soup-date.c (soup_date_to_time_t): clamp the result to the time_t range, and document that. Remove the #ifdef HAVE_TIMEGM branch. * configure.in: remove check for timegm 2008-02-04 Dan Winship * libsoup/Makefile.am: Fix the handling of soup-enum-types.h to ensure that it gets built before the things that depend on it. 2008-02-03 Benjamin Otte * libsoup/soup-socket.c: update documentation to new API 2008-02-02 Dan Winship * libsoup/soup-session.c: fix default connections-per-host again; it was defined in two places. Add SOUP_SESSION_USER_AGENT property (setup_message): set the User-Agent request header on the request * libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property (start_request): set the Server response header on the request. * tests/get.c: * tests/simple-httpd.c: set the User-Agent/Server headers 2008-02-02 Dan Winship * libsoup/soup-headers.c (soup_headers_parse_request): if the request headers contain an unrecognized Expect: header, return SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers in HTTP/1.0 messages as required by 2616 14.10. (soup_headers_parse_response): Likewise handle Connection headers in HTTP/1.0 messages * tests/header-parsing.c: test those things 2008-02-02 Dan Winship * libsoup/soup-session.c (redirect_handler): Misc fixes: don't redirect on "300 Multiple Choices", "304 Not Modified", "305 Use Proxy", or any unrecognized status code. Don't redirect unsafe methods on 301, 302, or 307. Redirect POST to GET on 303. * tests/redirect-test.c: test of redirection handling behavior. 2008-02-02 Dan Winship * libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that direct comparisons against them actually *are* faster than doing strcmp, as the docs claim. * libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP, SOUP_URI_SCHEME_HTTPS): likewise 2008-02-01 Dan Winship * libsoup/soup-address.c: Use GObject properties. (soup_address_new, soup_address_new_from_sockaddr) (soup_address_new_any): Make these just wrappers around g_object_new. * libsoup/soup-message-body.c (soup_message_body_get_type): * libsoup/soup-message-headers.c (soup_message_headers_get_type): * libsoup/soup-server.c (soup_client_context_get_type): Register these as boxed types, for language bindings. * libsoup/soup-date.c (soup_date_get_type): * libsoup/soup-message-body.c (soup_buffer_get_type): * libsoup/soup-value-utils.c (soup_byte_array_get_type): * libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest yummiest type-registering idiom. 2008-02-01 Dan Winship * libsoup/soup-connection.c (soup_connection_disconnect): Reorganize this; emitting DISCONNECTED may cause the session to unref the connection, causing it to be destroyed, so do everything else before that. #437835 and dups. Also, call soup_message_cleanup_response() when requeuing an IO_ERROR-ed message, so soup_session_send_message() will requeue it rather than treating it as failed. * docs/reference/Makefile.am (TARGET_DIR): override this to include the API version, to fix the last remaining parallel install issue between libsoup 2.2 and 2.4. #512810, Daniel Gryniewicz. * tests/query-test.c (do_test): don't use "stdout" as a variable name; it's allowed to be a macro (and it is one on Solaris). #513602, patch from Jeff Cai. 2008-01-31 Dan Winship * libsoup/soup-date.c (soup_date_to_time_t): new * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded" from name. (And add back-compat #define.) (soup_form_encode): New, takes varargs parameters for each form construction. (soup_form_encode_hash, soup_form_encode_datalist): renamed, with back-compat #defines (soup_form_request_new, soup_form_request_new_from_hash) (soup_form_request_new_from_datalist): New methods to construct a GET or POST message with form data. * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes varargs like soup_form_encode(). * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals) (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New routines to work with multiple value hash values at once. (soup_value_array_new): tiny wrapper, for naming consistency (soup_value_array_new_with_vals, soup_value_array_append_vals): New routines to work with multiple value array values at once. 2008-01-28 Dan Winship * configure.in: post-release bump to 2.3.1