mirror of https://gitee.com/bigwinds/arangodb
parent
152f60b80a
commit
e084c6d36c
|
@ -121,13 +121,13 @@ devel
|
|||
* UI: Shard distribution view now has an accordion view instead of displaying
|
||||
all shards of all collections at once.
|
||||
|
||||
* fix issue #4393: broken handling of unix domain sockets in
|
||||
JS_Download
|
||||
|
||||
* internal issue #1726: Supervision to remove deleted nodes from
|
||||
Health did not function for multiple servers at the same time, as
|
||||
agency transaction was malformed.
|
||||
|
||||
* fixed compiler optimization flag usage, adding the used flags to the
|
||||
console version print
|
||||
|
||||
v3.3.4 (XXXX-XX-XX)
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -64,6 +64,10 @@ std::string Endpoint::uriForm(std::string const& endpoint) {
|
|||
return "http://" + endpoint.substr(6);
|
||||
} else if (StringUtils::isPrefix(endpoint, "ssl://")) {
|
||||
return "https://" + endpoint.substr(6);
|
||||
} else if (StringUtils::isPrefix(endpoint, "unix://")) {
|
||||
return endpoint;
|
||||
} else if (StringUtils::isPrefix(endpoint, "http+unix://")) {
|
||||
return "unix://" + endpoint.substr(12);
|
||||
} else {
|
||||
return illegal;
|
||||
}
|
||||
|
|
|
@ -590,9 +590,9 @@ void JS_Download(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
|||
}
|
||||
|
||||
std::string url = TRI_ObjectToString(isolate, args[0]);
|
||||
std::vector<std::string> endpoints;
|
||||
|
||||
if (!url.empty() && url[0] == '/') {
|
||||
std::vector<std::string> endpoints;
|
||||
|
||||
// check if we are a server
|
||||
try {
|
||||
|
@ -815,6 +815,13 @@ void JS_Download(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
|||
endpoint = url.substr(6);
|
||||
}
|
||||
endpoint = "srv://" + endpoint;
|
||||
} else if (url.substr(0, 7) == "unix://") {
|
||||
// Can only have arrived here if endpoints is non empty
|
||||
if (endpoints.empty()) {
|
||||
TRI_V8_THROW_SYNTAX_ERROR("unsupported URL specified");
|
||||
}
|
||||
endpoint = endpoints.front();
|
||||
relative = url.substr(endpoint.size());
|
||||
} else if (!url.empty() && url[0] == '/') {
|
||||
size_t found;
|
||||
// relative URL. prefix it with last endpoint
|
||||
|
@ -847,7 +854,8 @@ void JS_Download(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
|||
std::unique_ptr<Endpoint> ep(Endpoint::clientFactory(endpoint));
|
||||
|
||||
if (ep == nullptr) {
|
||||
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, "invalid URL");
|
||||
TRI_V8_THROW_EXCEPTION_MESSAGE(
|
||||
TRI_ERROR_BAD_PARAMETER, std::string("invalid URL ") + url);
|
||||
}
|
||||
|
||||
std::unique_ptr<GeneralClientConnection> connection(
|
||||
|
|
Loading…
Reference in New Issue