Skip to content

Commit 67f4d94

Browse files
committed
remove md5 validation
1 parent d5b0ca2 commit 67f4d94

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

google/cloud/storage/internal/async/writer_connection_impl.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,11 @@ AsyncWriterConnectionImpl::Finalize(storage::WritePayload payload) {
150150
// Default to letting the internal hash function compute and send the checksum.
151151
auto action = PartialUpload::kFinalizeWithChecksum;
152152

153-
if (is_append || current_options.has<google::cloud::storage::UseCrc32cValueOption>() ||
154-
current_options.has<google::cloud::storage::UseMD5ValueOption>()) {
153+
if (is_append || current_options.has<google::cloud::storage::UseCrc32cValueOption>()) {
155154
if (merged.has<google::cloud::storage::UseCrc32cValueOption>()) {
156155
write.mutable_object_checksums()->set_crc32c(
157156
merged.get<google::cloud::storage::UseCrc32cValueOption>());
158157
}
159-
if (merged.has<google::cloud::storage::UseMD5ValueOption>()) {
160-
auto as_proto = storage_internal::MD5ToProto(
161-
merged.get<google::cloud::storage::UseMD5ValueOption>());
162-
if (as_proto) {
163-
write.mutable_object_checksums()->set_md5_hash(*as_proto);
164-
}
165-
}
166158
// For appendable uploads, the internal hash function only sees the chunks uploaded
167159
// in this stream, not the full object. We use `kFinalize` to avoid sending this
168160
// partial hash, which would otherwise fail validation.

0 commit comments

Comments
 (0)