mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 21:20:49 +00:00
Allowed S3 key to be empty.
This commit is contained in:
parent
2b0cd9cc29
commit
1012a768b1
@ -639,8 +639,6 @@ namespace S3
|
|||||||
key = uri.getPath().substr(1);
|
key = uri.getPath().substr(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.empty() || key == "/")
|
|
||||||
throw Exception("Key name is empty in virtual hosted style S3 URI: " + key + " (" + uri.toString() + ")", ErrorCodes::BAD_ARGUMENTS);
|
|
||||||
boost::to_upper(name);
|
boost::to_upper(name);
|
||||||
if (name != S3 && name != COS)
|
if (name != S3 && name != COS)
|
||||||
{
|
{
|
||||||
@ -665,9 +663,6 @@ namespace S3
|
|||||||
if (bucket.length() < 3 || bucket.length() > 63)
|
if (bucket.length() < 3 || bucket.length() > 63)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Bucket name length is out of bounds in path style S3 URI: " + bucket + " (" + uri.toString() + ")", ErrorCodes::BAD_ARGUMENTS);
|
"Bucket name length is out of bounds in path style S3 URI: " + bucket + " (" + uri.toString() + ")", ErrorCodes::BAD_ARGUMENTS);
|
||||||
|
|
||||||
if (key.empty() || key == "/")
|
|
||||||
throw Exception("Key name is empty in path style S3 URI: " + key + " (" + uri.toString() + ")", ErrorCodes::BAD_ARGUMENTS);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw Exception("Bucket or key name are invalid in S3 URI: " + uri.toString(), ErrorCodes::BAD_ARGUMENTS);
|
throw Exception("Bucket or key name are invalid in S3 URI: " + uri.toString(), ErrorCodes::BAD_ARGUMENTS);
|
||||||
|
Loading…
Reference in New Issue
Block a user