[
https://issues.apache.org/jira/browse/COUCHDB-3031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327732#comment-15327732
]
ASF GitHub Bot commented on COUCHDB-3031:
-----------------------------------------
GitHub user eiri opened a pull request:
https://github.com/apache/couchdb-couch-mrview/pull/48
Allow json_decode in parse_params to be optional
This allows explicitly indicate if function `parse_params` should decode
passed parameter's value instead of trying to guess it by value's term type.
It makes it possible to use this function both with GET and POST queries.
COUCHDB-3031
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-couch-mrview
make-decode-in-parse_params-optional
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch-mrview/pull/48.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #48
----
commit 1738f552e27bea5243130a44ed39eefe15b51a41
Author: Eric Avdey <[email protected]>
Date: 2016-06-13T16:28:17Z
Allow JSON_DECODE in parse_params to be optional
This allows explicitly indicate if parse_params function
should json decode passed parameters instead of trying
to guess it by value's term type.
It makes it possible to use this function both with GET
and POST queries.
----
> Multi-query for views with the complex keys throws 400
> ------------------------------------------------------
>
> Key: COUCHDB-3031
> URL: https://issues.apache.org/jira/browse/COUCHDB-3031
> Project: CouchDB
> Issue Type: Bug
> Reporter: Eric Avdey
>
> For the views with complex keys (e.g. array) the multi-query request (
> {{POST}} on {{/db/_design/ddoc/_view/view}} with payload like {noformat}
> {'queries': [{'startkey': ['a', 'et '], 'endkey': ['blanditiis',
> 'voluptatem']}, ... } {noformat} returns {noformat}
> {"error":"bad_request","reason":"invalid UTF-8 JSON"} {noformat}
> When startkey and endkeys are presented as stringified JSON the request is
> coming through, but multi_query_view/5 throws the following exception
> {code}
> [error] req_err(515264238) badrecord : vacc
> [<<"chttpd_view:multi_query_view/5 L37">>,
> <<"chttpd:process_request/1 L293">>,
> <<"chttpd:handle_request_int/1 L229">>,
> <<"mochiweb_http:headers/6 L122">>,<<"proc_lib:init_p_do_apply/3 L240">>]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)