We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9896a60 commit 005597cCopy full SHA for 005597c
1 file changed
lib/code/object/http.rb
@@ -204,7 +204,7 @@ def self.code_fetch(*arguments, redirects: 10)
204
code = response.code.to_i
205
location = response["location"].to_s
206
207
- if (300..399).cover?(code) && location.present? && redirects > 0
+ if (300..399).cover?(code) && location.present? && redirects.positive?
208
new_uri = ::URI.join(uri, location)
209
210
if new_uri.host == uri.host
0 commit comments