100km/pointage100km — Issue #12: can't open _local/* documents
Author: jonenst
Created: 2012-01-06 18:31:58+00:00
State: open

When trying to access a local document through the following javascript code, we get a 404 error:

app.db.openDoc("_local/site_info", {
success: function(data) {
console.log(data);
cb.call(this, data);
},
error: function(status) {
console.log(status);
}
});
}

The problem is that the resulting url has "%2F" instead of a "/":

/steenwerck100km/_local%2Fsite_info Failed to load resource: the server responded with a status of 404 (Not Found)
^ here

This bug happens in different situations:
- on victor's server (couchdb v1.1.1 and couchdb v1.1.2), just git clone and use the script in initialize db to create the local document. No replication involved
- on a another server (tested on tomo's server on port 5984, couchdb v1.1.1),only work when code is pushed through replication.

To me, the difference between the two setups is that victor's setup uses vhost whereas tomo's setup doesn't. Also the port is different.