From fa2e1b67e548cb5653b66909a2bc3d6b9eae98e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Thu, 6 Oct 2022 20:09:46 +0200 Subject: [ruby/open-uri] Support 308 status redirect https://github.com/ruby/open-uri/commit/d8899ae4ac --- lib/open-uri.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/open-uri.rb b/lib/open-uri.rb index 0ce8471126..2f73710392 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -356,7 +356,8 @@ module OpenURI when Net::HTTPMovedPermanently, # 301 Net::HTTPFound, # 302 Net::HTTPSeeOther, # 303 - Net::HTTPTemporaryRedirect # 307 + Net::HTTPTemporaryRedirect, # 307 + Net::HTTPPermanentRedirect # 308 begin loc_uri = URI.parse(resp['location']) rescue URI::InvalidURIError -- cgit v1.2.1