You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Adam Kocoloski (JIRA)" <ji...@apache.org> on 2009/11/09 21:12:32 UTC
[jira] Closed: (COUCHDB-566) Invalid database name gives 500
response
[ https://issues.apache.org/jira/browse/COUCHDB-566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Kocoloski closed COUCHDB-566.
----------------------------------
Resolution: Fixed
Fix Version/s: 0.11
Assignee: Adam Kocoloski
Now we have
$ curl localhost:5984/Foo -X PUT -i
HTTP/1.1 400 Bad Request
Server: CouchDB/0.11.0b832988 (Erlang OTP/R13B)
Date: Mon, 09 Nov 2009 20:07:38 GMT
Content-Type: text/plain;charset=utf-8
Content-Length: 154
Cache-Control: must-revalidate
{"error":"illegal_database_name","reason":"Only lowercase characters (a-z), digits (0-9), and any of the characters _, $, (, ), +, -, and / are allowed"}
> Invalid database name gives 500 response
> ----------------------------------------
>
> Key: COUCHDB-566
> URL: https://issues.apache.org/jira/browse/COUCHDB-566
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Environment: 0.11.0b831082
> Reporter: Brian Candler
> Assignee: Adam Kocoloski
> Priority: Trivial
> Fix For: 0.11
>
>
> Attempting to create a database with an invalid name gives a 500 (server failed) HTTP response. IMO this should be 400 (bad request). Perhaps worth checking for other instances like this.
> $ curl -X PUT http://127.0.0.1:5984/mirrorAgent1
> {"error":"error","reason":"illegal_database_name"}
> $ curl -v -X PUT http://127.0.0.1:5984/mirrorAgent1
> * 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)
> > PUT /mirrorAgent1 HTTP/1.1
> > User-Agent: curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zli
> > Host: 127.0.0.1:5984
> > Accept: */*
> >
> < HTTP/1.1 500 Internal Server Error
> < Server: CouchDB/0.11.0b831082 (Erlang OTP/R12B)
> < Date: Mon, 09 Nov 2009 19:51:28 GMT
> < Content-Type: text/plain;charset=utf-8
> < Content-Length: 51
> < Cache-Control: must-revalidate
> <
> {"error":"error","reason":"illegal_database_name"}
> * Connection #0 to host 127.0.0.1 left intact
> * Closing connection #0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.