1
0
Fork 0

Use proper URL encoding in Cluster Documents API (single case)

This commit is contained in:
Michael Hackstein 2016-04-14 20:26:11 +02:00
parent 2f5910f828
commit eee02b40cb
1 changed files with 9 additions and 6 deletions

View File

@ -1363,11 +1363,13 @@ int getDocumentOnCoordinator(
}
// We send to single endpoint
cc->asyncRequest("", coordTransactionID, "shard:" + it.first, reqType,
baseUrl + StringUtils::urlEncode(it.first) + "/" +
slice.get(TRI_VOC_ATTRIBUTE_KEY).copyString() +
optsUrlPart,
body, headersCopy, nullptr, 60.0);
cc->asyncRequest(
"", coordTransactionID, "shard:" + it.first, reqType,
baseUrl + StringUtils::urlEncode(it.first) + "/" +
StringUtils::urlEncode(
slice.get(TRI_VOC_ATTRIBUTE_KEY).copyString()) +
optsUrlPart,
body, headersCopy, nullptr, 60.0);
} else {
reqBuilder.clear();
reqBuilder.openArray();
@ -1426,7 +1428,8 @@ int getDocumentOnCoordinator(
std::make_unique<std::map<std::string, std::string>>(*headers);
cc->asyncRequest("", coordTransactionID, "shard:" + shard, reqType,
baseUrl + StringUtils::urlEncode(shard) + "/" +
slice.get(TRI_VOC_ATTRIBUTE_KEY).copyString() +
StringUtils::urlEncode(
slice.get(TRI_VOC_ATTRIBUTE_KEY).copyString()) +
optsUrlPart,
nullptr, headersCopy, nullptr, 60.0);
}