Skip to content

Commit

Permalink
Bucket host should include port and not path
Browse files Browse the repository at this point in the history
This resolves issues when using v4 signing with path-style requests.
  • Loading branch information
gaul committed Jan 16, 2016
1 parent 4bfbfa3 commit 88a4f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static string url_to_host(const std::string &url)
}

size_t idx;
if ((idx = host.find(':')) != string::npos || (idx = host.find('/')) != string::npos) {
if ((idx = host.find('/')) != string::npos) {
return host.substr(0, idx);
} else {
return host;
Expand All @@ -123,7 +123,7 @@ static string get_bucket_host()
if(!pathrequeststyle){
return bucket + "." + url_to_host(host);
}
return url_to_host(host) + "/" + bucket;
return url_to_host(host);
}

#if 0 // noused
Expand Down

0 comments on commit 88a4f04

Please sign in to comment.