diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-19 17:12:04 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-19 17:12:04 +0000 |
commit | d93dcd2840fa60e9e0bc19d00621e8a911f10abe (patch) | |
tree | ef0b53f0259fc186b1457eff3bc32505fc9e0e3e /lib/net | |
parent | 4baf0757e4f210090bd7393990253e76ecdd6782 (diff) | |
download | ruby-d93dcd2840fa60e9e0bc19d00621e8a911f10abe.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.rb | 2 |
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 |