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

SRV URI should allow port number

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      Summary

      Mongo C driver (libmongoc) currently does not allow port numbers with an SRV URI, and has an error that goes "Port numbers are prohibited in an SRV URI". The line of code is here.

      However, according to MongoDB official documentation, SRV URI can actually have port number.

      Could this be a Mongo C driver bug?

      Environment

      _Version of the C / CXX driver: All versions up to mongo-c-driver 1.24.4

      The host OS, version, and architecture: All

      The C / CXX compiler and version: All

      MongoDB server version and topology (standalone, replica set, or sharded cluster): All

      How to Reproduce

      Use a MongoDB SRV URI (mongodb+srv://) which includes a port with the Mongo C Driver.

      Additional Background

      Please provide any additional background information that may be helpful in diagnosing the bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            minh.luu@mongodb.com Minh Luu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: