Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3254

Rewrite function breaks multiple parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • None
    • Couchdb version: v. 2.0.0

    Description

      Using a rewrite rule on a view with multiple parameters doesn't work as the resulting URL seems to be missing ampersands between the parameters. When using the _design document below and a URL like http://localhost:5984/database_name/_design/test/_rewrite/views/_view/view_name the following error occurs:

      {"error":"query_parse_error","reason":"Invalid boolean parameter: \"truekey=null\""}

      Minimal _design document:
      {
      "_id": "_design/test",
      "language": "javascript",
      "rewrites": "function(req) {return {path: '../'+req.path.slice(4).join('/'),query:

      {'reduce': 'true','key': 'null'}

      }};"
      }

      Couchdb version: v. 2.0.0

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Murgi Fabian
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: