Skip to content

Commit

Permalink
Do not attempt to decompress response bodies for Net::HTTP::Head obje…
Browse files Browse the repository at this point in the history
…cts.
  • Loading branch information
alce authored and Adam Wiggins committed Feb 17, 2009
1 parent f2240dd commit 44cff03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/restclient/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def setup_credentials(req)

def process_result(res)
if res.code =~ /\A2\d{2}\z/
decode res['content-encoding'], res.body
decode res['content-encoding'], res.body if res.body
elsif %w(301 302 303).include? res.code
url = res.header['Location']

Expand Down

0 comments on commit 44cff03

Please sign in to comment.