Same as 6.5.0 with one change:
`Config::max_connections_per_host()` is now properly named `Config::set_max_connections_per_host()`.
### Added
- `Config` has been stabilized and is now available by default!
- `wasm_client` support for `Config` (only timeouts).
- `Config::max_connections_per_host` (Supported on `h1_client` and `curl_client`.)
### Deprecated
- `H1Client::with_max_connections()` was been superseded by `Config::max_connections_per_host`.
- `Config` has been stabilized and is now available by default!
- `wasm_client` support for `Config` (only timeouts).
- `Config::max_connections_per_host` (Supported on `h1_client` and `curl_client`.)
- `H1Client::with_max_connections()` was been superseded by `Config::max_connections_per_host`.
This adds an `unstable-config` feature, with a new `Config` struct, which can be used to configure any `HttpClient` which implements support for it.
Currently it supports two features - the most important and most generally supported:
- `timeout` (`Duration`)
- `no_delay` (`bool`)
Implementations are provided for async-h1, isahc, and hyper (partial, no `no_delay` support due to the tls connector).
No serious attempt has been made to add this to the wasm client at this point, since I don't understand well how to even build the wasm client or if it even works anymore with the state of rust wasm web build tools.
### Fixed
- Multiple headers of the same name are now present with any client backend and not just `h1_client`.
- Connection when multiple IPs are present for a hostname not function with the `h1_client` backend.
When trying to connect to multiple IPs for a hostname (e.g. IPv4 and
IPv6) we ought to try all prior returning error.
Running a wget to the running mockito server has this output:
,----
| $ wget -O- http://localhost:1234/report
| --2021-03-08 16:13:12-- http://localhost:1234/report
| Resolving localhost (localhost)... ::1, 127.0.0.1
| Connecting to localhost (localhost)|::1|:1234... failed: Connection refused.
| Connecting to localhost (localhost)|127.0.0.1|:1234... connected.
| HTTP request sent, awaiting response... 200 OK
`----
Fixes: #79.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
### Fixed
- `h1_client` connection pools now properly check if connections are still alive before recycling them.
- Like, actually properly this time.
- There is a test now to ensure closed connections don't cause errors.
Checks `poll_read`'s status directly, so that we can ensure
a socket read actually happens, and then immediately continue
if we get `Poll::Pending`.
Related to https://github.com/http-rs/http-client/issues/75
### Fixed
- Allow http-client to build & run properly when `h1_client` is enabled without either tls option.
- Prefer `rustls` if both tls features are enabled.
### Internal
- More exhaustive CI for feature combinations.
* When both "native-tls" and "rustls" features are disabled, disable https.
* When both "native-tls" and "rustls" features are enabled, prefer "rustls".
This is the same behavior as http-client 6.2.0.
Ideally, it would be nice if this behavior could be controlled by
environment variables or some other way.
This also adds a CI task to check all feature combinations work properly.
### Added
- Connection pooling (HTTP/1.1 `keep-alive`) for `h1_client` (default).
- `native-tls` (default) and `rustls` feature flags.
- Only works with `h1_client`.
- Isahc metrics as a response extension for `curl_client`.
### Fixed
- `Box<dyn HttpClient>` no longer infinitely recurses.
- `curl_client` now always correctly reads the response body.
- `hyper_client` should now build correctly.
- `WasmClient` fetch from worker scope now works correctly.
### Internal
- Improved CI