|
|
@ -51,7 +51,7 @@ class Request
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def headers
|
|
|
|
def headers
|
|
|
|
(@account ? @headers.merge('Signature' => signature) : @headers).reverse_merge('Accept-Encoding' => 'gzip').without(REQUEST_TARGET)
|
|
|
|
(@account ? @headers.merge('Signature' => signature) : @headers).without(REQUEST_TARGET)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
private
|
|
|
@ -61,6 +61,7 @@ class Request
|
|
|
|
@headers['User-Agent'] = user_agent
|
|
|
|
@headers['User-Agent'] = user_agent
|
|
|
|
@headers['Host'] = @url.host
|
|
|
|
@headers['Host'] = @url.host
|
|
|
|
@headers['Date'] = Time.now.utc.httpdate
|
|
|
|
@headers['Date'] = Time.now.utc.httpdate
|
|
|
|
|
|
|
|
@headers['Accept-Encoding'] = 'gzip' if @verb != :head
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def set_digest!
|
|
|
|
def set_digest!
|
|
|
|