summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd.erl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-02-11 16:08:38 +0000
committerDamien F. Katz <damien@apache.org>2009-02-11 16:08:38 +0000
commit59f41c2678f59a2effade9651c0de11bbe811c56 (patch)
tree7a4ecf30fae7478a98d1cd5be55f09241bca43c6 /src/couchdb/couch_httpd.erl
parent3132843214251e3a68b7b3fe89618d323dffa546 (diff)
Fix for COUCHDB-238, explicit check and error for doc ids starting with underscore.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@743371 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r--src/couchdb/couch_httpd.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 767b91d4..6b9079c4 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -372,6 +372,8 @@ send_error(Req, {not_found, Reason}) ->
send_error(Req, 404, <<"not_found">>, Reason);
send_error(Req, conflict) ->
send_error(Req, 409, <<"conflict">>, <<"Document update conflict.">>);
+send_error(Req, {invalid_doc, Reason}) ->
+ send_error(Req, 400, <<"invalid_doc">>, Reason);
send_error(Req, {forbidden, Msg}) ->
send_json(Req, 403,
{[{<<"error">>, <<"forbidden">>},