From 6b37bc5858b76ddf9ef87702987fcc7e1ac140c7 Mon Sep 17 00:00:00 2001 From: andrey-qlogic <44769745+andrey-qlogic@users.noreply.github.com> Date: Thu, 10 Jan 2019 17:09:54 +0300 Subject: [PATCH] 3822: Fixed setDisableGZipContent call (#4314) * 3822: Fixed setDisableGZipContent call * 3822: Changes after review --- .../java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java index caaedf3018b8..a10b4ef8a973 100644 --- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java +++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java @@ -288,8 +288,9 @@ public StorageObject create( new InputStreamContent(storageObject.getContentType(), content)); insert.getMediaHttpUploader().setDirectUploadEnabled(true); Boolean disableGzipContent = Option.IF_DISABLE_GZIP_CONTENT.getBoolean(options); - if (disableGzipContent != null) - insert.getMediaHttpUploader().setDisableGZipContent(disableGzipContent); + if (disableGzipContent != null) { + insert.setDisableGZipContent(disableGzipContent); + } setEncryptionHeaders(insert.getRequestHeaders(), ENCRYPTION_KEY_PREFIX, options); return insert .setProjection(DEFAULT_PROJECTION)