diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/aclocal.m4 libsoup2.4-2.30.1/aclocal.m4 --- libsoup2.4-2.30.0/aclocal.m4 2010-03-29 22:52:08.000000000 +0200 +++ libsoup2.4-2.30.1/aclocal.m4 2010-04-26 22:54:49.000000000 +0200 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -114,9 +114,8 @@ { int major, minor, micro; char *tmp_version; - int ignored; - ignored = system ("touch conf.glibtest"); + fclose (fopen ("conf.glibtest", "w")); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/config.h.in libsoup2.4-2.30.1/config.h.in --- libsoup2.4-2.30.0/config.h.in 2010-03-29 22:52:09.000000000 +0200 +++ libsoup2.4-2.30.1/config.h.in 2010-04-26 22:54:50.000000000 +0200 @@ -73,6 +73,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/configure.ac libsoup2.4-2.30.1/configure.ac --- libsoup2.4-2.30.0/configure.ac 2010-03-29 22:48:43.000000000 +0200 +++ libsoup2.4-2.30.1/configure.ac 2010-04-26 22:18:29.000000000 +0200 @@ -3,7 +3,7 @@ dnl ******************************************* AC_PREREQ(2.63) -AC_INIT([libsoup],[2.30.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup]) +AC_INIT([libsoup],[2.30.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=libsoup]) AC_CONFIG_SRCDIR([libsoup-2.4.pc.in]) AC_CONFIG_MACRO_DIR([m4]) diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/debian/changelog libsoup2.4-2.30.1/debian/changelog --- libsoup2.4-2.30.0/debian/changelog 2010-04-28 16:02:41.000000000 +0200 +++ libsoup2.4-2.30.1/debian/changelog 2010-04-28 16:02:41.000000000 +0200 @@ -1,3 +1,33 @@ +libsoup2.4 (2.30.1-0ubuntu1) lucid-proposed; urgency=low + + * New upstream version (lp: #571242): + - Fix for https through proxies that close the connection when returning a + "407 Proxy Authentication Required" response, and add a + regression test for that case. + - Fixed multiple forms/multipart-related interoperability problems reported + by Egon Andersen: + - Don't quote the multipart boundary string if it's not needed, since + RFC 2616 recommends that you don't, and some servers don't handle quotes + there correctly. (Sigh.) + - Don't put an extra blank line before the first multipart part, since it's + unnecessary and some servers don't handle a multipart preamble correctly. + - Don't put Content-Transfer-Encoding headers in + the multipart/form-data parts, even though the HTML 4 spec says you must, + since no other browsers do, and some servers don't handle them correctly. + - Changed SoupCookieJarSqlite to actually erase deleted + cookies from the database. + - Fixed SoupLogger to be more robust against getting passed bad data + by the session. + - Fixed SoupAuthDomain to ignore paths when doing proxy auth + - Fixed a g_warning when hovering over a javascript link in WebKit + * debian/libsoup2.4-1.symbols: + - new version update + * debian/rules: + - copied new Debian soname computation code to fix build issue + - updated shlib version + + -- Sebastien Bacher Wed, 28 Apr 2010 15:26:36 +0200 + libsoup2.4 (2.30.0-0ubuntu1) lucid; urgency=low * New upstream version: diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/debian/libsoup2.4-1.symbols libsoup2.4-2.30.1/debian/libsoup2.4-1.symbols --- libsoup2.4-2.30.0/debian/libsoup2.4-1.symbols 2010-04-28 16:02:41.000000000 +0200 +++ libsoup2.4-2.30.1/debian/libsoup2.4-1.symbols 2010-04-28 16:02:41.000000000 +0200 @@ -101,6 +101,7 @@ soup_buffer_new_subbuffer@Base 2.4.0 soup_buffer_new_with_owner@Base 2.4.0 soup_byte_array_get_type@Base 2.4.0 + soup_char_attributes@Base 2.30.1 soup_client_context_get_address@Base 2.4.0 soup_client_context_get_auth_domain@Base 2.4.0 soup_client_context_get_auth_user@Base 2.4.0 @@ -195,6 +196,7 @@ soup_header_free_list@Base 2.4.0 soup_header_free_param_list@Base 2.4.0 soup_header_g_string_append_param@Base 2.26.1 + soup_header_g_string_append_param_quoted@Base 2.30.1 soup_header_parse_list@Base 2.4.0 soup_header_parse_param_list@Base 2.4.0 soup_header_parse_quality_list@Base 2.4.0 diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/debian/rules libsoup2.4-2.30.1/debian/rules --- libsoup2.4-2.30.0/debian/rules 2010-04-28 16:02:41.000000000 +0200 +++ libsoup2.4-2.30.1/debian/rules 2010-04-28 16:02:41.000000000 +0200 @@ -1,12 +1,9 @@ #!/usr/bin/make -f -ifeq ($(wildcard configure.in),configure.in) -SOUP_CURRENT := $(shell grep '^SOUP_CURRENT=' configure.in | sed -e 's/SOUP_CURRENT=//g') -SOUP_AGE := $(shell grep '^SOUP_AGE=' configure.in | sed -e 's/SOUP_AGE=//g') -SOUP_SOVERSION := $(shell expr $(SOUP_CURRENT) - $(SOUP_AGE)) -endif +libsoup2.4-N := $(shell sed -nr 's/^Package:[[:space:]]*(libsoup2.4-[0-9]+)[[:space:]]*$$/\1/p' debian/control) +libsoup-gnome2.4-N := $(shell sed -nr 's/^Package:[[:space:]]*(libsoup-gnome2.4-[0-9]+)[[:space:]]*$$/\1/p' debian/control) -SHVER := 2.29.90 +SHVER := 2.30.1 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/utils.mk @@ -17,10 +14,8 @@ GNOME_MODULE := libsoup -DEB_SHLIBDEPS_INCLUDE_libsoup2.4-dev += debian/libsoup2.4-${SOUP_SOVERSION}/usr/lib -DEB_SHLIBDEPS_INCLUDE_libsoup-gnome2.4-dev += debian/libsoup-gnome2.4-${SOUP_SOVERSION}/usr/lib -DEB_DH_MAKESHLIBS_ARGS_libsoup2.4-1 += -V'libsoup2.4-${SOUP_SOVERSION} (>= $(SHVER))' -- -c4 -DEB_DH_MAKESHLIBS_ARGS_libsoup-gnome2.4-1 += -V'libsoup-gnome2.4-${SOUP_SOVERSION} (>= $(SHVER))' -- -c4 +DEB_DH_MAKESHLIBS_ARGS_libsoup2.4-1 += -V'$(libsoup2.4-N) (>= $(SHVER))' -- -c4 +DEB_DH_MAKESHLIBS_ARGS_libsoup-gnome2.4-1 += -V'$(libsoup-gnome2.4-N) (>= $(SHVER))' -- -c4 DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/docs/Makefile.in libsoup2.4-2.30.1/docs/Makefile.in --- libsoup2.4-2.30.0/docs/Makefile.in 2010-03-29 22:52:10.000000000 +0200 +++ libsoup2.4-2.30.1/docs/Makefile.in 2010-04-26 22:54:51.000000000 +0200 @@ -139,6 +139,8 @@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ IF_HAVE_PHP = @IF_HAVE_PHP@ @@ -176,6 +178,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHP = @PHP@ diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/Makefile.in libsoup2.4-2.30.1/libsoup/Makefile.in --- libsoup2.4-2.30.0/libsoup/Makefile.in 2010-03-29 22:52:10.000000000 +0200 +++ libsoup2.4-2.30.1/libsoup/Makefile.in 2010-04-26 22:54:51.000000000 +0200 @@ -211,6 +211,8 @@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ IF_HAVE_PHP = @IF_HAVE_PHP@ @@ -248,6 +250,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHP = @PHP@ diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-auth-digest.c libsoup2.4-2.30.1/libsoup/soup-auth-digest.c --- libsoup2.4-2.30.0/libsoup/soup-auth-digest.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-auth-digest.c 2010-04-10 01:51:33.000000000 +0200 @@ -436,30 +436,30 @@ out = g_string_new ("Digest "); - soup_header_g_string_append_param (out, "username", priv->user); + soup_header_g_string_append_param_quoted (out, "username", priv->user); g_string_append (out, ", "); - soup_header_g_string_append_param (out, "realm", auth->realm); + soup_header_g_string_append_param_quoted (out, "realm", auth->realm); g_string_append (out, ", "); - soup_header_g_string_append_param (out, "nonce", priv->nonce); + soup_header_g_string_append_param_quoted (out, "nonce", priv->nonce); g_string_append (out, ", "); - soup_header_g_string_append_param (out, "uri", url); + soup_header_g_string_append_param_quoted (out, "uri", url); g_string_append (out, ", "); algorithm = soup_auth_digest_get_algorithm (priv->algorithm); g_string_append_printf (out, "algorithm=%s", algorithm); g_free (algorithm); g_string_append (out, ", "); - soup_header_g_string_append_param (out, "response", response); + soup_header_g_string_append_param_quoted (out, "response", response); if (priv->opaque) { g_string_append (out, ", "); - soup_header_g_string_append_param (out, "opaque", priv->opaque); + soup_header_g_string_append_param_quoted (out, "opaque", priv->opaque); } if (priv->qop) { char *qop = soup_auth_digest_get_qop (priv->qop); g_string_append (out, ", "); - soup_header_g_string_append_param (out, "cnonce", priv->cnonce); + soup_header_g_string_append_param_quoted (out, "cnonce", priv->cnonce); g_string_append_printf (out, ", nc=%.8x, qop=%s", priv->nc, qop); g_free (qop); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-auth-domain.c libsoup2.4-2.30.1/libsoup/soup-auth-domain.c --- libsoup2.4-2.30.0/libsoup/soup-auth-domain.c 2010-02-21 15:12:55.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-auth-domain.c 2010-04-12 16:26:51.000000000 +0200 @@ -553,9 +553,11 @@ SoupAuthDomainPrivate *priv = SOUP_AUTH_DOMAIN_GET_PRIVATE (domain); const char *path; - path = soup_message_get_uri (msg)->path; - if (!soup_path_map_lookup (priv->paths, path)) - return FALSE; + if (!priv->proxy) { + path = soup_message_get_uri (msg)->path; + if (!soup_path_map_lookup (priv->paths, path)) + return FALSE; + } if (priv->filter && !priv->filter (domain, msg, priv->filter_data)) return FALSE; diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-auth-domain-digest.c libsoup2.4-2.30.1/libsoup/soup-auth-domain-digest.c --- libsoup2.4-2.30.0/libsoup/soup-auth-domain-digest.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-auth-domain-digest.c 2010-04-10 01:51:33.000000000 +0200 @@ -374,7 +374,7 @@ GString *str; str = g_string_new ("Digest "); - soup_header_g_string_append_param (str, "realm", soup_auth_domain_get_realm (domain)); + soup_header_g_string_append_param_quoted (str, "realm", soup_auth_domain_get_realm (domain)); g_string_append_printf (str, ", nonce=\"%lu%lu\"", (unsigned long) msg, (unsigned long) time (0)); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-cookie-jar-sqlite.c libsoup2.4-2.30.1/libsoup/soup-cookie-jar-sqlite.c --- libsoup2.4-2.30.0/libsoup/soup-cookie-jar-sqlite.c 2010-02-21 15:12:55.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-cookie-jar-sqlite.c 2010-04-26 22:18:44.000000000 +0200 @@ -273,7 +273,7 @@ return TRUE; } - if (sqlite3_exec (priv->db, "PRAGMA synchronous = OFF", NULL, NULL, &error)) { + if (sqlite3_exec (priv->db, "PRAGMA synchronous = OFF; PRAGMA secure_delete = 1;", NULL, NULL, &error)) { g_warning ("Failed to execute query: %s", error); sqlite3_free (error); } diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-headers.c libsoup2.4-2.30.1/libsoup/soup-headers.c --- libsoup2.4-2.30.0/libsoup/soup-headers.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-headers.c 2010-04-26 22:15:37.000000000 +0200 @@ -795,21 +795,42 @@ } static void -append_param_rfc2231 (GString *string, const char *value) +append_param_rfc2231 (GString *string, + const char *name, + const char *value) { char *encoded; + g_string_append (string, name); g_string_append (string, "*=UTF-8''"); encoded = soup_uri_encode (value, " *'%()<>@,;:\\\"/[]?="); g_string_append (string, encoded); g_free (encoded); } -static void -append_param_quoted (GString *string, const char *value) +/** + * soup_header_g_string_append_param_quoted: + * @string: a #GString being used to construct an HTTP header value + * @name: a parameter name + * @value: a parameter value + * + * Appends something like @name="@value" to + * @string, taking care to escape any quotes or backslashes in @value. + * + * Since: 2.32 + **/ +void +soup_header_g_string_append_param_quoted (GString *string, + const char *name, + const char *value) { int len; + g_return_if_fail (string != NULL); + g_return_if_fail (name != NULL); + g_return_if_fail (value != NULL); + + g_string_append (string, name); g_string_append (string, "=\""); while (*value) { while (*value == '\\' || *value == '"') { @@ -829,9 +850,9 @@ * @name: a parameter name * @value: a parameter value, or %NULL * - * Appends something like @name="@value" to - * @string, taking care to appropriately escape any quotes or - * backslashes in @value. + * Appends something like @name=@value to @string, + * taking care to quote @value if needed, and if so, to escape any + * quotes or backslashes in @value. * * Alternatively, if @value is a non-ASCII UTF-8 string, it will be * appended using RFC2231 syntax. Although in theory this is supposed @@ -844,26 +865,38 @@ * Since: 2.26 **/ void -soup_header_g_string_append_param (GString *string, const char *name, +soup_header_g_string_append_param (GString *string, + const char *name, const char *value) { const char *v; + gboolean token = TRUE; g_return_if_fail (string != NULL); g_return_if_fail (name != NULL); - g_string_append (string, name); - if (!value) + if (!value) { + g_string_append (string, name); return; + } for (v = value; *v; v++) { if (*v & 0x80) { if (g_utf8_validate (value, -1, NULL)) { - append_param_rfc2231 (string, value); + append_param_rfc2231 (string, name, value); return; - } else + } else { + token = FALSE; break; - } + } + } else if (!soup_char_is_token (*v)) + token = FALSE; } - append_param_quoted (string, value); + + if (token) { + g_string_append (string, name); + g_string_append_c (string, '='); + g_string_append (string, value); + } else + soup_header_g_string_append_param_quoted (string, name, value); } diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-headers.h libsoup2.4-2.30.1/libsoup/soup-headers.h --- libsoup2.4-2.30.0/libsoup/soup-headers.h 2009-09-07 15:57:06.000000000 +0200 +++ libsoup2.4-2.30.1/libsoup/soup-headers.h 2010-04-10 01:51:33.000000000 +0200 @@ -53,6 +53,9 @@ void soup_header_g_string_append_param (GString *string, const char *name, const char *value); +void soup_header_g_string_append_param_quoted (GString *string, + const char *name, + const char *value); G_END_DECLS diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-logger.c libsoup2.4-2.30.1/libsoup/soup-logger.c --- libsoup2.4-2.30.0/libsoup/soup-logger.c 2010-02-21 15:12:55.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-logger.c 2010-04-12 16:26:51.000000000 +0200 @@ -17,6 +17,7 @@ #include "soup-message.h" #include "soup-session.h" #include "soup-session-feature.h" +#include "soup-socket.h" #include "soup-uri.h" /** @@ -621,6 +622,8 @@ request_queued (SoupSessionFeature *logger, SoupSession *session, SoupMessage *msg) { + g_return_if_fail (SOUP_IS_MESSAGE (msg)); + g_signal_connect (msg, "got-informational", G_CALLBACK (got_informational), logger); @@ -637,6 +640,10 @@ gboolean restarted; guint msg_id; + g_return_if_fail (SOUP_IS_SESSION (session)); + g_return_if_fail (SOUP_IS_MESSAGE (msg)); + g_return_if_fail (SOUP_IS_SOCKET (socket)); + msg_id = soup_logger_get_id (logger, msg); if (msg_id) restarted = TRUE; @@ -659,6 +666,8 @@ request_unqueued (SoupSessionFeature *logger, SoupSession *session, SoupMessage *msg) { + g_return_if_fail (SOUP_IS_MESSAGE (msg)); + g_signal_handlers_disconnect_by_func (msg, got_informational, logger); g_signal_handlers_disconnect_by_func (msg, got_body, logger); } diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-misc.c libsoup2.4-2.30.1/libsoup/soup-misc.c --- libsoup2.4-2.30.0/libsoup/soup-misc.c 2010-02-21 15:12:55.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-misc.c 2010-04-10 01:51:33.000000000 +0200 @@ -164,3 +164,62 @@ g_source_unref (source); return source; } + +/* 00 URI_UNRESERVED + * 01 URI_PCT_ENCODED + * 02 URI_GEN_DELIMS + * 04 URI_SUB_DELIMS + * 08 HTTP_SEPARATOR + * 10 HTTP_CTL + */ +const char soup_char_attributes[] = { + /* 0x00 - 0x07 */ + 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + /* 0x08 - 0x0f */ + 0x11, 0x19, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + /* 0x10 - 0x17 */ + 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + /* 0x18 - 0x1f */ + 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, + /* !"#$%&' */ + 0x09, 0x04, 0x09, 0x02, 0x04, 0x01, 0x04, 0x04, + /* ()*+,-./ */ + 0x0c, 0x0c, 0x04, 0x04, 0x0c, 0x00, 0x00, 0x0a, + /* 01234567 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 89:;<=>? */ + 0x00, 0x00, 0x0a, 0x0c, 0x09, 0x0a, 0x09, 0x0a, + /* @ABCDEFG */ + 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* HIJKLMNO */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* PQRSTUVW */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* XYZ[\]^_ */ + 0x00, 0x00, 0x00, 0x0a, 0x09, 0x0a, 0x01, 0x00, + /* `abcdefg */ + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* hijklmno */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* pqrstuvw */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* xyz{|}~ */ + 0x00, 0x00, 0x00, 0x09, 0x01, 0x09, 0x00, 0x11, + /* 0x80 - 0xFF */ + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +}; diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-misc.h libsoup2.4-2.30.1/libsoup/soup-misc.h --- libsoup2.4-2.30.0/libsoup/soup-misc.h 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-misc.h 2010-04-10 01:51:33.000000000 +0200 @@ -35,6 +35,21 @@ #define _SOUP_ATOMIC_INTERN_STRING(variable, value) ((const char *)(g_atomic_pointer_get (&(variable)) ? (variable) : (g_atomic_pointer_set (&(variable), (gpointer)g_intern_static_string (value)), (variable)))) +/* character classes */ + +extern const char soup_char_attributes[]; +#define SOUP_CHAR_URI_PERCENT_ENCODED 0x01 +#define SOUP_CHAR_URI_GEN_DELIMS 0x02 +#define SOUP_CHAR_URI_SUB_DELIMS 0x04 +#define SOUP_CHAR_HTTP_SEPARATOR 0x08 +#define SOUP_CHAR_HTTP_CTL 0x10 + +#define soup_char_is_uri_percent_encoded(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_PERCENT_ENCODED) +#define soup_char_is_uri_gen_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_GEN_DELIMS) +#define soup_char_is_uri_sub_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_SUB_DELIMS) +#define soup_char_is_uri_unreserved(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_URI_PERCENT_ENCODED | SOUP_CHAR_URI_GEN_DELIMS | SOUP_CHAR_URI_SUB_DELIMS))) +#define soup_char_is_token(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_HTTP_SEPARATOR | SOUP_CHAR_HTTP_CTL))) + /* SSL stuff */ extern const gboolean soup_ssl_supported; diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-multipart.c libsoup2.4-2.30.1/libsoup/soup-multipart.c --- libsoup2.4-2.30.0/libsoup/soup-multipart.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-multipart.c 2010-04-26 21:41:11.000000000 +0200 @@ -385,20 +385,6 @@ content_type); } - /* The HTML spec says we need to set Content-Transfer-Encoding - * if the data is not 7bit. It probably doesn't actually - * matter... - */ - if (content_type && strncmp (content_type, "text/", 5) != 0) { - soup_message_headers_append (headers, - "Content-Transfer-Encoding", - "binary"); - } else { - soup_message_headers_append (headers, - "Content-Transfer-Encoding", - "8bit"); - } - g_ptr_array_add (multipart->headers, headers); g_ptr_array_add (multipart->bodies, soup_buffer_copy (body)); } @@ -423,21 +409,22 @@ SoupMessageHeadersIter iter; const char *name, *value; GString *str; - char *content_type; + GHashTable *params; int i; - content_type = g_strdup_printf ("%s; boundary=\"%s\"", - multipart->mime_type, - multipart->boundary); - soup_message_headers_replace (dest_headers, "Content-Type", - content_type); - g_free (content_type); + params = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (params, "boundary", multipart->boundary); + soup_message_headers_set_content_type (dest_headers, + multipart->mime_type, + params); + g_hash_table_destroy (params); for (i = 0; i < multipart->bodies->len; i++) { part_headers = multipart->headers->pdata[i]; part_body = multipart->bodies->pdata[i]; - str = g_string_new ("\r\n--"); + str = g_string_new (i == 0 ? NULL : "\r\n"); + g_string_append (str, "--"); g_string_append (str, multipart->boundary); g_string_append (str, "\r\n"); soup_message_headers_iter_init (&iter, part_headers); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-session-async.c libsoup2.4-2.30.1/libsoup/soup-session-async.c --- libsoup2.4-2.30.0/libsoup/soup-session-async.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-session-async.c 2010-04-12 16:26:51.000000000 +0200 @@ -221,11 +221,6 @@ { SoupSessionAsyncTunnelData *data = user_data; - if (SOUP_MESSAGE_IS_STARTING (msg)) { - soup_session_send_queue_item (data->session, data->item, data->conn); - return; - } - if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { soup_session_connection_failed (data->session, data->conn, msg->status_code); @@ -242,14 +237,22 @@ G_CALLBACK (connection_closed), data->session); soup_connection_set_state (data->conn, SOUP_CONNECTION_IDLE); - do_idle_run_queue (data->session); - done: + do_idle_run_queue (data->session); soup_message_queue_item_unref (data->item); g_slice_free (SoupSessionAsyncTunnelData, data); } static void +tunnel_connect_restarted (SoupMessage *msg, gpointer user_data) +{ + SoupSessionAsyncTunnelData *data = user_data; + + if (SOUP_MESSAGE_IS_STARTING (msg)) + soup_session_send_queue_item (data->session, data->item, data->conn); +} + +static void got_connection (SoupConnection *conn, guint status, gpointer session) { SoupAddress *tunnel_addr; @@ -278,7 +281,7 @@ g_signal_connect (data->item->msg, "finished", G_CALLBACK (tunnel_connected), data); g_signal_connect (data->item->msg, "restarted", - G_CALLBACK (tunnel_connected), data); + G_CALLBACK (tunnel_connect_restarted), data); soup_session_send_queue_item (session, data->item, conn); return; } diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-session.c libsoup2.4-2.30.1/libsoup/soup-session.c --- libsoup2.4-2.30.0/libsoup/soup-session.c 2010-03-29 22:39:52.000000000 +0200 +++ libsoup2.4-2.30.1/libsoup/soup-session.c 2010-04-26 22:15:37.000000000 +0200 @@ -1271,6 +1271,9 @@ return; } + if (status == SOUP_STATUS_TRY_AGAIN) + return; + /* Cancel any other messages waiting for a connection to it, * since they're out of luck. */ @@ -1304,6 +1307,31 @@ } } +static void +tunnel_connect_restarted (SoupMessage *msg, gpointer session) +{ + SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupMessageQueueItem *item; + + if (msg->status_code != SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) + return; + + item = soup_message_queue_lookup (priv->queue, msg); + if (!item) + return; + if (soup_connection_get_state (item->conn) == SOUP_CONNECTION_DISCONNECTED) { + /* We got a 407, and the session provided auth and + * restarted the message, but the proxy closed the + * connection, so we need to create a new one. The + * easiest way to do this is to just give up on the + * current msg and conn, and re-run the queue. + */ + soup_session_cancel_message (session, msg, + SOUP_STATUS_TRY_AGAIN); + } + soup_message_queue_item_unref (item); +} + SoupMessageQueueItem * soup_session_make_connect_message (SoupSession *session, SoupAddress *server_addr) @@ -1330,6 +1358,8 @@ */ g_signal_connect (msg, "finished", G_CALLBACK (tunnel_connected), session); + g_signal_connect (msg, "restarted", + G_CALLBACK (tunnel_connect_restarted), session); queue_message (session, msg, NULL, NULL); item = soup_message_queue_lookup (priv->queue, msg); g_object_unref (msg); @@ -1781,10 +1811,18 @@ void soup_session_prepare_for_uri (SoupSession *session, SoupURI *uri) { - SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); + SoupSessionPrivate *priv; SoupSessionHost *host; SoupAddress *addr; + g_return_if_fail (SOUP_IS_SESSION (session)); + g_return_if_fail (uri != NULL); + + if (!uri->host) + return; + + priv = SOUP_SESSION_GET_PRIVATE (session); + g_mutex_lock (priv->host_lock); host = get_host_for_uri (session, uri); addr = g_object_ref (host->addr); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-session-sync.c libsoup2.4-2.30.1/libsoup/soup-session-sync.c --- libsoup2.4-2.30.0/libsoup/soup-session-sync.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-session-sync.c 2010-04-12 16:26:51.000000000 +0200 @@ -135,13 +135,15 @@ return session; } -static gboolean +static guint tunnel_connect (SoupSession *session, SoupConnection *conn, SoupAddress *tunnel_addr) { SoupMessageQueueItem *item; guint status; + g_object_ref (conn); + g_signal_emit_by_name (session, "tunneling", conn); item = soup_session_make_connect_message (session, tunnel_addr); do @@ -156,12 +158,11 @@ status = SOUP_STATUS_SSL_FAILED; } - if (SOUP_STATUS_IS_SUCCESSFUL (status)) - return TRUE; - else { + if (!SOUP_STATUS_IS_SUCCESSFUL (status)) soup_session_connection_failed (session, conn, status); - return FALSE; - } + + g_object_unref (conn); + return status; } static SoupConnection * @@ -222,8 +223,11 @@ soup_connection_disconnect (conn); conn = NULL; } else if ((tunnel_addr = soup_connection_get_tunnel_addr (conn))) { - if (!tunnel_connect (session, conn, tunnel_addr)) + status = tunnel_connect (session, conn, tunnel_addr); + if (!SOUP_STATUS_IS_SUCCESSFUL (status)) { conn = NULL; + goto try_again; + } } } diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-status.c libsoup2.4-2.30.1/libsoup/soup-status.c --- libsoup2.4-2.30.0/libsoup/soup-status.c 2010-02-21 15:12:55.000000000 +0100 +++ libsoup2.4-2.30.1/libsoup/soup-status.c 2010-04-12 16:26:51.000000000 +0200 @@ -77,7 +77,7 @@ * @SOUP_STATUS_IO_ERROR: A network error occurred, or the other end * closed the connection unexpectedly * @SOUP_STATUS_MALFORMED: Malformed data (usually a programmer error) - * @SOUP_STATUS_TRY_AGAIN: Formerly used internally. Now unused. + * @SOUP_STATUS_TRY_AGAIN: Used internally * @SOUP_STATUS_CONTINUE: 100 Continue (HTTP) * @SOUP_STATUS_SWITCHING_PROTOCOLS: 101 Switching Protocols (HTTP) * @SOUP_STATUS_PROCESSING: 102 Processing (WebDAV) diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/libsoup/soup-uri.c libsoup2.4-2.30.1/libsoup/soup-uri.c --- libsoup2.4-2.30.0/libsoup/soup-uri.c 2010-03-29 22:39:52.000000000 +0200 +++ libsoup2.4-2.30.1/libsoup/soup-uri.c 2010-04-10 01:51:33.000000000 +0200 @@ -559,37 +559,14 @@ g_slice_free (SoupURI, uri); } -/* From RFC 3986 */ -#define SOUP_URI_UNRESERVED 0 -#define SOUP_URI_PCT_ENCODED 1 -#define SOUP_URI_GEN_DELIMS 2 -#define SOUP_URI_SUB_DELIMS 4 -static const char uri_encoded_char[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00 - 0x0f */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x10 - 0x1f */ - 1, 4, 1, 2, 4, 1, 4, 4, 4, 4, 4, 4, 4, 0, 0, 2, /* !"#$%&'()*+,-./ */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 1, 4, 1, 2, /* 0123456789:;<=>? */ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 0, /* PQRSTUVWXYZ[\]^_ */ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* `abcdefghijklmno */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* pqrstuvwxyz{|}~ */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 -}; - static void append_uri_encoded (GString *str, const char *in, const char *extra_enc_chars) { const unsigned char *s = (const unsigned char *)in; while (*s) { - if ((uri_encoded_char[*s] & (SOUP_URI_PCT_ENCODED | SOUP_URI_GEN_DELIMS)) || + if (soup_char_is_uri_percent_encoded (*s) || + soup_char_is_uri_gen_delims (*s) || (extra_enc_chars && strchr (extra_enc_chars, *s))) g_string_append_printf (str, "%%%02X", (int)*s++); else @@ -689,7 +666,7 @@ } c = HEXCHAR (s); - if (uri_encoded_char[c] == SOUP_URI_UNRESERVED || + if (soup_char_is_uri_unreserved (c) || (unescape_extra && strchr (unescape_extra, c))) { *d++ = c; s += 2; diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/m4/gtk-doc.m4 libsoup2.4-2.30.1/m4/gtk-doc.m4 --- libsoup2.4-2.30.0/m4/gtk-doc.m4 2010-03-29 22:52:05.000000000 +0200 +++ libsoup2.4-2.30.1/m4/gtk-doc.m4 2010-04-26 22:54:47.000000000 +0200 @@ -8,6 +8,12 @@ [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + dnl check for tools we added during development + AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, @@ -26,14 +32,30 @@ [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))]) + AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) - AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,) + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/Makefile.in libsoup2.4-2.30.1/Makefile.in --- libsoup2.4-2.30.0/Makefile.in 2010-03-29 22:52:10.000000000 +0200 +++ libsoup2.4-2.30.1/Makefile.in 2010-04-26 22:54:51.000000000 +0200 @@ -181,6 +181,8 @@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ IF_HAVE_PHP = @IF_HAVE_PHP@ @@ -218,6 +220,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHP = @PHP@ diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/NEWS libsoup2.4-2.30.1/NEWS --- libsoup2.4-2.30.0/NEWS 2010-03-29 22:47:02.000000000 +0200 +++ libsoup2.4-2.30.1/NEWS 2010-04-26 22:54:13.000000000 +0200 @@ -1,3 +1,39 @@ +Changes in libsoup from 2.30.0 to 2.30.1: + + * Fix for https through proxies that close the connection when + returning a "407 Proxy Authentication Required" response, + and add a regression test for that case. [#611663] + + * Fixed multiple forms/multipart-related interoperability + problems reported by Egon Andersen: + + * Don't quote the multipart boundary string if it's + not needed, since RFC 2616 recommends that you + don't, and some servers don't handle quotes there + correctly. (Sigh.) [#614176] + + * Don't put an extra blank line before the first + multipart part, since it's unnecessary and some + servers don't handle a multipart preamble correctly. + (Sigh.) [#614183] + + * Don't put Content-Transfer-Encoding headers in the + multipart/form-data parts, even though the HTML 4 + spec says you must, since no other browsers do, and + some servers don't handle them correctly. (Sigh.) + [#614198] + + * Changed SoupCookieJarSqlite to actually erase deleted + cookies from the database. [#615711, Lukasz Slachciak] + + * Fixed SoupLogger to be more robust against getting passed + bad data by the session. [#611663] + + * Fixed SoupAuthDomain to ignore paths when doing proxy auth + + * Fixed a g_warning when hovering over a javascript link in + WebKit. [#613442, Xan Lopez] + Changes in libsoup from 2.29.91 to 2.30.0: * Fixed a crash in the whitespace-stripping code in diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/tests/header-parsing.c libsoup2.4-2.30.1/tests/header-parsing.c --- libsoup2.4-2.30.0/tests/header-parsing.c 2010-03-29 22:39:52.000000000 +0200 +++ libsoup2.4-2.30.1/tests/header-parsing.c 2010-04-10 01:51:33.000000000 +0200 @@ -882,7 +882,7 @@ #define CONTENT_TYPE_TEST_MIME_TYPE "text/plain" #define CONTENT_TYPE_TEST_ATTRIBUTE "charset" #define CONTENT_TYPE_TEST_VALUE "US-ASCII" -#define CONTENT_TYPE_TEST_HEADER "text/plain; charset=\"US-ASCII\"" +#define CONTENT_TYPE_TEST_HEADER "text/plain; charset=US-ASCII" #define CONTENT_TYPE_BAD_HEADER "plain text, not text/html" @@ -963,7 +963,7 @@ { "five", "test with \xC3\xA1\xC3\xA7\xC4\x89\xC3\xA8\xC3\xB1\xC5\xA3\xC5\xA1" } }; -#define TEST_PARAMS_RESULT "one=\"foo\", two=\"test with spaces\", three=\"test with \\\"quotes\\\" and \\\\s\", four, five*=UTF-8''test%20with%20%C3%A1%C3%A7%C4%89%C3%A8%C3%B1%C5%A3%C5%A1" +#define TEST_PARAMS_RESULT "one=foo, two=\"test with spaces\", three=\"test with \\\"quotes\\\" and \\\\s\", four, five*=UTF-8''test%20with%20%C3%A1%C3%A7%C4%89%C3%A8%C3%B1%C5%A3%C5%A1" static void do_append_param_tests (void) diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/tests/Makefile.in libsoup2.4-2.30.1/tests/Makefile.in --- libsoup2.4-2.30.0/tests/Makefile.in 2010-03-29 22:52:10.000000000 +0200 +++ libsoup2.4-2.30.1/tests/Makefile.in 2010-04-26 22:54:51.000000000 +0200 @@ -265,6 +265,8 @@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ HAVE_GNOME = @HAVE_GNOME@ HTML_DIR = @HTML_DIR@ IF_HAVE_PHP = @IF_HAVE_PHP@ @@ -306,6 +308,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PHP = @PHP@ diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/tests/proxy-test.c libsoup2.4-2.30.1/tests/proxy-test.c --- libsoup2.4-2.30.0/tests/proxy-test.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/tests/proxy-test.c 2010-04-12 16:26:51.000000000 +0200 @@ -69,13 +69,29 @@ } static void -test_url (const char *url, int proxy, guint expected, gboolean sync) +set_close_on_connect (SoupSession *session, SoupMessage *msg, + SoupSocket *sock, gpointer user_data) +{ + /* This is used to test that we can handle the server closing + * the connection when returning a 407 in response to a + * CONNECT. (Rude!) + */ + if (msg->method == SOUP_METHOD_CONNECT) { + soup_message_headers_append (msg->request_headers, + "Connection", "close"); + } +} + +static void +test_url (const char *url, int proxy, guint expected, + gboolean sync, gboolean close) { SoupSession *session; SoupURI *proxy_uri; SoupMessage *msg; - debug_printf (1, " GET %s via %s\n", url, proxy_names[proxy]); + debug_printf (1, " GET %s via %s%s\n", url, proxy_names[proxy], + close ? " (with Connection: close)" : ""); if (proxy == UNAUTH_PROXY && expected != SOUP_STATUS_FORBIDDEN) expected = SOUP_STATUS_PROXY_UNAUTHORIZED; @@ -89,6 +105,10 @@ soup_uri_free (proxy_uri); g_signal_connect (session, "authenticate", G_CALLBACK (authenticate), NULL); + if (close) { + g_signal_connect (session, "request-started", + G_CALLBACK (set_close_on_connect), NULL); + } msg = soup_message_new (SOUP_METHOD_GET, url); if (!msg) { @@ -124,17 +144,18 @@ http_url = g_strconcat (HTTP_SERVER, tests[i].url, NULL); https_url = g_strconcat (HTTPS_SERVER, tests[i].url, NULL); } - test_url (http_url, SIMPLE_PROXY, tests[i].final_status, sync); + test_url (http_url, SIMPLE_PROXY, tests[i].final_status, sync, FALSE); #ifdef HAVE_SSL - test_url (https_url, SIMPLE_PROXY, tests[i].final_status, sync); + test_url (https_url, SIMPLE_PROXY, tests[i].final_status, sync, FALSE); #endif - test_url (http_url, AUTH_PROXY, tests[i].final_status, sync); + test_url (http_url, AUTH_PROXY, tests[i].final_status, sync, FALSE); #ifdef HAVE_SSL - test_url (https_url, AUTH_PROXY, tests[i].final_status, sync); + test_url (https_url, AUTH_PROXY, tests[i].final_status, sync, FALSE); + test_url (https_url, AUTH_PROXY, tests[i].final_status, sync, TRUE); #endif - test_url (http_url, UNAUTH_PROXY, tests[i].final_status, sync); + test_url (http_url, UNAUTH_PROXY, tests[i].final_status, sync, FALSE); #ifdef HAVE_SSL - test_url (https_url, UNAUTH_PROXY, tests[i].final_status, sync); + test_url (https_url, UNAUTH_PROXY, tests[i].final_status, sync, FALSE); #endif g_free (http_url); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/tests/simple-proxy.c libsoup2.4-2.30.1/tests/simple-proxy.c --- libsoup2.4-2.30.0/tests/simple-proxy.c 2010-03-20 14:41:31.000000000 +0100 +++ libsoup2.4-2.30.1/tests/simple-proxy.c 2010-04-12 16:26:51.000000000 +0200 @@ -14,10 +14,7 @@ #include #include -#include -#include -#include -#include +#include /* WARNING: this is really really really not especially compliant with * RFC 2616. But it does work for basic stuff. @@ -120,6 +117,13 @@ soup_server_pause_message (server, msg); } +static gboolean +auth_callback (SoupAuthDomain *auth_domain, SoupMessage *msg, + const char *username, const char *password, gpointer data) +{ + return !strcmp (username, "user") && !strcmp (password, "password"); +} + static void quit (int sig) { @@ -133,13 +137,21 @@ GMainLoop *loop; int opt; int port = SOUP_ADDRESS_ANY_PORT; + SoupAuthDomain *auth_domain = NULL; g_thread_init (NULL); g_type_init (); signal (SIGINT, quit); - while ((opt = getopt (argc, argv, "p:s:")) != -1) { + while ((opt = getopt (argc, argv, "ap:")) != -1) { switch (opt) { + case 'a': + auth_domain = soup_auth_domain_basic_new ( + SOUP_AUTH_DOMAIN_REALM, "simple-proxy", + SOUP_AUTH_DOMAIN_PROXY, TRUE, + SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback, + NULL); + break; case 'p': port = atoi (optarg); break; @@ -158,6 +170,10 @@ } soup_server_add_handler (server, NULL, server_callback, NULL, NULL); + if (auth_domain) { + soup_server_add_auth_domain (server, auth_domain); + g_object_unref (auth_domain); + } printf ("\nStarting proxy on port %d\n", soup_server_get_port (server)); diff -Nru --exclude '*reference*' --exclude configure --exclude gtk-doc.make libsoup2.4-2.30.0/tests/sniffing-test.c libsoup2.4-2.30.1/tests/sniffing-test.c --- libsoup2.4-2.30.0/tests/sniffing-test.c 2010-03-29 22:39:52.000000000 +0200 +++ libsoup2.4-2.30.1/tests/sniffing-test.c 2010-04-10 01:51:33.000000000 +0200 @@ -540,7 +540,7 @@ test_sniffing ("/multiple_headers/home.gif", "image/gif"); /* Test that we keep the parameters when sniffing */ - test_sniffing ("/type/text_html; charset=\"UTF-8\"/test.html", "text/html; charset=\"UTF-8\""); + test_sniffing ("/type/text_html; charset=UTF-8/test.html", "text/html; charset=UTF-8"); /* Test that disabling the sniffer works correctly */