Disable inflate gzip on head method (#7432)

lolsob-rspec
Yamagishi Kazutoshi 2018-05-10 21:36:12 +09:00 committed by Eugen Rochko
parent e60292c616
commit 59b48b923d
1 changed files with 6 additions and 5 deletions

View File

@ -51,7 +51,7 @@ class Request
end
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
private
@ -61,6 +61,7 @@ class Request
@headers['User-Agent'] = user_agent
@headers['Host'] = @url.host
@headers['Date'] = Time.now.utc.httpdate
@headers['Accept-Encoding'] = 'gzip' if @verb != :head
end
def set_digest!