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)