[前][次][番号順一覧][スレッド一覧]

ruby-changes:44012

From: akr <ko1@a...>
Date: Wed, 7 Sep 2016 16:14:35 +0900 (JST)
Subject: [ruby-changes:44012] akr:r56085 (trunk): lib/open-uri.rb: Allow http to https redirection.

akr	2016-09-07 16:14:30 +0900 (Wed, 07 Sep 2016)

  New Revision: 56085

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56085

  Log:
    lib/open-uri.rb: Allow http to https redirection.
    
    * lib/open-uri.rb: Allow http to https redirection.
      Note that https to http is still forbidden.
      [ruby-core:20485] [Feature #859] by Roman Shterenzon.

  Modified files:
    trunk/ChangeLog
    trunk/lib/open-uri.rb
Index: lib/open-uri.rb
===================================================================
--- lib/open-uri.rb	(revision 56084)
+++ lib/open-uri.rb	(revision 56085)
@@ -249,7 +249,7 @@ module OpenURI https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb#L249
     # (RFC 2109 4.3.1, RFC 2965 3.3, RFC 2616 15.1.3)
     # However this is ad hoc.  It should be extensible/configurable.
     uri1.scheme.downcase == uri2.scheme.downcase ||
-    (/\A(?:http|ftp)\z/i =~ uri1.scheme && /\A(?:http|ftp)\z/i =~ uri2.scheme)
+    (/\A(?:http|ftp)\z/i =~ uri1.scheme && /\A(?:https?|ftp)\z/i =~ uri2.scheme)
   end
 
   def OpenURI.open_http(buf, target, proxy, options) # :nodoc:
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 56084)
+++ ChangeLog	(revision 56085)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Sep  7 16:00:45 2016  Tanaka Akira  <akr@f...>
+
+	* lib/open-uri.rb: Allow http to https redirection.
+	  Note that https to http is still forbidden.
+	  [ruby-core:20485] [Feature #859] by Roman Shterenzon.
+
 Wed Sep  7 14:56:59 2016  Kazuki Tsujimoto  <kazuki@c...>
 
 	* lib/csv.rb (CSV::{Row,Table}#{each,delete_if}): returns an enumerator

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]