[libsoup] SoupAuthDigest, SoupAuthDomainDigest: follow the spec more precisely
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoup] SoupAuthDigest, SoupAuthDomainDigest: follow the spec more precisely
- Date: Sat, 19 Dec 2009 12:03:11 +0000 (UTC)
commit 2c7725e8056e161c840d9e623de99adab129b6b0
Author: Dan Winship <danw gnome org>
Date: Sat Dec 19 12:59:13 2009 +0100
SoupAuthDigest, SoupAuthDomainDigest: follow the spec more precisely
Some implementations apparently require you to precisely follow the spec
in terms of whether particular attribute values are quoted or non-quoted.
Probably fixes https://bugzilla.gnome.org/show_bug.cgi?id=582219
libsoup/soup-auth-digest.c | 7 +++----
libsoup/soup-auth-domain-digest.c | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libsoup/soup-auth-digest.c b/libsoup/soup-auth-digest.c
index 2299ae7..f9c88bc 100644
--- a/libsoup/soup-auth-digest.c
+++ b/libsoup/soup-auth-digest.c
@@ -445,7 +445,7 @@ get_authorization (SoupAuth *auth, SoupMessage *msg)
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_string_append_printf (out, "algorithm=%s", algorithm);
g_free (algorithm);
g_string_append (out, ", ");
soup_header_g_string_append_param (out, "response", response);
@@ -460,9 +460,8 @@ get_authorization (SoupAuth *auth, SoupMessage *msg)
g_string_append (out, ", ");
soup_header_g_string_append_param (out, "cnonce", priv->cnonce);
- g_string_append_printf (out, ", nc=\"%.8x\"", priv->nc);
- g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "qop", qop);
+ g_string_append_printf (out, ", nc=%.8x, qop=%s",
+ priv->nc, qop);
g_free (qop);
}
diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c
index e5e3164..f4a7f41 100644
--- a/libsoup/soup-auth-domain-digest.c
+++ b/libsoup/soup-auth-domain-digest.c
@@ -379,7 +379,7 @@ challenge (SoupAuthDomain *domain, SoupMessage *msg)
(unsigned long) msg,
(unsigned long) time (0));
g_string_append_printf (str, ", qop=\"auth\"");
- g_string_append_printf (str, ", algorithm=\"MD5\"");
+ g_string_append_printf (str, ", algorithm=MD5");
return g_string_free (str, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]