Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.0.1
-
None
-
None
-
Erlang R13, Linux
-
Regular Contributors Level (Easy to Medium)
Description
Since COUCHDB-815, CouchDB allows nonstandard or unknown HTTP methods in case a _show or similar function may want to implement a response to that method.
Unfortunately the (my) patch in that ticket used couch_util:to_existing_atom which returns the passed value unmodified if it has no corresponding atom. That is wrong because the HTTP method will be copied into the `req` object in the view server, therefore it must not be an Erlang string (list of integers) because those do not JSONify correctly. Instead, if the atom does not exist, the method should be converted to a binary.