Feature #16773 » patch1.diff
lib/net/http/generic_request.rb | ||
---|---|---|
# frozen_string_literal: false
|
||
# frozen_string_literal: true
|
||
# HTTPGenericRequest is the parent of the Net::HTTPRequest class.
|
||
# Do not use this directly; use a subclass of Net::HTTPRequest.
|
||
#
|
||
... | ... | |
boundary ||= SecureRandom.urlsafe_base64(40)
|
||
chunked_p = chunked?
|
||
buf = ''
|
||
buf = ''.dup
|
||
params.each do |key, value, h={}|
|
||
key = quote_string(key, charset)
|
||
filename =
|
||
... | ... | |
if /[\r\n]/ =~ reqline
|
||
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
||
end
|
||
buf = ""
|
||
buf = ''.dup
|
||
buf << reqline << "\r\n"
|
||
each_capitalized do |k,v|
|
||
buf << "#{k}: #{v}\r\n"
|
lib/net/http/header.rb | ||
---|---|---|
# frozen_string_literal: false
|
||
# frozen_string_literal: true
|
||
# The HTTPHeader module defines methods for reading and writing
|
||
# HTTP headers.
|
||
#
|
lib/net/http/response.rb | ||
---|---|---|
# frozen_string_literal: false
|
||
# frozen_string_literal: true
|
||
# HTTP response class.
|
||
#
|
||
# This class wraps together the response header and the response body (the
|
||
... | ... | |
if block
|
||
Net::ReadAdapter.new(block)
|
||
else
|
||
dest || ''
|
||
dest || ''.dup
|
||
end
|
||
end
|
||