You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2009/11/09 21:08:43 UTC

svn commit: r834211 - /couchdb/trunk/src/couchdb/couch_httpd.erl

Author: kocolosk
Date: Mon Nov  9 20:08:43 2009
New Revision: 834211

URL: http://svn.apache.org/viewvc?rev=834211&view=rev
Log:
better error for illegal_database_name. Closes COUCHDB-566

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=834211&r1=834210&r2=834211&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Mon Nov  9 20:08:43 2009
@@ -554,6 +554,10 @@
         "created, the file already exists.">>};
 error_info({bad_ctype, Reason}) ->
     {415, <<"bad_content_type">>, Reason};
+error_info({error, illegal_database_name}) ->
+    {400, <<"illegal_database_name">>, <<"Only lowercase characters (a-z), "
+        "digits (0-9), and any of the characters _, $, (, ), +, -, and / "
+        "are allowed">>};
 error_info({Error, Reason}) ->
     {500, couch_util:to_binary(Error), couch_util:to_binary(Reason)};
 error_info(Error) ->