[libgdata] core: Handle SOUP_STATUS_NO_CONTENT in response to DELETE requests



commit aaafd1119448e3e36e149e8a957e99f9a5ec14b6
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Jun 20 10:36:49 2014 +0100

    core: Handle SOUP_STATUS_NO_CONTENT in response to DELETE requests
    
    The Google Tasks API apparently returns HTTP status 204 in response to a
    successful DELETE request on a task entry, rather than the status 200
    which is returned by all the other services.
    
    Handle the two statuses as equivalent.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731946

 gdata/gdata-service.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index f50d8f0..61f959c 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -1814,7 +1814,7 @@ gdata_service_delete_entry (GDataService *self, GDataAuthorizationDomain *domain
                /* Redirect error or cancelled */
                g_object_unref (message);
                return FALSE;
-       } else if (status != SOUP_STATUS_OK) {
+       } else if (status != SOUP_STATUS_OK && status != SOUP_STATUS_NO_CONTENT) {
                /* Error */
                GDataServiceClass *service_klass = GDATA_SERVICE_GET_CLASS (self);
                g_assert (service_klass->parse_error_response != NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]