summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http/header.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb
index 4777ebf82a..8f3206d363 100644
--- a/lib/net/http/header.rb
+++ b/lib/net/http/header.rb
@@ -76,7 +76,7 @@ module Net::HTTPHeader
@header[key.downcase] = ary
else
val = val.to_s
- if /[\r\n]/.match?(val)
+ if /[\r\n]/n.match?(val.b)
raise ArgumentError, 'header field value cannnot include CR/LF'
end
@header[key.downcase] = [val]
@@ -89,7 +89,7 @@ module Net::HTTPHeader
val.each{|x| append_field_value(ary, x)}
else
val = val.to_s
- if /[\r\n]/.match?(val)
+ if /[\r\n]/n.match?(val.b)
raise ArgumentError, 'header field value cannnot include CR/LF'
end
ary.push val