[couchdb-glib: 20/21] Port bugfix in rev. 98 of lp:~rodrigo-moya/couchdb-glib/no-revision-in-auth-header to this branch



commit 38815a5bd8925830ac10920ed05e7d4de1ac413d
Author: Mikkel Kamstrup Erlandsen <mikkel kamstrup gmail com>
Date:   Tue Oct 6 20:06:05 2009 +0200

    Port bugfix in rev. 98 of lp:~rodrigo-moya/couchdb-glib/no-revision-in-auth-header to this branch

 couchdb-glib/couchdb-document.c |    3 ++-
 couchdb-glib/couchdb.c          |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/couchdb-glib/couchdb-document.c b/couchdb-glib/couchdb-document.c
index 1a856a5..9cd4256 100644
--- a/couchdb-glib/couchdb-document.c
+++ b/couchdb-glib/couchdb-document.c
@@ -187,7 +187,8 @@ couchdb_document_delete (CouchDBDocument *document, GError **error)
 	url = g_strdup_printf ("%s/%s/%s?rev=%s", couchdb_get_hostname (document->couchdb), document->dbname, id, revision);
 	
 	/* We don't parse the http response, therefore the parser arg is NULL */
-	if (couchdb_send_message (document->couchdb, SOUP_METHOD_DELETE, url, NULL, NULL, error)) {		
+	if (couchdb_send_message (document->couchdb, SOUP_METHOD_DELETE, url, NULL, NULL, error)) {
+		result = TRUE;		
 		g_signal_emit_by_name (document->couchdb, "document_deleted", document->dbname, id);
 	}
 
diff --git a/couchdb-glib/couchdb.c b/couchdb-glib/couchdb.c
index ced3442..6fc0938 100644
--- a/couchdb-glib/couchdb.c
+++ b/couchdb-glib/couchdb.c
@@ -489,7 +489,11 @@ couchdb_add_oauth_signature (CouchDB *couchdb, SoupMessage *http_message, const
 #endif
 			for (i = 0; params[i] != NULL; i++) {
 				gchar **url_param;
-
+				
+				/* Don't include non-OAuth URL parameters in OAuth header */
+				if (!g_str_has_prefix (params[i], "oauth_"))
+					continue;
+				
 #ifdef DEBUG_OAUTH
 				g_debug ("%s\n", params[i]);
 #endif



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