mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-13 07:56:30 +00:00
Merge pull request #1185 from bryceml/master
handle edge case when bucket name and first part of endpoint match
This commit is contained in:
commit
a07a5336f6
@ -4689,7 +4689,7 @@ string prepare_url(const char* url)
|
||||
string path;
|
||||
string url_str = string(url);
|
||||
string token = string("/") + bucket;
|
||||
int bucket_pos = url_str.find(token);
|
||||
int bucket_pos;
|
||||
int bucket_length = token.size();
|
||||
int uri_length = 0;
|
||||
|
||||
@ -4699,6 +4699,7 @@ string prepare_url(const char* url)
|
||||
uri_length = 7;
|
||||
}
|
||||
uri = url_str.substr(0, uri_length);
|
||||
bucket_pos = url_str.find(token, uri_length);
|
||||
|
||||
if(!pathrequeststyle){
|
||||
hostname = bucket + "." + url_str.substr(uri_length, bucket_pos - uri_length);
|
||||
|
Loading…
Reference in New Issue
Block a user