incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Stainsby <>
Subject literal '+' in URL when creaitng a database
Date Mon, 29 Oct 2012 07:05:59 GMT
Hi all,

Shouldn't this succeed (assuming appropriate permissions):

curl -X PUT 'http://localhost:5984/aaa+bbb'

Instead, I get the "Only lowercase characters (a-z), digits (0-9), and 
any of the characters _, $, (, ), +, -, and / are allowed ..." error.

I understand that '+' has special significance in the query part of a 
URL, but not the path part, so I think the above should work. I've found 
with the latest Dispatch library (0.9.3) that dispatch doesn't encode the 
'+', which from what I've read since seems to still be a legal URL. On 
the other hand,, couch seems to require it to be encoded, so the 
following *does* succeed:

curl -X PUT 'http://localhost:5984/aaa%2bbbb'

resulting in a database named 'aaa+bbb'.

I've checked (with wireshark) that the first query does indeed send the 
literal '+ character : PUT /aaa+bbb ...

Sam Stainsby.

View raw message