[libgdata] core: Refresh authoriser on receiving SOUP_STATUS_FORBIDDEN
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Refresh authoriser on receiving SOUP_STATUS_FORBIDDEN
- Date: Thu, 19 Jun 2014 08:53:43 +0000 (UTC)
commit 109417f61d250f0482c3d9d93c0c7caff04d1059
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Jun 19 09:37:07 2014 +0100
core: Refresh authoriser on receiving SOUP_STATUS_FORBIDDEN
Previously the authoriser was only refreshed on receiving a
SOUP_STATUS_UNAUTHORIZED response from the server. This worked fine for
Google Documents, but it seems that PicasaWeb returns FORBIDDEN instead.
The authoriser was not being refreshed, and hence the user was seeing
access denied messages even though they were technically logged in.
https://bugzilla.gnome.org/show_bug.cgi?id=731269
gdata/gdata-service.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 4ec990f..f50d8f0 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -738,7 +738,8 @@ _gdata_service_send_message (GDataService *self, SoupMessage *message, GCancella
*
* Note that we have to re-process the message with the authoriser so that its authorisation headers
get updated after the refresh
* (bgo#653535). */
- if (message->status_code == SOUP_STATUS_UNAUTHORIZED) {
+ if (message->status_code == SOUP_STATUS_UNAUTHORIZED ||
+ message->status_code == SOUP_STATUS_FORBIDDEN) {
GDataAuthorizer *authorizer = self->priv->authorizer;
if (authorizer != NULL && gdata_authorizer_refresh_authorization (authorizer, cancellable,
NULL) == TRUE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]