diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c
index 5cb43150..0d8e1eaf 100644
--- a/libsoup/soup-auth-domain-digest.c
+++ b/libsoup/soup-auth-domain-digest.c
@@ -216,13 +216,18 @@ check_hex_urp (SoupAuthDomain *domain, SoupMessage *msg,
 		soup_uri_free (dig_uri);
 	} else {	
 		char *req_path;
+		char *dig_path;
 
 		req_path = soup_uri_to_string (req_uri, TRUE);
-		if (strcmp (uri, req_path) != 0) {
+		dig_path = soup_uri_decode (uri);
+
+		if (strcmp (dig_path, req_path) != 0) {
 			g_free (req_path);
+			g_free (dig_path);
 			return FALSE;
 		}
 		g_free (req_path);
+		g_free (dig_path);
 	}
 
 	/* Check qop; we only support "auth" for now */
