[ 
https://issues.apache.org/jira/browse/COUCHDB-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931922#action_12931922
 ] 

Jan Lehnardt commented on COUCHDB-882:
--------------------------------------

With trunk, the patch makes the following test cases fail:

copy_doc        error   126ms   

   1. Run with debuggerAssertion failed: xhr.status == 201
   2. Exception raised: {"message":"db.open(\"doc_that_was_copied\") is 
null","fileName":"http://127.0.0.1:5984/_utils/script/couch_test_runner.js?0.11.0","lineNumber":54,"stack":";((void
 
0))@http://127.0.0.1:5984/_utils/script/couch_test_runner.js?0.11.0:54\u000arun(-4)@http://127.0.0.1:5984/_utils/script/couch_test_runner.js?0.11.0:91\u000a"}

stats   failure 5627ms  

   1. Run with debuggerAssertion 'Copying docs increments doc writes.' failed: 
expected '21', got '20'

> Nonstandard HTTP methods not converted to JSON correctly
> --------------------------------------------------------
>
>                 Key: COUCHDB-882
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-882
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>         Environment: Erlang R13, Linux
>            Reporter: Jason Smith
>            Priority: Minor
>             Fix For: 1.0.1
>
>         Attachments: 
> 0001-For-unknown-HTTP-methods-Use-a-binary-for-httpd.meth.patch, 
> 0001-For-unknown-HTTP-methods-Use-a-binary-for-httpd.meth.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to