ruby-changes:63202
From: nagachika <ko1@a...>
Date: Tue, 29 Sep 2020 22:46:26 +0900 (JST)
Subject: [ruby-changes:63202] 828c34e58b (ruby_2_7): merge revision(s) d23d2f3f6fbb5d787b0dd80675c489a692be23e2:
https://git.ruby-lang.org/ruby.git/commit/?id=828c34e58b From 828c34e58b63d64558ec0f2d1d7ae401c5e6b21f Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Tue, 29 Sep 2020 22:46:14 +0900 Subject: merge revision(s) d23d2f3f6fbb5d787b0dd80675c489a692be23e2: [ruby/webrick] Make it more strict to interpret some headers Some regexps were too tolerant. https://github.com/ruby/webrick/commit/8946bb38b4 diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index 87dc879..6af0cee 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -226,9 +226,9 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httprequest.rb#L226 raise HTTPStatus::BadRequest, "bad URI `#{@unparsed_uri}'." end - if /close/io =~ self["connection"] + if /\Aclose\z/io =~ self["connection"] @keep_alive = false - elsif /keep-alive/io =~ self["connection"] + elsif /\Akeep-alive\z/io =~ self["connection"] @keep_alive = true elsif @http_version < "1.1" @keep_alive = false @@ -503,7 +503,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httprequest.rb#L503 return unless socket if tc = self['transfer-encoding'] case tc - when /chunked/io then read_chunked(socket, block) + when /\Achunked\z/io then read_chunked(socket, block) else raise HTTPStatus::NotImplemented, "Transfer-Encoding: #{tc}." end elsif self['content-length'] || @remaining_size diff --git a/version.h b/version.h index 7f0007e..d578e36 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L2 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 130 +#define RUBY_PATCHLEVEL 131 #define RUBY_RELEASE_YEAR 2020 #define RUBY_RELEASE_MONTH 9 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/