Skip to content

Commit 005597c

Browse files
No comment provided.
1 parent 9896a60 commit 005597c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/code/object/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def self.code_fetch(*arguments, redirects: 10)
204204
code = response.code.to_i
205205
location = response["location"].to_s
206206

207-
if (300..399).cover?(code) && location.present? && redirects > 0
207+
if (300..399).cover?(code) && location.present? && redirects.positive?
208208
new_uri = ::URI.join(uri, location)
209209

210210
if new_uri.host == uri.host

0 commit comments

Comments
 (0)