rightscale/right_aws — Issue #93: S3 Content-Type not set in Ruby 1.9.2
Author: camelpunch
Created: 2011-10-31 22:26:07+00:00
State: open

REE:

ree-1.8.7-2011.03 :001 > require 'rubygems'
=> true
ree-1.8.7-2011.03 :002 > require 'right_aws'
=> true
ree-1.8.7-2011.03 :003 > s3 = RightAws::S3.new(ENV['AMAZON_ACCESS_KEY_ID'], ENV['AMAZON_SECRET_ACCESS_KEY']); 0
=> 0
ree-1.8.7-2011.03 :004 > b = s3.bucket('brucie')
ree-1.8.7-2011.03 :006 > b.put 'testing', 'something', {}, 'public-read', { 'Content-Type' => 'image/png' }
=> true
ree-1.8.7-2011.03 :012 > `curl -I https://brucie.s3.amazonaws.com/testing | grep png`
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 9 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
=> "Content-Type: image/png\r\n"

1.9.2:

ruby-1.9.2-p180 :001 > require 'right_aws'
=> true
ruby-1.9.2-p180 :002 > s3 = RightAws::S3.new(ENV['AMAZON_ACCESS_KEY_ID'], ENV['AMAZON_SECRET_ACCESS_KEY']); 0
=> 0
ruby-1.9.2-p180 :003 > b = s3.bucket('brucie'); 0
=> 0
ruby-1.9.2-p180 :004 > b.put 'testing', 'something', {}, 'public-read', { 'Content-Type' => 'image/png' }
=> true
ruby-1.9.2-p180 :005 > `curl -I https://brucie.s3.amazonaws.com/testing | grep png` % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 9 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
=> ""