Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6369

duplicate json key "echoParams" should be removed in ping-response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Not A Problem
    • 4.9
    • None
    • None
    • None
    • testing on ubuntu 14.04
      version: 4.9.0 1604085 - rmuir - 2014-06-20 06:34:03

    Description

      Apparently the /admin/ping handler will duplicate the echoParams key in the json-response.

      $ curl -s http://localhost:8983/solr/test-node-client/admin/ping?wt=json
      {"responseHeader":{"status":0,"QTime":2,"params":{"df":"text","echoParams":"all","rows":"10","echoParams":"all","wt":"json","q":"solrpingquery","distrib":"false"}},"status":"OK"}

      Having "echoParams":"all" twice in that response doesn't really make sense?

      Strictly speaking this is allowed in the json spec, so it is not a violation in principle
      http://stackoverflow.com/questions/21832701/does-json-syntax-allow-duplicate-keys-in-an-object

      However there are some json-parse implementations out there that want to map this into hashtables and are not silently overwriting the key with the last seen value, but are throwing errors in the process.

      To those a cleanup of the json response would make life somewhat easier.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mportier Marc Portier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: