'$' in database name confuses behaviour of %2F in design doc ID --------------------------------------------------------------- Key: COUCHDB-313 URL: https://issues.apache.org/jira/browse/COUCHDB-313 Project: CouchDB Issue Type: Bug Affects Versions: 0.9 Environment: svn r761188 Ubuntu Hardy + Erlang 12B3 from Intrepid Reporter: Brian Candler Priority: Minor Normally, if you use %2F to separate _design from the rest of the URL, you get a 301 redirect: $ curl -X PUT http://127.0.0.1:5984/mydb {"ok":true} $ curl -X PUT -d"{}" http://127.0.0.1:5984/mydb/_design/test {"ok":true,"id":"_design/test","rev":"1-481559718"} $ curl -v http://127.0.0.1:5984/mydb/_design%2Ftest ... < HTTP/1.1 301 Moved Permanently < Server: CouchDB/0.9.0 (Erlang OTP/R12B) < Location: http://127.0.0.1:5984/mydb/_design/test However this logic is broken if you use a database which has a '$' in the name: you get a 'badmatch' erlang error. $ curl -X PUT 'http://127.0.0.1:5984/my$db' {"ok":true} $ curl -X PUT -d'{}' 'http://127.0.0.1:5984/my$db/_design/test' {"ok":true,"id":"_design/test","rev":"1-4187139805"} $ curl 'http://127.0.0.1:5984/my$db/_design/test' {"_id":"_design/test","_rev":"1-4187139805"} $ curl 'http://127.0.0.1:5984/my$db/_design%2Ftest' {"error":"badmatch","reason":"{ok,[\"/my$db/\",\"test\"]}"} $ is allowed in a database name according to the wiki (as long as it's not the first character), and otherwise appears to work OK. I have not tried other 'unusual' characters. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.