-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tls=false override with mongodb+srv protocol #1165
Conversation
new ConnectionString('mongodb+srv://test5.test.build.10gen.cc') | true | ||
new ConnectionString('mongodb+srv://test5.test.build.10gen.cc/?tls=true') | true | ||
new ConnectionString('mongodb+srv://test5.test.build.10gen.cc/?ssl=true') | true | ||
new ConnectionString('mongodb+srv://test5.test.build.10gen.cc/?tls=false') | false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only one that failed. The others are just to increase test coverage.
if (isSrvProtocol && !combinedOptionsMaps.containsKey("ssl")) { | ||
combinedOptionsMaps.put("ssl", singletonList("true")); | ||
if (isSrvProtocol && !(combinedOptionsMaps.containsKey("tls") || combinedOptionsMaps.containsKey("ssl"))) { | ||
combinedOptionsMaps.put("tls", singletonList("true")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to the non-deprecated parameter name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - nice and subtle bug that one.
if (isSrvProtocol && !combinedOptionsMaps.containsKey("ssl")) { | ||
combinedOptionsMaps.put("ssl", singletonList("true")); | ||
if (isSrvProtocol && !(combinedOptionsMaps.containsKey("tls") || combinedOptionsMaps.containsKey("ssl"))) { | ||
combinedOptionsMaps.put("tls", singletonList("true")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
JAVA-4915