Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-566

Invalid database name gives 500 response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.11
    • HTTP Interface
    • None
    • 0.11.0b831082

    Description

      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

      Attachments

        Activity

          People

            kocolosk Adam Kocoloski
            candlerb Brian Candler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: