Include the (optional) algorithm param in Digest auth responses
authorDan Winship <danw@gnome.org>
Tue, 2 Jun 2009 01:37:55 +0000 (21:37 -0400)
committerDan Winship <danw@gnome.org>
Tue, 2 Jun 2009 01:37:55 +0000 (21:37 -0400)
Apple's CalDAV server apparently considers it mandatory.
http://bugzilla.gnome.org/show_bug.cgi?id=583091

libsoup/soup-auth-digest.c

index 665bac7..4fb3f81 100644 (file)
@@ -421,7 +421,7 @@ get_authorization (SoupAuth *auth, SoupMessage *msg)
 {
        SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth);
        char response[33], *token;
-       char *url;
+       char *url, *algorithm;
        GString *out;
        SoupURI *uri;
 
@@ -444,6 +444,10 @@ get_authorization (SoupAuth *auth, SoupMessage *msg)
        g_string_append (out, ", ");
        soup_header_g_string_append_param (out, "uri", url);
        g_string_append (out, ", ");
+       algorithm = soup_auth_digest_get_algorithm (priv->algorithm);
+       soup_header_g_string_append_param (out, "algorithm", algorithm);
+       g_free (algorithm);
+       g_string_append (out, ", ");
        soup_header_g_string_append_param (out, "response", response);
 
        if (priv->opaque) {