Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions ydb/library/yql/providers/s3/actors/yql_s3_applicator_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ struct TListMultipartUploads {
}

TString BuildUrl() const {
// We have to sort the cgi parameters for the correct aws signature
// This requirement will be fixed in the curl library
// https://github.com/curl/curl/commit/fc76a24c53b08cdf6eec8ba787d8eac64651d56e
// https://github.com/curl/curl/commit/c87920353883ef9d5aa952e724a8e2589d76add5
TUrlBuilder urlBuilder(Url);
urlBuilder.AddUrlParam("uploads");
urlBuilder.AddUrlParam("prefix", Prefix);
if (KeyMarker) {
urlBuilder.AddUrlParam("key-marker", KeyMarker);
}
urlBuilder.AddUrlParam("prefix", Prefix);
if (UploadIdMarker) {
urlBuilder.AddUrlParam("upload-id-marker", UploadIdMarker);
}
urlBuilder.AddUrlParam("uploads");
return urlBuilder.Build();
}
};
Expand Down Expand Up @@ -133,11 +137,15 @@ struct TListParts {
}

TString BuildUrl() const {
// We have to sort the cgi parameters for the correct aws signature
// This requirement will be fixed in the curl library
// https://github.com/curl/curl/commit/fc76a24c53b08cdf6eec8ba787d8eac64651d56e
// https://github.com/curl/curl/commit/c87920353883ef9d5aa952e724a8e2589d76add5
TUrlBuilder urlBuilder(Url);
urlBuilder.AddUrlParam("uploadId", UploadId);
if (PartNumberMarker) {
urlBuilder.AddUrlParam("part-number-marker", PartNumberMarker);
}
urlBuilder.AddUrlParam("uploadId", UploadId);
return urlBuilder.Build();
}
};
Expand Down
13 changes: 9 additions & 4 deletions ydb/library/yql/providers/s3/object_listers/yql_s3_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,18 +287,23 @@ class TS3Lister : public IS3Lister {
private:
static void SubmitRequestIntoGateway(TListingContext& ctx) {
IHTTPGateway::THeaders headers = IHTTPGateway::MakeYcHeaders(ctx.RequestId, ctx.ListingRequest.AuthInfo.GetToken(), {}, ctx.ListingRequest.AuthInfo.GetAwsUserPwd(), ctx.ListingRequest.AuthInfo.GetAwsSigV4());
TUrlBuilder urlBuilder(ctx.ListingRequest.Url);
urlBuilder.AddUrlParam("list-type", "2")
.AddUrlParam("prefix", ctx.ListingRequest.Prefix)
.AddUrlParam("max-keys", TStringBuilder() << ctx.MaxKeys);

// We have to sort the cgi parameters for the correct aws signature
// This requirement will be fixed in the curl library
// https://github.com/curl/curl/commit/fc76a24c53b08cdf6eec8ba787d8eac64651d56e
// https://github.com/curl/curl/commit/c87920353883ef9d5aa952e724a8e2589d76add5
TUrlBuilder urlBuilder(ctx.ListingRequest.Url);
if (ctx.ContinuationToken.Defined()) {
urlBuilder.AddUrlParam("continuation-token", *ctx.ContinuationToken);
}
if (ctx.Delimiter.Defined()) {
urlBuilder.AddUrlParam("delimiter", *ctx.Delimiter);
}

urlBuilder.AddUrlParam("list-type", "2")
.AddUrlParam("max-keys", TStringBuilder() << ctx.MaxKeys)
.AddUrlParam("prefix", ctx.ListingRequest.Prefix);

auto gateway = ctx.GatewayWeak.lock();
if (!gateway) {
ythrow yexception() << "Gateway disappeared";
Expand Down