couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-967) CouchDB create database response error is wrong
Date Fri, 26 Nov 2010 02:50:16 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935926#action_12935926
] 

Paul Joseph Davis commented on COUCHDB-967:
-------------------------------------------

For the first one, you're not escaping the slash. Perhaps teh docs should be updated to mention
that those special characters need to be URL escaped.

For the second case, I'm not sure what its doing there unless we're just not being careful
to remove a trailing slash maybe.

> CouchDB create database response error is wrong
> -----------------------------------------------
>
>                 Key: COUCHDB-967
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-967
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.0.2, 1.1, 1.2, 2.0
>         Environment: Mac OS X Snow Leopard
>            Reporter: Filippo Fadda
>            Priority: Minor
>
> When you try to create a database with a "/" inside name, the following error is returned.
For example:
> --------------------------------------------
> Database name: /invalid/name/
> --------------------------------------------
> _ using cURL _
> http://127.0.0.1:5984/invalid/name/
> HTTP Status Code: 404 Not Found
> CouchDB Error: not_found
> CouchDB Reason: no_db_file
> Now, the documentation says:
> "A database must be named with all lowercase letters (a-z), digits (0-9), or any of the
_$()+-/ characters and must end with a slash in the URL. The name has to start with a lowercase
letter (a-z). "
> But we know that a database name can't contain the "/" character, but it must end with
"/". So the documentation is wrong and the reported error is wrong too.
> CouchDB infast must report the same error provided when you try to create a database
named "Invalidname" with the first letter uppercase, like in the following example:
> --------------------------------------------
> Database name: /Invalidname/
> --------------------------------------------
> _ using cURL _
> http://127.0.0.1:5984/Invalidname/
> HTTP Status Code: 400 Bad Request
> CouchDB Error: illegal_database_name
> CouchDB Reason: Only lowercase characters (a-z), digits (0-9), and any of the characters
_, $, (, ), +, -, and / are allowed. Must begin with a letter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message