Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1758

CANONICALIZE_HOST_NAME option does not handle upper case values correctly

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The example in documentation states:

      > Specified as comma-separated key:value pairs, e.g. "SERVICE_REALM:foo,CANONICALIZE_HOSTNAME:TRUE".

      Passing this input (with an extra underscore per https://jira.mongodb.org/browse/RUBY-1757) produces:

      irb(main):007:0> Mongo::URI.new('mongodb://test.host/?authMechanismProperties=SERVICE_REALM:foo,CANONICALIZE_HOST_NAME:TRUE').uri_options[:auth_mech_properties]
      => {"service_realm"=>"foo", "canonicalize_host_name"=>false}
      

      This is because the code only accepts `true` as the true value and converts everything else to false.

      At a minimum, TRUE should be converted to true, and possibly other values like 1 should also be converted to true.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: