1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
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
..
-ext- Fixed inadvertent ID creation in rb_iv_get 2019-07-01 13:56:55 +09:00
base64
benchmark
bigdecimal
cgi Get rid of error with frozen string literal 2019-06-23 07:36:26 +09:00
coverage Introduce pattern matching [EXPERIMENTAL] 2019-04-17 06:48:03 +00:00
csv [ruby/csv] Fix a bug that strip: true removes newlines 2019-07-14 23:07:31 +09:00
date suppress marshal warnings 2019-06-04 19:00:48 +09:00
dbm
digest Restore support library for only test files that are digest and csv. 2019-07-09 21:16:49 +09:00
drb ignore test_RangeError 2019-05-04 23:32:13 +09:00
dtrace Added test for require-return hook 2019-06-30 21:21:06 +09:00
erb Suppress uninitialized instance variable warnings 2019-07-04 18:12:08 +09:00
etc
excludes Test GC.compact on MJIT again 2019-05-23 00:07:16 -07:00
fiddle
fileutils
gdbm
io
irb Clarify the Ruby version support status in IRB more 2019-06-13 00:41:00 +09:00
json Ignore warnings about ambiguous first argument with the negative integer. 2019-06-01 15:07:35 +03:00
lib Restore support library for only test files that are digest and csv. 2019-07-09 21:16:49 +09:00
logger Fix timezone issue for logger period's tests 2019-07-02 15:50:12 +01:00
matrix
misc
mkmf Suppress messages from mkmf 2019-06-20 20:51:33 +09:00
monitor Wait for the helper thread to terminate 2019-06-28 14:54:00 +09:00
net Suppress unused variable warnings 2019-06-30 11:45:37 +09:00
nkf
objspace Suppress unused variable warnings 2019-06-30 11:45:37 +09:00
open-uri The default charset of text/* media type is UTF-8. 2019-07-15 09:36:52 +09:00
openssl test/openssl/utils.rb: Extend the timeout for armv7l 2019-06-07 23:37:55 +09:00
optparse Fixed the test-case class name for zsh 2019-06-28 14:09:17 +09:00
ostruct
pathname Delegates 3 arguments for Pathname.glob. 2019-07-14 17:42:58 +09:00
psych Do not allocate a string to check if a scalar is an integer 2019-06-25 15:56:20 +09:00
racc Clean up temporary directory for racc 2019-07-02 15:02:16 +09:00
rdoc Fix links to headings 2019-07-14 17:46:16 +09:00
readline Revert 3b7862c8e8 causing various CI hangs 2019-05-29 09:05:26 +09:00
reline Remove unused method. 2019-07-15 00:33:16 +09:00
resolv Make Resolv::DNS#each_name accept Resolv::IPv{4,6} arguments 2019-06-08 20:31:12 -07:00
rexml
rinda
ripper Added assertions for Unicode escaped CHAR scanner events 2019-07-06 18:46:00 +09:00
rss
ruby Check the result of String#-@ 2019-07-14 20:56:38 +09:00
rubygems Clean up temporary expired cert file 2019-07-02 15:02:16 +09:00
scanf Use block instead of explicit close 2019-06-28 12:37:36 +09:00
sdbm
shell
socket Suppress unused variable warnings 2019-06-30 11:45:37 +09:00
stringio Define singleton method on each new objects 2019-06-28 15:22:27 +09:00
strscan
syslog
uri
webrick remove an unused variable. 2019-07-11 13:04:07 +09:00
win32ole Get rid of toplevel methods 2019-07-08 16:05:04 +09:00
yaml
zlib
runner.rb Fixed the wrong path for COVERAGE. 2019-07-02 08:00:29 +09:00
test_abbrev.rb
test_cmath.rb Call deprecated method only inside assert_warning block 2019-07-01 00:22:39 +09:00
test_delegate.rb Fix visibility of some methods when using DelegateClass 2019-05-30 18:34:45 -07:00
test_extlibs.rb
test_find.rb
test_forwardable.rb
test_history.rb Rename to Reline::History::Test. 2019-07-15 00:18:10 +09:00
test_ipaddr.rb Assert obsolete method warnings in IPAddr 2019-07-01 13:02:23 +09:00
test_mutex_m.rb
test_observer.rb
test_open3.rb Restore support library for only test files. 2019-07-09 21:04:07 +09:00
test_pp.rb Suppress void context warnings in verbose mode 2019-06-30 11:49:40 +09:00
test_prettyprint.rb
test_prime.rb Suppress method redefinition warnings 2019-06-30 11:49:41 +09:00
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb fix visibility of SecureRandom.gen_random 2019-05-14 11:44:20 +09:00
test_set.rb
test_shellwords.rb
test_singleton.rb
test_sync.rb
test_syslog.rb
test_tempfile.rb Windows simply causes an error to open invalid path 2019-05-01 17:38:45 +09:00
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb Removed unused variables 2019-06-28 23:21:37 +09:00
test_weakref.rb
test_win32api.rb