net-http
net-http copied to clipboard
Net::HTTP provides a rich library which can be used to build HTTP user-agents.
The method was getting large, and in preparation for #141, I thought it would be easier to break up the method into several other methods.
The [license file](https://github.com/ruby/net-http/blob/master/LICENSE.txt) contains BSD-2-Clause license, while [gemspec](https://github.com/ruby/net-http/blob/042faf74e77d786ff60dff81555f6ec4f21e77a9/net-http.gemspec#L25) specifies Ruby OR BSD-2-Clause. Assuming the later is correct, how to capture this information? Is COPYING file similar to Ruby the way...
Dry, at a small expense
Issue: #143 - Add new configuration to preserve headers case in Net::HTTP class - Add new configuration to preserve headers case in GenericRequest class
This PR fixes uplevel of `supply_default_content_type`. # Problem Currently `supply_default_content_type` specifies an incorrect `uplevel` to `warn` method. For example: ```ruby require 'net/http' url = URI.parse('http://www.example.com/index.html') req = Net::HTTP::Post.new(url.path) res =...
Over the years, we've received many bug bounty reports relating to Server side request forgery (SSRF) attacks. In a nutshell, these attacks use short-lived DNS entries to direct Web hooks...
I observe that Net:HTTP does not honor parameters set in OpenSSL::Config::DEFAULT_CONFIG_FILE (i.e.: /usr/lib/ssl/openssl.cnf). For example, if you set the following parameter in /usr/lib/ssl/openssl.cnf (symlinked to /etc/ssl/openssl.cnf): ``` [system_default_sect] Options =...
## Context I am consuming a API that have case sensitive header keys. It is not common to see an case-sensitive header and also is off the [specification](https://developer.mozilla.org/en-US/docs/Glossary/HTTP_header). But sometimes...
Response to interrupted request returned for next one, after timeout interrupts reading the socket
In `ruby-3.2.2/lib/ruby/3.2.0/net/http.rb` line 1855, a request is written to the socket; on line 1862 the response is read from the socket. However, if a `Timeout::Error` occurs before the response arrives,...