aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-19 17:12:04 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-19 17:12:04 +0000
commit780633412315c2f048b67beb721363c77457f3a3 (patch)
treeef0b53f0259fc186b1457eff3bc32505fc9e0e3e /lib/net
parent1ede23f82fea43f49ca4297ae47339e97c1b5c2f (diff)
downloadruby-780633412315c2f048b67beb721363c77457f3a3.tar.gz
net/http: Improve net/http header error message.
Patch by Matt Larraz. [Fix GH-1849]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http/header.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb
index 96d898c89f..4fa6d8a772 100644
--- a/lib/net/http/header.rb
+++ b/lib/net/http/header.rb
@@ -20,7 +20,7 @@ module Net::HTTPHeader
else
value = value.strip # raise error for invalid byte sequences
if value.count("\r\n") > 0
- raise ArgumentError, 'header field value cannot include CR/LF'
+ raise ArgumentError, "header #{key} has field value #{value.inspect}, this cannot include CR/LF"
end
@header[key.downcase] = [value]
end