Restore 400 error for empty PUT
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a98efa69 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a98efa69 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a98efa69 Branch: refs/heads/1585-feature-per-module-log-levels Commit: a98efa69a32d7a22d4e1ae953691767a09003690 Parents: 1017bf1 Author: Robert Newson <[email protected]> Authored: Fri Nov 9 16:03:22 2012 +0000 Committer: Jan Lehnardt <[email protected]> Committed: Tue Nov 13 15:01:54 2012 +0100 ---------------------------------------------------------------------- src/ejson/ejson.erl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/a98efa69/src/ejson/ejson.erl ---------------------------------------------------------------------- diff --git a/src/ejson/ejson.erl b/src/ejson/ejson.erl index 07a71c2..72bb6c1 100644 --- a/src/ejson/ejson.erl +++ b/src/ejson/ejson.erl @@ -33,6 +33,8 @@ init() -> end. +decode(undefined) -> + throw({invalid_json, undefined}); decode(IoList) -> try nif_decode(IoList)
