couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-2249) Fauxton generates incorrect parameters when complex keys are specified
Date Tue, 27 May 2014 05:39:01 GMT


ASF GitHub Bot commented on COUCHDB-2249:

GitHub user willholley opened a pull request:

    Fauxton: fix fauxton query parameters for complex keys (COUCHDB-2249)

    Fix URL generation in Fauxton when complex keys are specified as query parameters (COUCHDB-2249).

    This PR contains two changes:
    1. Documents.QueryParams.parse no longer modifies it's input in-place.
    2. urlParams returned by createParams contains the stringified parameters (rather than
the parsed representation that it was returning previously).

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

    $ git pull 2249-fix-fauxton-url-generation-complex-keys

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #237
commit b56fa66b9664e5b468ded0788dc3ae9f8051aa7d
Author: Will Holley <>
Date:   2014-05-27T04:50:36Z

    Fauxton: do not modify query options in-place
    Ensure we clone the parameters to Documents.QueryParams.parse and
    Documents.QueryParams.stringify. These functions should return new data
    structures rather than modifying the input in-place.

commit cca4a009f88656f0fdb6d4e9b1f173a2262853eb
Author: Will Holley <>
Date:   2014-05-27T04:57:47Z

    Fauxton: urlParams should be stringified
    Do not use the parsed query object for url generation. Instead, use the
    stringified representation. Fixes COUCHDB-2249.


> Fauxton generates incorrect parameters when complex keys are specified
> ----------------------------------------------------------------------
>                 Key: COUCHDB-2249
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Will Holley
> Fauxton is not stringifying user-defined query parameters correctly (added in the "Query
Options" panel). This results in a query parameter being generated for each component of the
complex key.
> For example, specifying a startkey of {noformat}["a","b"]{noformat} generates the URL

> {noformat}
> ?startkey[]=a&startkey[]=b
> {noformat}
> instead of:
> {noformat}
> ?startkey=["a","b"]
> {noformat}

This message was sent by Atlassian JIRA

View raw message