[ruby/net-http] turn on frozen strings for net/http/generic_request
https://github.com/ruby/net-http/commit/b92ade088d
This commit is contained in:
parent
8d04260acd
commit
2fbd8dca18
@ -1,4 +1,4 @@
|
|||||||
# frozen_string_literal: false
|
# frozen_string_literal: true
|
||||||
#
|
#
|
||||||
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
|
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
|
||||||
#
|
#
|
||||||
@ -316,7 +316,7 @@ class Net::HTTPGenericRequest
|
|||||||
boundary ||= SecureRandom.urlsafe_base64(40)
|
boundary ||= SecureRandom.urlsafe_base64(40)
|
||||||
chunked_p = chunked?
|
chunked_p = chunked?
|
||||||
|
|
||||||
buf = ''
|
buf = String.new
|
||||||
params.each do |key, value, h={}|
|
params.each do |key, value, h={}|
|
||||||
key = quote_string(key, charset)
|
key = quote_string(key, charset)
|
||||||
filename =
|
filename =
|
||||||
@ -401,7 +401,7 @@ class Net::HTTPGenericRequest
|
|||||||
if /[\r\n]/ =~ reqline
|
if /[\r\n]/ =~ reqline
|
||||||
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
||||||
end
|
end
|
||||||
buf = ""
|
buf = String.new
|
||||||
buf << reqline << "\r\n"
|
buf << reqline << "\r\n"
|
||||||
each_capitalized do |k,v|
|
each_capitalized do |k,v|
|
||||||
buf << "#{k}: #{v}\r\n"
|
buf << "#{k}: #{v}\r\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user