couchdb-glib cannot store design documents

Bug #830269 reported by Moses Palmér
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
couchdb-glib
New
Undecided
Unassigned

Bug Description

couchdb-glib constructs resource URLs for individual documents using the format string "%s/%s/%s", which is supplied the CouchDB base URL, the database name and the document ID as format parameters.

The problem is that the document ID is URL encoded before being sent to the function.

For example, the design document "_design/test" in the database "test" on "localhost:123" would receive the URL "localhost:123/test/_design%2Ftest" instead of "localhost:123/test/_design/test".

The attached patch allows any ID that begins with '_' to contain one sublevel and makes it possible to store design documents.

Revision history for this message
Moses Palmér (mosespalmer) wrote :
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

I've committed a slightly modified version to git, that uses g_strsplit to get the _* part and use that when building the URL. Thanks a lot for the patch!

Revision history for this message
Moses Palmér (mosespalmer) wrote :

Yes, I am not really a glib programmer, I only use stdc.

So there is a git repo? What is the address?

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

git clone git://git.gnome.org/couchdb-glib

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.