Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2620

Mixed casing prevents multiple readPreferenceTags in uri string

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.0
    • Component/s: None
    • Labels:
      None

      The URI

      mongodb://mongos1.example.com,mongos2.example.com/?readPreferenceTags=foo:bar&readPreferencetags=dc:ny

      If there are two entries in the URI for readPreferenceTags, and one is case-insensitive it is not appended to the parsed readPreferenceTags

      This returns:

       

      { readPreferenceTags":[{"dc":"ny"}] }

       

      Should return:

      { readPreferenceTags":[{"foo": "bar"}, {"dc":"ny"}] }

       
      I believe this occurs because the query parser will gather same-value key as an array. But because they don't have the same key the latter value is overwriting the previous.

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            thomas.reggi@mongodb.com Thomas Reggi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: