mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
parent
eedcd696a5
commit
bc0a7a641b
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ module Net::HTTPHeader
|
||||||
raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..."
|
raise ArgumentError, "too long (#{key.bytesize} bytes) header: #{key[0, 30].inspect}..."
|
||||||
end
|
end
|
||||||
if value.to_s.bytesize > MAX_FIELD_LENGTH
|
if value.to_s.bytesize > MAX_FIELD_LENGTH
|
||||||
raise ArgumentError, "header #{key} has too long field vallue: #{value.bytesize}"
|
raise ArgumentError, "header #{key} has too long field value: #{value.bytesize}"
|
||||||
end
|
end
|
||||||
if value.count("\r\n") > 0
|
if value.count("\r\n") > 0
|
||||||
raise ArgumentError, "header #{key} has field value #{value.inspect}, this cannot include CR/LF"
|
raise ArgumentError, "header #{key} has field value #{value.inspect}, this cannot include CR/LF"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue