зеркало из https://github.com/github/ruby.git
[ruby/net-http] Fix the regexp used to clean the host
Introduced in https://github.com/ruby/ruby/commit/c1652035644 `/s` marks the regexp as encoded with Windows-31J which makes little sense. Nurse thinks the intent was to use `/m` for a multi-line regexp. https://github.com/ruby/net-http/commit/6c15342cdf
This commit is contained in:
Родитель
842f00f452
Коммит
1229ad0528
|
@ -143,7 +143,7 @@ class Net::HTTPGenericRequest
|
|||
end
|
||||
|
||||
if host = self['host']
|
||||
host.sub!(/:.*/s, ''.freeze)
|
||||
host.sub!(/:.*/m, ''.freeze)
|
||||
elsif host = @uri.host
|
||||
else
|
||||
host = addr
|
||||
|
|
Загрузка…
Ссылка в новой задаче