diff options
author | ThibG <thib@sitedethib.com> | 2018-05-11 20:34:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 20:34:19 +0200 |
commit | da8897aaefeedf281a72f2e3b1b88ea0573e481e (patch) | |
tree | 53a6ce915f8687b15e5bd5d06a53d08ed764d3da /app/lib | |
parent | e7ed61917b045f15776adbf257501dc9dac85557 (diff) | |
parent | 45fce0e496727cd1579c630c22592638341f78c6 (diff) |
Merge pull request #477 from ThibG/glitch-soc/merge
Merge upstream changes
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/request.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/lib/request.rb b/app/lib/request.rb index fc7d398e0..731bf7687 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -51,16 +51,17 @@ 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 def set_common_headers! - @headers[REQUEST_TARGET] = "#{@verb} #{@url.path}" - @headers['User-Agent'] = user_agent - @headers['Host'] = @url.host - @headers['Date'] = Time.now.utc.httpdate + @headers[REQUEST_TARGET] = "#{@verb} #{@url.path}" + @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! |