# 0.12.0

## Features

### AWS Sigv4 Authentication Plugin

A new plugin, `:aws_sigv4`, is now shipped with `httpx`. It implements the [AWS Signature Version 4 request signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html), a well documented way of authenticating requests to AWS services, which has since been adopted by other cloud providers, such as Google Cloud Storage.

See how to use it here: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#sessionaws_sigv4_authentication

For convenience, there's a derivative plugin, `:aws_sdk_authentication`, which builds on top of `:aws_sigv4`, and integrates with the `aws-sdk-core` gem, maintained by AWS, to resolve the authentication credentials (p.ex. if you support ephemeral access keys).

See how to use it here: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#sessionaws_sdk_authentication

Other FAQ: https://gitlab.com/os85/httpx/-/wikis/AWS-Sigv4#faqs

### HTTP/2 support for JRuby

`jruby-openssl` doesn't support ALPN protocol negotiation, nor are there plans to implement, which limited the seamless HTTP/2 usage in `httpx`. A new connection adapter was therefore added specifically for JRuby, where ssl/tls connections will be handled using ffi-based openssl bindings, provided you bundle `ffi-compiler` and `concurrent-ruby`, and install a TLS/1.2-compatible `openssl` package.

See how to use it here: https://gitlab.com/os85/httpx/-/wikis/JRuby-Truffleruby-Other-Rubies#http2

## Improvements


### truffleruby support

`httpx` supports and tests against `truffleruby` (known to run tests since v20.3, passing all tests since v21).

### Performance

Several optimizations were introduced:

* Reduction in read/write system calls;
* more usage of `String#byteslice` in parsing (instead of string mutation);
* Avoid selection on connections with no outstanding requests;

They all contributed to a massive performance improvement, itself reflected in test runs, which need half the time they used to to complete.

### APIs

* `HTTPX::ErrorResponse#to_s` now uses the exception full message, instead of just the backtrace.

## Bugfixes

* HTTP/2 stream protocol errors do not cause the process to hang (instead, error responnses are yielded);
* Fixed body stream bugs on retries when error causing retry would happen mid-transfer;
* Fixed `:multipart` plugin body rewind on retries to start the transfer from the beginning;
* Fixed auto-load of  `:proxy` plugin when `HTTPS_PROXY` or `HTTP_PROXY` is set;
* Errno::EPIPE errors mid transfer now cause `httpx` to read from the server and get the appropriate HTTP error response;
* Make sure that all requests have an error responnse if the error happens early;
* Fixed TCP handshake Errno::INPROGRESS handling inside TLS connnections, which was causing the process to hang in a high handshake contention scenario;
* Do not call the event loop if there's nothing to listen on (the DoH resolver was being listened on even if there was nothing to be request);
* Fixed double event registry for DoH resolvers;
*
