1.1.0¶ ↑
Features¶ ↑
A function, peer_address, was added to the response object, which returns the IP (either a string or an IPAddr object) from the socket used to get the response from.
response = HTTPX.get("https://example.com") response.peer_address #=> #<IPAddr: IPv4:93.184.216.34/255.255.255.255>
error responses will also expose an IP address via peer_address as long a connection happened before the error.
Improvements¶ ↑
-
A performance regression involving the new default timeouts has been fixed, which could cause significant overhead in “multiple requests in sequence” scenarios, and was clearly visible in benchmarks.
-
this regression will still be seen in jruby due to a bug, which fix will be released in jruby 9.4.5.0.
-
HTTP/1.1 connections are now set to handle as many requests as they can by default (instead of the past default of max 200, at which point they’d be recycled).
-
tolerate the inexistence of
opensslin the installed ruby, likenet-httpdoes. -
on_connection_openedandon_connection_closedwill yield theOpenSSL::SSL::SSLSocketinstance forhttpsbacked origins (instead of always theSocketinstance).
Bugfixes¶ ↑
-
when using the
:nativeresolver (default option), a default of 1 for ndots is set, for systems which do not set one. -
replaced usage of
Float::INFINITYwithnilfor timeout defaults, as the former can’t be used in IO wait functions. -
faradayadapter timeout setup now maps to:read_timeoutand:write_timeoutoptions fromhttpx. -
fixed HTTP/1.1 connection recycling on number of max requests exhausted.
-
response.jsonwill now work when “content-type” header is set to “application/hal+json”.
Chore¶ ↑
-
when using the
:cookiesplugin, a warning message to install the idnx message will only be emitted if the cookie domain is an IDN (this message was being shown all the time since v1 release).