Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 74323 invoked from network); 21 Jan 2010 04:37:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2010 04:37:28 -0000 Received: (qmail 6083 invoked by uid 500); 21 Jan 2010 04:37:27 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 5888 invoked by uid 500); 21 Jan 2010 04:37:27 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 5878 invoked by uid 99); 21 Jan 2010 04:37:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 04:37:26 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 04:37:18 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AB415234C1EE for ; Wed, 20 Jan 2010 20:36:57 -0800 (PST) Message-ID: <1300280298.389081264048617699.JavaMail.jira@brutus.apache.org> Date: Thu, 21 Jan 2010 04:36:57 +0000 (UTC) From: "Matthew Hooker (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-313) '$' in database name confuses behaviour of %2F in design doc ID In-Reply-To: <36408132.1238660172944.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803169#action_12803169 ] Matthew Hooker commented on COUCHDB-313: ---------------------------------------- works fine for me off trunk. I think this can be closed. $ 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-967a00dff5e02add41819138abb3284d"} $ curl 'http://127.0.0.1:5984/my$db/_design/test' {"_id":"_design/test","_rev":"1-967a00dff5e02add41819138abb3284d"} $ curl -v 'http://127.0.0.1:5984/my$db/_design%2Ftest' * About to connect() to 127.0.0.1 port 5984 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0) > GET /my$db/_design%2Ftest HTTP/1.1 > User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: 127.0.0.1:5984 > Accept: */* > < HTTP/1.1 301 Moved Permanently < Server: CouchDB/0.11.0b890693 (Erlang OTP/R13B) < Location: http://127.0.0.1:5984/my%24db/_design/test < Date: Thu, 21 Jan 2010 04:33:39 GMT < Content-Length: 0 < * Connection #0 to host 127.0.0.1 left intact * Closing connection #0 > '$' 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.