diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2021-03-18 22:05:06 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-28 11:01:41 +0900 |
commit | 1229ad0528d28e38f031f1301e1c5331cfd03a90 (patch) | |
tree | 1d251bdc26bd875e7b6cfd8cbf254d74c3291c20 /lib/net/http | |
parent | 842f00f45212019a3b07f8d8dac269d35beb9efa (diff) |
[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
Diffstat (limited to 'lib/net/http')
-rw-r--r-- | lib/net/http/generic_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb index 003f59d0ac..0b81243064 100644 --- a/lib/net/http/generic_request.rb +++ b/lib/net/http/generic_request.rb @@ -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 |