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 Priority: Trivial 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.