Skip to content

Commit

Permalink
Handle body is nil for 301 redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
bendangelo authored Jan 2, 2024
1 parent 6083f1d commit 6ddd3d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/faraday/encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def call(environment)
@env = env
if encoding = content_charset
env[:body] = env[:body].dup if env[:body].frozen?
env[:body].force_encoding(encoding)
env[:body].force_encoding(encoding) if !env[:body].nil?
end
end
end
Expand Down

0 comments on commit 6ddd3d3

Please sign in to comment.