lib/s33r/networking.rb in s33r-0.5.3 vs lib/s33r/networking.rb in s33r-0.5.4
- old
+ new
@@ -70,12 +70,15 @@
headers.merge! canned_acl_header(url_options[:canned_acl]) if 'PUT' == method
# Generate the S3 authorization header if the client has
# the appropriate instance variable getters.
unless (false == url_options[:authenticated])
+ subdomain = nil
+ subdomain = url_options[:bucket] if url_options[:subdomain]
+
headers['Authorization'] = generate_auth_header_value(method, path, headers,
- url_options[:access], url_options[:secret])
+ url_options[:access], url_options[:secret], subdomain)
end
# Insert the headers into the request object.
headers.each do |key, value|
req[key] = value
@@ -104,11 +107,11 @@
end
else
data = nil
end
- puts req.to_s if @dump_requests
+ puts req.dump(uri.host) if @dump_requests
# Set up the request.
### <snip> start shameless stealing from Marcel Molina
request_runner = Proc.new do
response = @client.request(req, data)
@@ -178,6 +181,6 @@
# Perform a head request.
def do_head(options={}, headers={})
do_request('HEAD', options, headers)
end
end
-end
\ No newline at end of file
+end