mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[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:
parent
842f00f452
commit
1229ad0528
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue