We now use the connection_pool gem instead of per-thread connection stores. This improves reuse of connections across threads and reduces the possibility of using all the file descriptors in the process. This removes the Thread argument for #shutdown (which now shuts down all connections and may be dangerous, needs verification). This removes #shutdown_in_all_threads as we no longer have per-thread storage. This adds the Net::HTTP::Persistent::Connection class to manage connection metadata. This makes Net::HTTP::Persistent's tests a little easier to read as you no longer have to worry about the per-thread data stores.
- The current way is broken as it chokes while unescaping characters that are not allowed non-escaped in the userinfo URI component, such as "@" if the username is an email address. - Being a nice Ruby citizen means not mutating the `@proxy_uri` which is an object that might have come from the user. References: - ac161c7 - b9031bf
Ruby 2.0 added keep_alive_timeout, which behaves the same way as idle_timeout, except that the default timeout is 5 seconds rather than 2 seconds. Set keep_alive_timeout using idle_timeout to prevent the connection from getting closed before idle_timeout due to delays between requests.