Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2668

Add SRV test with capital letters in hostnames

    • Needed
    • Hide

      Summary of necessary driver changes
      Drivers should sync the initial-dns-seedlist-discovery spec test added in: https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241

      Show
      Summary of necessary driver changes Drivers should sync the initial-dns-seedlist-discovery spec test added in: https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4675 Backlog
      CXX-2709 Backlog
      CSHARP-4712 Backlog
      GODRIVER-2897 Fixed 1.14.0
      JAVA-5064 Backlog
      NODE-5439 Blocked
      MOTOR-1148 Duplicate
      PYTHON-3822 Fixed 4.7
      PHPLIB-1186 Won't Do
      RUBY-3289 Backlog
      RUST-1697 Backlog
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4675 Backlog CXX-2709 Backlog CSHARP-4712 Backlog GODRIVER-2897 Fixed 1.14.0 JAVA-5064 Backlog NODE-5439 Blocked MOTOR-1148 Duplicate PYTHON-3822 Fixed 4.7 PHPLIB-1186 Won't Do RUBY-3289 Backlog RUST-1697 Backlog

      New Summary

      This ticket adds a new initial-dns-seedlist-discovery spec test to ensure drivers can connect with a "mongodb+srv://" URI that contains capital letters in the SRV hostname: https://github.com/mongodb/specifications/commit/82da02ba96d5d3ec4f48f6d2d4f2d0ebb1dce241

      Although this test does not cover the bug in PYTHON-3800, it's still useful because it ensures drivers normalize the hostname before SRV+TXT lookup.

      Original Summary

      In HELP-47526 and PYTHON-3800, a bug was discovered where pymongo failed to connect to SRV hosts with capital letters. Specifically, in this section of the spec:

      A driver MUST verify that the host names returned through SRV records have the same parent {domainname}. Drivers MUST raise an error and MUST NOT initiate a connection to any returned host name which does not share the same {domainname}.

      The bug was that pymongo would normalize the {domainname} to lowercase but would not normalize the host names returned through SRV records.

      The test should use a new SRV record that resolves to a host with capital letters:

      
      Record                                      TTL    Class   Port   Target
      _mongodb._tcp.test25.test.build.10gen.cc.   86400  IN SRV  27017  localhost.TEST.build.10gen.cc.
      

      Then test that discovery works when connecting to both of the following URIs:

      mongodb+srv://test25.test.build.10gen.cc
      mongodb+srv://test25.TEST.build.10gen.cc
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Shane Harvey Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: