From 1cead77e3a6fadb67c5019aeeb14e5e5ff7a3e3a Mon Sep 17 00:00:00 2001 From: Ken Zangelin Date: Mon, 13 Nov 2023 11:51:30 +0100 Subject: [PATCH] Roll-back of a fix for AWS/DocumentDB - the host part of the mongo db connection URI ALWAYS ends in a slash --- src/lib/orionld/mongoc/mongocInit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/orionld/mongoc/mongocInit.cpp b/src/lib/orionld/mongoc/mongocInit.cpp index c5b10b7aae..0e027b627a 100644 --- a/src/lib/orionld/mongoc/mongocInit.cpp +++ b/src/lib/orionld/mongoc/mongocInit.cpp @@ -196,8 +196,10 @@ static char* uriCompose // If dbHost is a list, the list must end with a slash // Assuming it's a list if there's a comma in the string // - if (strchr(dbHost, ',') != NULL) - compV[compNo++] = (char*) "/"; + // Correction: seems like the slash is needed ALWAYS + // + // if (strchr(dbHost, ',') != NULL) + compV[compNo++] = (char*) "/"; bool dbAuthDbPresent = (dbAuthDb != NULL) && (dbAuthDb[0] != 0); bool dbReplicaSetPresent = (dbReplicaSet != NULL) && (dbReplicaSet[0] != 0);