Skip to content

Commit

Permalink
Refactor compareJobDocuments comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Nov 14, 2024
1 parent 31044e7 commit 412a0da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/jobs/JobsFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,15 @@ bool JobsFeature::compareJobDocuments(const Aws::Crt::JsonObject& job1, const Aw
size_t lastPos = 0;
for (; it != end; ++it) {
count++;

// Adding the rest of the job document before the s3 URL
result += s.substr(lastPos, it->position() - lastPos);

// Add the non-presigned part of the URL i.e. the s3 unsigned url
result += it->str(1);
// Add the non-presigned part of the URL

// Replace only the presigned portion with the placeholder
result += "?aws:iot:s3-presigned-suffix:PLACEHOLDER";
// Replace only the presigned portion
lastPos = it->position() + it->length();
}
result += s.substr(lastPos);
Expand Down

0 comments on commit 412a0da

Please sign in to comment.