summaryrefslogtreecommitdiff
path: root/gdata/gdata-oauth1-authorizer.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2011-06-29 08:56:02 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2011-06-29 08:56:02 +0100
commit5494aef7d705b9a4ad2d0da7db6dd6c0a43f9560 (patch)
treeaffc65b39a27fae615f065f835a971e4cf62449a /gdata/gdata-oauth1-authorizer.c
parentbaa8e41dd9079411e90c7ec3bd6381a24192bc06 (diff)
downloadlibgdata-5494aef7d705b9a4ad2d0da7db6dd6c0a43f9560.tar.gz
Bug 653535 — Let GDataAuthorizer re-process request after refreshing
After receiving a 401 status (unauthorised) from the server and refreshing the current GDataAuthorizer, re-process the message in question with the authoriser before re-sending it, so that it has updated credentials set on it. This involves a slight change in the semantics of GDataAuthorizer->process_request, which now has to handle being called multiple times on a given message. Closes: bgo#653535
Diffstat (limited to 'gdata/gdata-oauth1-authorizer.c')
-rw-r--r--gdata/gdata-oauth1-authorizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdata/gdata-oauth1-authorizer.c b/gdata/gdata-oauth1-authorizer.c
index 0b635dc4..bce48b76 100644
--- a/gdata/gdata-oauth1-authorizer.c
+++ b/gdata/gdata-oauth1-authorizer.c
@@ -558,7 +558,7 @@ sign_message (GDataOAuth1Authorizer *self, SoupMessage *message, const gchar *to
g_string_append_uri_escaped (authorization_header, nonce, NULL, FALSE);
g_string_append (authorization_header, "\",oauth_version=\"1.0\"");
- soup_message_headers_append (message->request_headers, "Authorization", authorization_header->str);
+ soup_message_headers_replace (message->request_headers, "Authorization", authorization_header->str);
g_string_free (authorization_header, TRUE);
free (signature);