summaryrefslogtreecommitdiff
path: root/libsoup/soup-auth-digest.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2010-04-06 12:05:26 -0400
committerDan Winship <danw@gnome.org>2010-04-09 19:51:33 -0400
commit7dfc7855fc9e41fd542c0cef7a229fe2c2e959ca (patch)
tree0c304cb57a1d3569d21da3c08564f8d7528c2b67 /libsoup/soup-auth-digest.c
parent6ce2bb5d1e4dfc1429567cc6d2b5232f421af2b3 (diff)
downloadlibsoup-7dfc7855fc9e41fd542c0cef7a229fe2c2e959ca.tar.gz
soup_header_g_string_append_param: if @value is a token, don't quote it
also add soup_header_g_string_append_param_quoted(), for places that need to guarantee they're adding a quoted-string, not a token, even if a token would be syntactically correct. (eg, digest auth, where lots of implementations are very very picky)
Diffstat (limited to 'libsoup/soup-auth-digest.c')
-rw-r--r--libsoup/soup-auth-digest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsoup/soup-auth-digest.c b/libsoup/soup-auth-digest.c
index f9c88bc5..90718c6c 100644
--- a/libsoup/soup-auth-digest.c
+++ b/libsoup/soup-auth-digest.c
@@ -436,30 +436,30 @@ get_authorization (SoupAuth *auth, SoupMessage *msg)
out = g_string_new ("Digest ");
- soup_header_g_string_append_param (out, "username", priv->user);
+ soup_header_g_string_append_param_quoted (out, "username", priv->user);
g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "realm", auth->realm);
+ soup_header_g_string_append_param_quoted (out, "realm", auth->realm);
g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "nonce", priv->nonce);
+ soup_header_g_string_append_param_quoted (out, "nonce", priv->nonce);
g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "uri", url);
+ soup_header_g_string_append_param_quoted (out, "uri", url);
g_string_append (out, ", ");
algorithm = soup_auth_digest_get_algorithm (priv->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);
+ soup_header_g_string_append_param_quoted (out, "response", response);
if (priv->opaque) {
g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "opaque", priv->opaque);
+ soup_header_g_string_append_param_quoted (out, "opaque", priv->opaque);
}
if (priv->qop) {
char *qop = soup_auth_digest_get_qop (priv->qop);
g_string_append (out, ", ");
- soup_header_g_string_append_param (out, "cnonce", priv->cnonce);
+ soup_header_g_string_append_param_quoted (out, "cnonce", priv->cnonce);
g_string_append_printf (out, ", nc=%.8x, qop=%s",
priv->nc, qop);
g_free (qop);