From d93dcd2840fa60e9e0bc19d00621e8a911f10abe Mon Sep 17 00:00:00 2001 From: marcandre Date: Wed, 19 Sep 2018 17:12:04 +0000 Subject: 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 --- lib/net/http/header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') 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 -- cgit v1.2.3