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

Benoit Chesneau commented on COUCHDB-1035:
------------------------------------------

After looking at the code with help of filippe, the problem is not in oauth 
handler but in couch_httpd_external:

https://github.com/benoitc/couchdb/blob/master/src/couchdb/couch_httpd_external.erl#L103

So It always try to encode the key in json even if it's a show or update 
resource.

> oauth handler always expect json encoded value for key, start_key ...
> ---------------------------------------------------------------------
>
>                 Key: COUCHDB-1035
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1035
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.1, 1.2
>            Reporter: Benoit Chesneau
>            Priority: Minor
>
> oauth handler always expect json encoded value for key, start_key ... even 
> the path isn't a view, list or all_docs resources:
> Path: "/testdb/_design/legacyapp/_show/post/essai?id=essai&key=test"
> [debug] [<0.121.0>] OAuth Params: [{"id","essai"},{"key","test"}]
> [error] [<0.121.0>] attempted upload of invalid JSON (set log_level to debug 
> to log it)
> [debug] [<0.121.0>] Invalid JSON: <<"test">>
> If you are OK i will provide a patch that only try to encode when it's needed.

-- 
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