[CDRIVER-4437] URI validation should inform users that SRV URIs should not contain port numbers Created: 25/Jul/22  Updated: 28/Oct/23  Resolved: 26/Jul/22

Status: Closed
Project: C Driver
Component/s: uri
Affects Version/s: None
Fix Version/s: 1.23.0

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to PHPC-1730 Connection string with "mongodb+srv" ... Closed
is related to PHPLIB-790 Add FAQ section to documentation Closed

 Description   

When a port number is included in an SRV URI, libmongoc raises the following error:

Failed to parse MongoDB URI: 'mongodb+srv://xxx.yyy.mongodb.net:27017'. Invalid service name in URI.

A more helpful error message would inform users that port numbers should not be included in SRV URIs.



 Comments   
Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}

Message: CDRIVER-4437 Improve quality of SRV URI parse error messages (#1076)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4ad7265c4692bdbd476b1c3dd082c63675665500

Generated at Wed Feb 07 21:20:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.