<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/open-uri, branch ruby_2_7</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>The default charset of text/* media type is UTF-8.</title>
<updated>2019-07-15T00:36:52+00:00</updated>
<author>
<name>Tanaka Akira</name>
<email>akr@fsij.org</email>
</author>
<published>2019-07-15T00:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8f7884761e30c453287d73de6ea733d565635ebc'/>
<id>8f7884761e30c453287d73de6ea733d565635ebc</id>
<content type='text'>
Thanks for the patch  gareth (Gareth Adams).  [Bug #15933]

-------

Combines two small, but very related changes

1: Treat HTTPS the same as HTTP

Previously, OpenURI followed guidance in RFC2616/3.7.1:

&gt; When no explicit charset parameter is provided by the sender, media
&gt; subtypes of the "text" type are defined to have a default charset
&gt; value of "ISO-8859-1" when received via HTTP.

However this RFC was written before TLS was established and OpenURI was
never updated to treat HTTPS traffic the same way. So, HTTPS documents
received a different default to HTTP documents.

This commit removes the scheme check so that all text/* documents
processed by OpenURI are treated the same way.

In theory this processing gets applied to FTP URIs too, but there's no
mechanism in OpenURI for FTP documents to have Content-Type metadata
appended to them, so this ends up being a no-op.

2: Change default charset for text/* to UTF-8

Replaces the default ISO-8859-1 charset previously defined in RFC2616 (now
obsoleted) with a UTF-8 charset as defined in RFC6838.

Fixes: https://bugs.ruby-lang.org/issues/15933
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks for the patch  gareth (Gareth Adams).  [Bug #15933]

-------

Combines two small, but very related changes

1: Treat HTTPS the same as HTTP

Previously, OpenURI followed guidance in RFC2616/3.7.1:

&gt; When no explicit charset parameter is provided by the sender, media
&gt; subtypes of the "text" type are defined to have a default charset
&gt; value of "ISO-8859-1" when received via HTTP.

However this RFC was written before TLS was established and OpenURI was
never updated to treat HTTPS traffic the same way. So, HTTPS documents
received a different default to HTTP documents.

This commit removes the scheme check so that all text/* documents
processed by OpenURI are treated the same way.

In theory this processing gets applied to FTP URIs too, but there's no
mechanism in OpenURI for FTP documents to have Content-Type metadata
appended to them, so this ends up being a no-op.

2: Change default charset for text/* to UTF-8

Replaces the default ISO-8859-1 charset previously defined in RFC2616 (now
obsoleted) with a UTF-8 charset as defined in RFC6838.

Fixes: https://bugs.ruby-lang.org/issues/15933
</pre>
</div>
</content>
</entry>
<entry>
<title>Warn open-uri's "open" method at Kernel.</title>
<updated>2019-07-14T08:18:17+00:00</updated>
<author>
<name>Tanaka Akira</name>
<email>akr@fsij.org</email>
</author>
<published>2019-07-14T08:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=05aac90a1bcfeb180f5e78ea8b00a4d1b04d5eed'/>
<id>05aac90a1bcfeb180f5e78ea8b00a4d1b04d5eed</id>
<content type='text'>
Use URI.open instead.

Thanks for the patch by jeremyevans0 (Jeremy Evans) [Misc #15893].
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use URI.open instead.

Thanks for the patch by jeremyevans0 (Jeremy Evans) [Misc #15893].
</pre>
</div>
</content>
</entry>
<entry>
<title>open-uri: Regenerate server certificates for tests</title>
<updated>2019-05-27T03:58:08+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2019-05-27T03:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=43730256e800dd8e0c5cc482e9861868590ae037'/>
<id>43730256e800dd8e0c5cc482e9861868590ae037</id>
<content type='text'>
OpenSSL 1.1.1 requires 2048 bits or more.  This change will fix:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenSSL 1.1.1 requires 2048 bits or more.  This change will fix:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri
</pre>
</div>
</content>
</entry>
<entry>
<title>open-uri defines URI.open defined as an alias.</title>
<updated>2017-12-21T14:15:04+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-12-21T14:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bf287424fd00c0304c836525bb52d89fc1f4a84a'/>
<id>bf287424fd00c0304c836525bb52d89fc1f4a84a</id>
<content type='text'>
open-uri's Kernel.open will be deprecated in future.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
open-uri's Kernel.open will be deprecated in future.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/open-uri.rb: accept :encoding option as well as encoding in mode string.</title>
<updated>2017-10-21T06:22:53+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-10-21T06:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a2831955b26a07241c8c45ab2affdbafd4a36db2'/>
<id>a2831955b26a07241c8c45ab2affdbafd4a36db2</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>revert r57323</title>
<updated>2017-01-14T09:38:56+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-01-14T09:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3408e9e3c30115e16fb482ac29f147fb64953ebd'/>
<id>3408e9e3c30115e16fb482ac29f147fb64953ebd</id>
<content type='text'>
StringIO.new makes the buffer IO.default_external, while
StringIO.new("".dup) makes source encoding which is defaulted to
UTF-8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StringIO.new makes the buffer IO.default_external, while
StringIO.new("".dup) makes source encoding which is defaulted to
UTF-8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>StringIO.new makes a RW buffer</title>
<updated>2017-01-14T02:06:22+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2017-01-14T02:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c8a4b57254791e97ba7c082624f47252b71e5f9d'/>
<id>c8a4b57254791e97ba7c082624f47252b71e5f9d</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>open-uri: don't use OpenSSL::TestUtils from open-uri tests</title>
<updated>2016-11-29T15:48:46+00:00</updated>
<author>
<name>rhe</name>
<email>rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-11-29T15:48:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0cc0080a49bc59cbe7dee7f53c337935fe169995'/>
<id>0cc0080a49bc59cbe7dee7f53c337935fe169995</id>
<content type='text'>
Follow net/http. Define own test DH parameters and use.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow net/http. Define own test DH parameters and use.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* remove trailing spaces.</title>
<updated>2016-06-07T12:29:37+00:00</updated>
<author>
<name>svn</name>
<email>svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-06-07T12:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3cb56e8e3acde67f2ace0102e5a1be9d4610fa93'/>
<id>3cb56e8e3acde67f2ace0102e5a1be9d4610fa93</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>open-uri: regenerate server certificates used in tests</title>
<updated>2016-06-07T12:29:36+00:00</updated>
<author>
<name>rhe</name>
<email>rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-06-07T12:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=06552d56d1551ef15ca52a0973af0db5ea7175ff'/>
<id>06552d56d1551ef15ca52a0973af0db5ea7175ff</id>
<content type='text'>
* test/open-uri/test_ssl.rb: Regenerate test certificates. The test CA
  certificate was incorrectly generated. A CA certificate must have the
  basic constraints extension with cA bit set to TRUE. OpenSSL &lt;= 1.0.2
  allowed the error when the certificate is in the trusted store but
  OpenSSL 1.1.0 no longer does.
  [ruby-core:75225] [Feature #12324]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/open-uri/test_ssl.rb: Regenerate test certificates. The test CA
  certificate was incorrectly generated. A CA certificate must have the
  basic constraints extension with cA bit set to TRUE. OpenSSL &lt;= 1.0.2
  allowed the error when the certificate is in the trusted store but
  OpenSSL 1.1.0 no longer does.
  [ruby-core:75225] [Feature #12324]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
