diff options
| author | João Pinheiro <joao.castropinheiro@gmail.com> | 2024-03-09 15:57:56 +0000 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-07-11 04:49:59 +0000 |
| commit | e62a0126cd3b4794a9cc5a7e40a237e1f7cec3b9 (patch) | |
| tree | 749f549dd827eea970844b437fe8e28f2ddadb34 | |
| parent | e1238a1faba5cbb7975d08963bf0bfa50a96d2b0 (diff) | |
[ruby/open-uri] apply default max_redirects
https://github.com/ruby/open-uri/commit/5d29e626bc
| -rw-r--r-- | lib/open-uri.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb index ba2379325f..9631e35e41 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -212,7 +212,7 @@ module OpenURI end uri_set = {} - max_redirects = options[:max_redirects] + max_redirects = options[:max_redirects] || Options.fetch(:max_redirects) buf = nil while true redirect = catch(:open_uri_redirect) { |
