aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-03-06 09:17:59 -0500
committerGeorge Claghorn <george@basecamp.com>2018-03-06 10:05:50 -0500
commit40d3fa5dfe01d0e3bd0f6530aba3b4cddfda3969 (patch)
treec144284d3cc11b3c7622849a89eab6caf601ff89 /activestorage/lib/active_storage
parent13e35a5922906cc557a112200fd3e1905cb5f0d7 (diff)
downloadrails-40d3fa5dfe01d0e3bd0f6530aba3b4cddfda3969.tar.gz
rails-40d3fa5dfe01d0e3bd0f6530aba3b4cddfda3969.tar.bz2
rails-40d3fa5dfe01d0e3bd0f6530aba3b4cddfda3969.zip
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.
Diffstat (limited to 'activestorage/lib/active_storage')
-rw-r--r--activestorage/lib/active_storage/service/gcs_service.rb2
1 files changed, 1 insertions, 1 deletions
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