Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2817

Are duplicates for all URI options parsed consistently?

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.14.0
    • Affects Version/s: None
    • Component/s: Docs, uri

      If the same option appears multiple times in a connection string (e.g. connectTimeoutMS) with either the same or different spellings, how is its value stored and later retrieved? Does the last occurrence always take precedence?

      Furthermore, is behavior consistent for special URI options that may a struct field (e.g. auth or SSL options) and generic options that set a key in the bson_t within a URI struct and are later looked up with a generic get method (e.g. connectTimeoutMS)?

      For context, the connection string spec states:

      • Keys are strings and the character case must be normalized by lower casing the uppercase ASCII characters A through Z; other characters are left as-is. (source)
      • If a key is repeated and the corresponding data type is not a List then the precedence of which key value pair will be used is undefined. Where possible, a warning SHOULD be raised to inform the user that multiple options were found for the same value. (source)

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: