diff options
Diffstat (limited to 'lib/net/http/header.rb')
-rw-r--r-- | lib/net/http/header.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 7eee15e361..50580658d0 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -72,7 +72,7 @@ module Net::HTTPHeader @header[key.downcase] = ary else val = val.to_s - if /[\r\n]/ =~ val + if /[\r\n]/n =~ val.b raise ArgumentError, 'header field value cannnot include CR/LF' end @header[key.downcase] = [val] @@ -85,7 +85,7 @@ module Net::HTTPHeader val.each{|x| append_field_value(ary, x)} else val = val.to_s - if /[\r\n]/ =~ val + if /[\r\n]/n =~ val.b raise ArgumentError, 'header field value cannnot include CR/LF' end ary.push val |