You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filippo Fadda (JIRA)" <ji...@apache.org> on 2010/11/26 02:10:13 UTC

[jira] Created: (COUCHDB-967) CouchDB create database response error is wrong

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.


[jira] Updated: (COUCHDB-967) CouchDB create database response error is wrong

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-967:
--------------------------------------

    Skill Level: New Contributors Level (Easy)  (was: Regular Contributors Level (Easy to Medium))

> 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.


[jira] Commented: (COUCHDB-967) CouchDB create database response error is wrong

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] [Resolved] (COUCHDB-967) CouchDB create database response error is wrong

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt resolved COUCHDB-967.
----------------------------------

    Resolution: Not A Problem

The docs state "Note also that a / character in a DB name must be escaped when used in a URL;"


> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira