Skip to content

Commit

Permalink
fix AWS S3 prefix substring splitting (#172)
Browse files Browse the repository at this point in the history
Fixes #171

Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana authored Aug 27, 2024
1 parent 9d723bd commit 40824d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ error::Error getAwsInfo(const std::string& host, bool https,

std::smatch match;
std::regex_search(host, match, AWS_S3_PREFIX_REGEX);
aws_s3_prefix = host.substr(static_cast<size_t>(match.length()));
aws_s3_prefix = host.substr(0, static_cast<size_t>(match.length()));

if (utils::Contains(aws_s3_prefix, "s3-accesspoint") && !https) {
return error::Error("use HTTPS scheme for host " + host);
Expand Down

0 comments on commit 40824d0

Please sign in to comment.