couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r834211 - /couchdb/trunk/src/couchdb/couch_httpd.erl
Date Mon, 09 Nov 2009 20:08:43 GMT
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) ->



Mime
View raw message