File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -297,6 +297,12 @@ namespace Aws
297
297
const Aws::String GetVersionId () const { std::lock_guard<std::mutex> locker (m_getterSetterLock); return m_versionId; }
298
298
void SetVersionId (const Aws::String& versionId) { std::lock_guard<std::mutex> locker (m_getterSetterLock); m_versionId = versionId; }
299
299
300
+ /* *
301
+ * (Download only) ETAG of the object to retrieve.
302
+ */
303
+ const Aws::String GetEtag () const { std::lock_guard<std::mutex> locker (m_getterSetterLock); return m_etag; }
304
+ void SetEtag (const Aws::String& etag) { std::lock_guard<std::mutex> locker (m_getterSetterLock); m_etag = etag; }
305
+
300
306
/* *
301
307
* Upload or Download?
302
308
*/
@@ -405,6 +411,7 @@ namespace Aws
405
411
Aws::String m_fileName;
406
412
Aws::String m_contentType;
407
413
Aws::String m_versionId;
414
+ Aws::String m_etag;
408
415
Aws::Map<Aws::String, Aws::String> m_metadata;
409
416
TransferStatus m_status;
410
417
Aws::Client::AWSError<Aws::S3::S3Errors> m_lastError;
Original file line number Diff line number Diff line change @@ -931,6 +931,7 @@ namespace Aws
931
931
handle->SetBytesTotalSize (downloadSize);
932
932
handle->SetContentType (headObjectOutcome.GetResult ().GetContentType ());
933
933
handle->SetMetadata (headObjectOutcome.GetResult ().GetMetadata ());
934
+ handle->SetEtag (headObjectOutcome.GetResult ().GetETag ());
934
935
/* When bucket versioning is suspended, head object will return "null" for unversioned object.
935
936
* Send following GetObject with "null" as versionId will result in 403 access denied error if your IAM role or policy
936
937
* doesn't have GetObjectVersion permission.
@@ -1012,6 +1013,7 @@ namespace Aws
1012
1013
getObjectRangeRequest.WithKey (handle->GetKey ());
1013
1014
getObjectRangeRequest.SetRange (FormatRangeSpecifier (rangeStart, rangeEnd));
1014
1015
getObjectRangeRequest.SetResponseStreamFactory (responseStreamFunction);
1016
+ getObjectRangeRequest.SetIfMatch (handle->GetEtag ());
1015
1017
if (handle->GetVersionId ().size () > 0 )
1016
1018
{
1017
1019
getObjectRangeRequest.SetVersionId (handle->GetVersionId ());
You can’t perform that action at this time.
0 commit comments