incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: literal '+' in URL when creaitng a database
Date Mon, 29 Oct 2012 07:23:09 GMT
On Mon, Oct 29, 2012 at 8:05 AM, Sam Stainsby
<sam@sustainablesoftware.com.au> wrote:
> 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 ...
>
> Cheers,
> Sam Stainsby.
>

'+' would mean space on the file system if I recall correctly. Which
could be problematic on some platforms.

- benoit

Mime
View raw message