SRV URI should allow port number

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Minh Luu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: