<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/webrick/httpservlet, branch master</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Move webrick library into internal test toolchain</title>
<updated>2020-12-10T09:06:25+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-11-02T04:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5dc786bf86bb6e0da2639f88659598ec8b9db30d'/>
<id>5dc786bf86bb6e0da2639f88659598ec8b9db30d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use filesystem encoding for file path only</title>
<updated>2020-06-22T08:37:37+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-22T08:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3238641750c1f6d9e6be5d74fadc53e512638fe2'/>
<id>3238641750c1f6d9e6be5d74fadc53e512638fe2</id>
<content type='text'>
`path_info` contains filesystem encoding and binary.
Example is `"/webrick.cgi/%A5%DB%A4%B2/%A4%DB%A4%B2"` in `TestWEBrickCGI#test_cgi`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`path_info` contains filesystem encoding and binary.
Example is `"/webrick.cgi/%A5%DB%A4%B2/%A4%DB%A4%B2"` in `TestWEBrickCGI#test_cgi`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `ERROR ArgumentError: invalid byte sequence in UTF-8`</title>
<updated>2020-06-19T14:06:38+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-19T14:06:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=32e2440a66366c712808e4bd03d9978861643a9e'/>
<id>32e2440a66366c712808e4bd03d9978861643a9e</id>
<content type='text'>
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3012894
```
/tmp/ruby/v3/src/trunk-test/tool/lib/minitest/unit.rb:199:in `assert': webrick log start: (MiniTest::Assertion)
  [2020-06-19 23:01:59] ERROR ArgumentError: invalid byte sequence in UTF-8
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `scan'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `set_filename'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:310:in `exec_handler'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:245:in `do_GET'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/abstract.rb:105:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:241:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:140:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:96:in `run'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/server.rb:307:in `block in start_thread'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
http://ci.rvm.jp/results/trunk-test@ruby-sky1/3012894
```
/tmp/ruby/v3/src/trunk-test/tool/lib/minitest/unit.rb:199:in `assert': webrick log start: (MiniTest::Assertion)
  [2020-06-19 23:01:59] ERROR ArgumentError: invalid byte sequence in UTF-8
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `scan'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:336:in `set_filename'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:310:in `exec_handler'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:245:in `do_GET'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/abstract.rb:105:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpservlet/filehandler.rb:241:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:140:in `service'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/httpserver.rb:96:in `run'
  	/tmp/ruby/v3/src/trunk-test/lib/webrick/server.rb:307:in `block in start_thread'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Use filesystem encoding as FileHandler's encoding</title>
<updated>2020-06-19T13:56:29+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-19T13:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=97c1782db634ab0344fbc829477897d5de034475'/>
<id>97c1782db634ab0344fbc829477897d5de034475</id>
<content type='text'>
instead of `@root.encoding`.
And fallback to ASCII-8BIT when filesystem encoding is US-ASCII.

When `@root.encoding` is not compatible filesystem encoding,
`Encoding::CompatibilityError` raised at `webrick/httpservlet/filehandler.rb:341`.
So `DocumentRoot` must be compatible with filesystem encoding.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
instead of `@root.encoding`.
And fallback to ASCII-8BIT when filesystem encoding is US-ASCII.

When `@root.encoding` is not compatible filesystem encoding,
`Encoding::CompatibilityError` raised at `webrick/httpservlet/filehandler.rb:341`.
So `DocumentRoot` must be compatible with filesystem encoding.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not change local_path encoding in WEBrick::HTTPServlet::DefaultFileHandler</title>
<updated>2020-06-19T13:08:19+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-19T13:08:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=78d4eace02c3c03b65d775a3bb7537f2a6e8c6e7'/>
<id>78d4eace02c3c03b65d775a3bb7537f2a6e8c6e7</id>
<content type='text'>
This reverts 750203c514e0e9a49f7d53fb54084e6844fca42a and 93e6fa1d319d19ce7fba37e4b9924862447b9f38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts 750203c514e0e9a49f7d53fb54084e6844fca42a and 93e6fa1d319d19ce7fba37e4b9924862447b9f38
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix failure on mswin CI</title>
<updated>2020-06-19T11:13:22+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-19T11:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6fe1919486111bcdd5ef41fea15b0e82f7f50d82'/>
<id>6fe1919486111bcdd5ef41fea15b0e82f7f50d82</id>
<content type='text'>
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200619T054159Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200619-14304-utgij/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-19 16:28:42] ERROR `/あ.txt' not found.

webrick log end
Filesystem encoding is Windows-31J.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
---
&lt;[]&gt; expected but was
&lt;["[2020-06-19 16:28:42] ERROR `/\xE3\x81\x82.txt' not found.\n"]&gt;.
```

`prevent_directory_traversal` treats `path_info` as filesystem encoding.
So path_info should be filesystem encoding in request URL.

On some environments, fallback to ASCII-8BIT when EncodingError.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200619T054159Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200619-14304-utgij/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-19 16:28:42] ERROR `/あ.txt' not found.

webrick log end
Filesystem encoding is Windows-31J.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
---
&lt;[]&gt; expected but was
&lt;["[2020-06-19 16:28:42] ERROR `/\xE3\x81\x82.txt' not found.\n"]&gt;.
```

`prevent_directory_traversal` treats `path_info` as filesystem encoding.
So path_info should be filesystem encoding in request URL.

On some environments, fallback to ASCII-8BIT when EncodingError.
</pre>
</div>
</content>
</entry>
<entry>
<title>Hide error location from error message</title>
<updated>2020-06-19T11:13:22+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-19T11:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=daa9dcd57ecb84e108d2390a361790f29ed415e7'/>
<id>daa9dcd57ecb84e108d2390a361790f29ed415e7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/webrick/httpservlet/filehandler.rb: always handle a path as UTF-8</title>
<updated>2020-06-18T14:43:48+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2020-06-18T14:42:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=750203c514e0e9a49f7d53fb54084e6844fca42a'/>
<id>750203c514e0e9a49f7d53fb54084e6844fca42a</id>
<content type='text'>
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200618T113134Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200618-84004-1t0dh8f/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-18 22:18:07] ERROR `/??.txt' not found.

webrick log end
Filesystem encoding is Windows-31J.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200618T113134Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200618-84004-1t0dh8f/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-18 22:18:07] ERROR `/??.txt' not found.

webrick log end
Filesystem encoding is Windows-31J.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Use filesystem encoding in do_GET of filehandler</title>
<updated>2020-06-15T02:25:33+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-06-15T01:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=93e6fa1d319d19ce7fba37e4b9924862447b9f38'/>
<id>93e6fa1d319d19ce7fba37e4b9924862447b9f38</id>
<content type='text'>
Try to fix 404 error on mswinci.

https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200614T225859Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200615-24932-11ykstf/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-15 09:48:29] ERROR `/あ.txt' not found.

webrick log end.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
---
&lt;[]&gt; expected but was
&lt;["[2020-06-15 09:48:29] ERROR `/\xE3\x81\x82.txt' not found.\n"]&gt;.
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Try to fix 404 error on mswinci.

https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20200614T225859Z.fail.html.gz
```
  1) Failure:
WEBrick::TestFileHandler#test_cjk_in_path [D:/tmp/mswin-build20200615-24932-11ykstf/ruby/test/webrick/utils.rb:72]:
exceptions on 2 threads:
webrick log start:
  [2020-06-15 09:48:29] ERROR `/あ.txt' not found.

webrick log end.
&lt;"200"&gt; expected but was
&lt;"404"&gt;.
---
&lt;[]&gt; expected but was
&lt;["[2020-06-15 09:48:29] ERROR `/\xE3\x81\x82.txt' not found.\n"]&gt;.
```
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/webrick] Fix httpd error in CJK directory</title>
<updated>2020-06-11T04:38:32+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-04-03T08:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e698bf1a7f06452c9509f33e865cc9797dde15b9'/>
<id>e698bf1a7f06452c9509f33e865cc9797dde15b9</id>
<content type='text'>
[Bug #16753]

https://github.com/ruby/webrick/commit/83cf440858
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #16753]

https://github.com/ruby/webrick/commit/83cf440858
</pre>
</div>
</content>
</entry>
</feed>
