diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c
index 5cb43150..f84e8003 100644
--- a/libsoup/soup-auth-domain-digest.c
+++ b/libsoup/soup-auth-domain-digest.c
@@ -215,14 +215,23 @@ check_hex_urp (SoupAuthDomain *domain, SoupMessage *msg,
 		}
 		soup_uri_free (dig_uri);
 	} else {	
+		char *req_path_orig;
 		char *req_path;
+		char *dig_path;
 
-		req_path = soup_uri_to_string (req_uri, TRUE);
-		if (strcmp (uri, req_path) != 0) {
+		/* decoding both path to be sure they have same encoding */
+		req_path_orig = soup_uri_to_string (req_uri, TRUE);
+		req_path = soup_uri_decode (req_path_orig);
+		g_free (req_path_orig);
+		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 */