fix encryption context (#4582)
This commit is contained in:
parent
4d898ffa59
commit
cfa652182d
@ -211,9 +211,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
ret.Details.EncryptionKeySha256 = std::move(response.Value.Details.EncryptionKeySha256);
|
||||
ret.Details.EncryptionScope = std::move(response.Value.Details.EncryptionScope);
|
||||
ret.Details.IsServerEncrypted = response.Value.Details.IsServerEncrypted;
|
||||
ret.Details.EncryptionContext
|
||||
= Azure::Core::Http::_internal::HttpShared::GetHeaderOrEmptyString(
|
||||
response.RawResponse->GetHeaders(), _detail::EncryptionContextHeaderName);
|
||||
auto& headers = response.RawResponse->GetHeaders();
|
||||
auto encryptionContext = headers.find(_detail::EncryptionContextHeaderName);
|
||||
if (encryptionContext != headers.end())
|
||||
{
|
||||
ret.Details.EncryptionContext = encryptionContext->second;
|
||||
}
|
||||
return Azure::Response<Models::DownloadFileResult>(
|
||||
std::move(ret), std::move(response.RawResponse));
|
||||
}
|
||||
|
||||
@ -342,8 +342,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
|
||||
ret.VersionId = std::move(response.Value.VersionId);
|
||||
ret.IsCurrentVersion = std::move(response.Value.IsCurrentVersion);
|
||||
ret.IsDirectory = _detail::MetadataIncidatesIsDirectory(ret.Metadata);
|
||||
ret.EncryptionContext = Azure::Core::Http::_internal::HttpShared::GetHeaderOrEmptyString(
|
||||
response.RawResponse->GetHeaders(), _detail::EncryptionContextHeaderName);
|
||||
auto& headers = response.RawResponse->GetHeaders();
|
||||
auto encryptionContext = headers.find(_detail::EncryptionContextHeaderName);
|
||||
if (encryptionContext != headers.end())
|
||||
{
|
||||
ret.EncryptionContext = encryptionContext->second;
|
||||
}
|
||||
return Azure::Response<Models::PathProperties>(std::move(ret), std::move(response.RawResponse));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user