Bump up version to 0.4.4 Ditto.
authorJoe Shaw <joe@ximian.com>
Mon, 20 Aug 2001 20:13:26 +0000 (20:13 +0000)
committerJoe Shaw <joeshaw@src.gnome.org>
Mon, 20 Aug 2001 20:13:26 +0000 (20:13 +0000)
2001-08-20  Joe Shaw  <joe@ximian.com>

* configure.in: Bump up version to 0.4.4
* src/soup-core/soup-private.h: Ditto.

* src/soup-core/soup-auth.c (compute_response, digest_auth_func):
Instead of just passing uri->path, pass
uri->path + '?' + uri->querystring if present.

ChangeLog
libsoup/soup-auth.c
libsoup/soup-private.h

index fc2ed2f..467b115 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-08-20  Joe Shaw  <joe@ximian.com>
+
+       * configure.in: Bump up version to 0.4.4
+       * src/soup-core/soup-private.h: Ditto.
+
+       * src/soup-core/soup-auth.c (compute_response, digest_auth_func):
+       Instead of just passing uri->path, pass
+       uri->path + '?' + uri->querystring if present.
+
 2001-08-17  Alex Graveley  <alex@ximian.com>
 
        * build/libsoup.def: Update for DAV methods.
index 00ca44d..0fa6910 100644 (file)
@@ -175,8 +175,13 @@ compute_response (SoupAuthDigest *digest, SoupMessage *msg)
        guchar hex_a1[33], hex_a2[33], o[33];
        guchar d[16];
        MD5Context ctx;
+       char *url;
 
        uri = soup_context_get_uri (auth->context);
+       if (uri->querystring)
+               url = g_strdup_printf ("%s?%s", uri->path, uri->querystring);
+       else
+               url = g_strdup (uri->path);
 
        /* compute A1 */
        md5_init (&ctx);
@@ -205,7 +210,8 @@ compute_response (SoupAuthDigest *digest, SoupMessage *msg)
        md5_init (&ctx);
        md5_update (&ctx, msg->method, strlen (msg->method));
        md5_update (&ctx, ":", 1);
-       md5_update (&ctx, uri->path, strlen (uri->path));
+       md5_update (&ctx, url, strlen (url));
+       g_free (url);
 
        if (digest->qop == QOP_AUTH_INT) {
                /* FIXME: Actually implement. Ugh. */
@@ -262,6 +268,7 @@ digest_auth_func (SoupAuth *auth, SoupMessage *message)
        char *response;
        char *qop = NULL;
        char *nc;
+       char *url;
        char *out;
 
        g_return_val_if_fail (auth->context, NULL);
@@ -277,6 +284,10 @@ digest_auth_func (SoupAuth *auth, SoupMessage *message)
                g_assert_not_reached ();
 
        uri = soup_context_get_uri (auth->context);
+       if (uri->querystring)
+               url = g_strdup_printf ("%s?%s", uri->path, uri->querystring);
+       else
+               url = g_strdup (uri->path);
 
        nc = g_strdup_printf ("%.8x", digest->nc);
 
@@ -299,9 +310,10 @@ digest_auth_func (SoupAuth *auth, SoupMessage *message)
                digest->qop ? qop : "",
                digest->qop ? "," : "",
 
-               uri->path,
+               url,
                response);
 
+       g_free (url);
        g_free (nc);
 
        digest->nc++;
index 8d54c31..0ffe694 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 #ifdef SOUP_WIN32
-#define VERSION "Win/0.4.2"
+#define VERSION "Win/0.4.4"
 #include <windows.h>
 #include <winbase.h>
 #include <winuser.h>