|
In PHPC-1730, a user noted that the mongo shell accepts a port number in a mongodb+srv connection string and asked why the same URI was rejected by the PHP driver. To quote the Initial DNS Seedlist Discovery spec:
It is an error to specify a port in a connection string with the mongodb+srv protocol, and the driver MUST raise a parse error and MUST NOT do DNS resolution or contact hosts.
I presume the mongo shell ignores the port, but it may be preferable to raise an error for the sake of consistency with drivers.
Note: this only pertains to mongo and is not an issue for mongosh since that uses the Node.js driver (which should already comply with the spec).
|