1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib
Tanaka Akira 8f7884761e The default charset of text/* media type is UTF-8.
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:

> When no explicit charset parameter is provided by the sender, media
> subtypes of the "text" type are defined to have a default charset
> 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
2019-07-15 09:36:52 +09:00
..
bundler Revert to change for filelist of bundler gemspec. 2019-06-09 12:44:23 +09:00
cgi Use delete_prefix instead of sub(/\Afixed-pattern/, '') 2018-12-04 08:22:10 +00:00
csv [ruby/csv] Fix a bug that strip: true removes newlines 2019-07-14 23:07:31 +09:00
drb change default value of load_limit (ignore load_limit) 2019-07-13 07:22:55 +09:00
e2mmap Promote Exception2MessageMapper to Default gems. 2018-07-25 12:26:41 +00:00
fileutils Bump version to 1.2.0. 2019-06-25 15:56:20 +09:00
forwardable Disable tailcall optimization [Bug #15303] 2018-12-12 05:46:13 +00:00
irb Use #to_a for Readline::HISTORY directly 2019-07-15 08:33:07 +09:00
matrix [ruby/matrix] Add Matrix::VERSION constant 2019-07-15 00:32:00 +09:00
net Fix documentation for Net::SMTPServerBusy 2019-06-27 16:57:19 -07:00
optparse Allow --enable/--disable options to take an argument 2019-05-15 17:31:11 +09:00
racc Removed useless freezes from gemspec files 2019-07-13 07:25:54 +09:00
rdoc [ruby/rdoc] Bump version to 6.1.1 2019-07-15 00:11:07 +09:00
reline Version 0.0.1 2019-07-15 00:36:59 +09:00
rexml [DOC] Fix close tags [ci skip] 2019-01-04 09:10:10 +00:00
rinda lib/*: Prefer require_relative over require. 2018-11-02 17:52:33 +00:00
rss Upgrade RSS to 0.2.8 2019-01-25 06:35:04 +00:00
rubygems Fix broken gem unpack 2019-06-08 18:44:18 +09:00
shell Prefer block_given? to iterator? 2019-01-18 09:52:50 +00:00
thwait Add same comment to thwait.gemspec like other gemspec at r64145 2018-07-31 15:20:55 +00:00
tracer Try to load version file of github repository at first. 2018-07-31 12:56:17 +00:00
unicode_normalize update to Unicode Version 12.1.0 (beta) 2019-04-05 00:58:51 +00:00
uri lib/*: Prefer require_relative over require. 2018-11-02 17:52:33 +00:00
webrick WEBrick::HTTPResponse create tempfile if required. 2019-07-11 09:18:41 +09:00
yaml
.document lib/.document: add csv 2018-07-01 08:12:13 +00:00
abbrev.rb
base64.rb
benchmark.rb Work on Benchmark::Tms documentation [ci skip] 2018-09-15 12:45:46 +00:00
bundler.rb Merge bundler master from upstream. 2019-06-09 12:44:10 +09:00
cgi.rb
cmath.gemspec Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
cmath.rb Add uplevel keyword to Kernel#warn and use it 2017-12-12 11:56:25 +00:00
csv.rb [ruby/csv] add options doc :quote_empty (#89) 2019-07-14 23:07:31 +09:00
debug.rb
delegate.rb delegate.rb: markup method names 2019-06-02 00:34:02 +09:00
drb.rb
e2mmap.gemspec Removed redundant empty line. 2018-11-28 00:48:21 +00:00
e2mmap.rb
English.rb
erb.rb erb.rb: prohibit marshaling [EXPERIMENTAL] 2019-03-28 03:46:48 +00:00
fileutils.rb Require version file relatively 2019-06-25 15:56:20 +09:00
find.rb Use start_with?(quoted) instead of [0] == char literal 2019-05-08 11:16:23 +09:00
forwardable.rb [DOC] Refactors documentation for Forwardable 2019-01-20 04:38:52 +00:00
getoptlong.rb
ipaddr.gemspec Import ipaddr 1.2.2 2018-12-18 05:09:08 +00:00
ipaddr.rb Import ipaddr 1.2.2 2018-12-18 05:09:08 +00:00
irb.rb Check wether prompt_i is nil 2019-07-15 02:58:28 +09:00
logger.gemspec default gems: add missing comment in gemspec 2018-10-12 19:58:11 +00:00
logger.rb Bump version to 1.3.0 same as the latest version of rubygems.org. 2018-12-12 09:40:06 +00:00
matrix.rb [ruby/matrix] Add Matrix::VERSION constant 2019-07-15 00:32:00 +09:00
mkmf.rb Suppress paranoid warnings for external/3rd-party libraries 2019-05-23 17:36:26 +09:00
monitor.rb handle_interrupt to defend monitor state [Bug #15992] 2019-07-10 18:13:38 +09:00
mutex_m.gemspec Try to load version file of github repository at first. 2018-07-31 12:56:17 +00:00
mutex_m.rb lib/mutex_m.rb: fix example code in documentation 2018-10-21 14:02:00 +00:00
observer.rb
open-uri.rb The default charset of text/* media type is UTF-8. 2019-07-15 09:36:52 +09:00
open3.rb open3.rb don't use keyword splat (**). 2018-12-12 06:48:46 +00:00
optionparser.rb
optparse.rb Fix default argument values for OptParse::Switch#summarize 2019-07-07 13:49:47 -07:00
ostruct.gemspec Promote OpenStruct to default gems. 2018-06-07 10:13:00 +00:00
ostruct.rb Removed old names of internal methods 2019-05-10 14:13:17 +09:00
pp.rb Introduce pattern matching [EXPERIMENTAL] 2019-04-17 06:48:03 +00:00
prettyprint.rb
prime.gemspec default gems: add missing comment in gemspec 2018-10-12 19:58:11 +00:00
prime.rb proc.c: proc without block 2019-01-10 08:19:14 +00:00
pstore.rb
racc.rb Backport racc-1.4.15 from upstream. 2019-06-19 18:17:25 +09:00
rdoc.rb Merge rdoc-6.1.0.beta1. 2018-08-27 01:30:18 +00:00
readline.rb Add Reline as a fallback library for Readline 2019-04-30 11:44:20 +09:00
reline.rb Add class Reline::History and test. 2019-07-15 00:17:59 +09:00
resolv-replace.rb
resolv.rb Make Resolv::DNS#each_name accept Resolv::IPv{4,6} arguments 2019-06-08 20:31:12 -07:00
rss.rb Upgrade RSS to 0.2.8 2019-01-25 06:35:04 +00:00
rubygems.rb Revert "Stop circular require warning" 2019-06-06 16:49:40 +09:00
scanf.gemspec Removed needless date attribute from gemspec of default gems. 2018-08-07 12:02:10 +00:00
scanf.rb Fix IO#scanf on pipes on Windows 2019-06-25 15:56:20 +09:00
securerandom.rb fix visibility of SecureRandom.gen_random 2019-05-14 11:44:20 +09:00
set.rb raise FrozenError instead of RuntimeError 2019-01-20 04:44:25 +00:00
shell.rb Prefer block_given? to iterator? 2019-01-18 09:52:50 +00:00
shellwords.rb
singleton.rb [DOC] Singleton.instance [ci skip] 2019-06-28 14:38:43 +09:00
sync.gemspec Try to load version file of github repository at first. 2018-07-31 12:56:17 +00:00
sync.rb Bump library version same as released version of rubygems.org 2018-12-12 07:57:42 +00:00
tempfile.rb Try to avoid not delagated error 2019-07-03 19:29:12 +09:00
thwait.rb Removed needless extension for require. 2018-06-08 08:46:52 +00:00
time.rb Fix mday overflow 2019-01-06 04:36:56 +00:00
timeout.rb Add some documentation to Timeout#timeout about possible issues 2019-06-04 19:19:37 -07:00
tmpdir.rb Constified unusable chars 2019-06-21 23:04:34 +09:00
tracer.rb Replace outdated blockless proc call with block argument syntax 2019-02-07 17:29:16 +00:00
tsort.rb
un.rb Use delete_prefix instead of sub(/\Afixed-pattern/, '') 2018-12-04 08:22:10 +00:00
uri.rb Improve docs for URI library 2018-04-21 20:04:05 +00:00
weakref.rb
webrick.rb
yaml.rb Clarify the documentation of the YAML module [Misc #14567] 2018-03-02 12:56:37 +00:00