The database watcher always uses couchdb_database_get_document to check whether documents still exist

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

Bug Description

The database watcher uses couchdb_database_get_document to retrieve an instance of the document in dbwatch.c:process_change.

This function cannot be used to retrieve design documents, since it uses the format string "%s/%s/%s" with the CouchDB session URI, the database name and the encoded document ID. Design documents contain a slash, which is escaped although it should not.

I have attached a patch that adds a fallback in couchdb_database_get_document---if the ID begins with "_design/", couchdb_database_get_design_document is called instead.

Revision history for this message
Moses Palmér (mosespalmer) wrote :
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.