Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 14B0A102A3 for ; Tue, 27 May 2014 05:39:02 +0000 (UTC) Received: (qmail 65937 invoked by uid 500); 27 May 2014 05:39:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 65858 invoked by uid 500); 27 May 2014 05:39:01 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 65849 invoked by uid 99); 27 May 2014 05:39:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2014 05:39:01 +0000 Date: Tue, 27 May 2014 05:39:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-2249) Fauxton generates incorrect parameters when complex keys are specified MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009296#comment-14009296 ] ASF GitHub Bot commented on COUCHDB-2249: ----------------------------------------- GitHub user willholley opened a pull request: https://github.com/apache/couchdb/pull/237 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 https://github.com/willholley/couchdb 2249-fix-fauxton-url-generation-complex-keys Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb/pull/237.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 #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: https://issues.apache.org/jira/browse/COUCHDB-2249 > 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 (v6.2#6252)