From 40d3fa5dfe01d0e3bd0f6530aba3b4cddfda3969 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Tue, 6 Mar 2018 09:17:59 -0500 Subject: Remove blank Content-Type from GCS direct upload headers Since we started clearing the client-side blob's type in e0867b3, we no longer need to set a blank Content-Type header before issuing the direct upload request. Fixes that Safari 9 would combine the blank Content-Type header with the blank blob type to produce a Content-Type header containing a single comma, invalidating the request. --- activestorage/lib/active_storage/service/gcs_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/lib/active_storage/service/gcs_service.rb') diff --git a/activestorage/lib/active_storage/service/gcs_service.rb b/activestorage/lib/active_storage/service/gcs_service.rb index 83e9bbb305..369c33cbdb 100644 --- a/activestorage/lib/active_storage/service/gcs_service.rb +++ b/activestorage/lib/active_storage/service/gcs_service.rb @@ -104,7 +104,7 @@ module ActiveStorage end def headers_for_direct_upload(key, checksum:, **) - { "Content-Type" => "", "Content-MD5" => checksum } + { "Content-MD5" => checksum } end private -- cgit v1.2.3