зеркало из https://github.com/github/ruby.git
[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:
Родитель
8d04260acd
Коммит
2fbd8dca18
|
@ -1,4 +1,4 @@
|
|||
# frozen_string_literal: false
|
||||
# frozen_string_literal: true
|
||||
#
|
||||
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
|
||||
#
|
||||
|
@ -316,7 +316,7 @@ class Net::HTTPGenericRequest
|
|||
boundary ||= SecureRandom.urlsafe_base64(40)
|
||||
chunked_p = chunked?
|
||||
|
||||
buf = ''
|
||||
buf = String.new
|
||||
params.each do |key, value, h={}|
|
||||
key = quote_string(key, charset)
|
||||
filename =
|
||||
|
@ -401,7 +401,7 @@ class Net::HTTPGenericRequest
|
|||
if /[\r\n]/ =~ reqline
|
||||
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
||||
end
|
||||
buf = ""
|
||||
buf = String.new
|
||||
buf << reqline << "\r\n"
|
||||
each_capitalized do |k,v|
|
||||
buf << "#{k}: #{v}\r\n"
|
||||
|
|
Загрузка…
Ссылка в новой задаче