You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/07 17:44:20 UTC

[jira] [Commented] (COUCHDB-3031) Multi-query for views with the complex keys throws 400

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

ASF GitHub Bot commented on COUCHDB-3031:
-----------------------------------------

GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/125

    Don't expect #vacc as a response of end_delayed_json_response in multi_query_view

    When `multi_query_view` is calling `chttpd:end_delayed_json_response/1` it is passing it the response it received from query_view's `#vacc`, which means it'll get back a response record and not `#vacc`.
    
    COUCHDB-3031

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-chttpd 67171-fix-multi_query_view-response

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/125.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 #125
    
----

----


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