Skip to content

Releases: amphp/http-client

4.0.0 RC2

20 Aug 21:20
4391301
Compare
Choose a tag to compare
4.0.0 RC2 Pre-release
Pre-release

This release adds support for HTTP/2 push promises.

Note: This is a pre-release, there might be breaking changes in the final stable version.

Request now has an onPush() method which defines a callback invoked if the server pushes resources to the client. The callback should accept three arguments: Request $request, Promise $promise, and CancellationTokenSource $source. $request is the request as generated by the pushing server; $promise is a promise that is resolved with the Response object containing the pushed resource; and $source allows the push to be cancelled by the callback.

Request::getPushCallable() returns the callback defined with onPush().

If no push callback is defined in a request, the client automatically refuses any pushed resources.

Application and Network Interceptors should check for a push callback and apply transformations to the request and response accordingly.

Other changes or bugfixes

  • Fixed writing HTTP/2 request bodies
  • Fixed failed requests over HTTP/2 leaving promise returned from Client::request() unresolved
  • Using pseudo headers (headers field names starting with a colon (:)) in a Request or Response object is now forbidden

4.0.0 RC1

13 Aug 23:45
v4.0.0-rc1
Compare
Choose a tag to compare
4.0.0 RC1 Pre-release
Pre-release

Note: This is a pre-release, there might be breaking changes in the final stable version.

This is the first release candidate of amphp/http-client v4. Previously this package was named amphp/artax. Development of the v3.x release series will continue in the old amphp/artax repository.

Please test this pre-release carefully and report any issues you find, so we can soon tag a stable release with support for HTTP/2.

Major Changes

  • Support for HTTP/2
  • Support for ApplicationInterceptor / NetworkInterceptor
  • Changed Request / Response to be mutable
  • Compatibility with amphp/socket v1.0.0
  • Client is now a final class instead of an interface
  • Client behavior should now be modified using interceptors and connection pool implementations

3.0.14

01 Feb 20:32
v3.0.14
Compare
Choose a tag to compare
  • Fixed timeout token leak (#157)

3.0.13

19 Dec 13:49
v3.0.13
Compare
Choose a tag to compare
  • Bumped amphp/file to ^0.2 || ^0.3.

3.0.12

23 Oct 12:39
v3.0.12
Compare
Choose a tag to compare
  • Apply timeouts correctly during connection and TLS handshakes. Previously these could hang indefinitely. See #145.

3.0.11

17 Oct 08:00
v3.0.11
Compare
Choose a tag to compare
  • Fixed issues with responses without content-length and without transfer-encoding: chunked.
  • Revert fix for v3.0.10, as this has been properly fixed in amphp/byte-stream.
  • Catch ConnectException from amphp/socket and throw SocketException instead. The exception was previously leaked, but undocumented and unexpected.

3.0.10

15 Oct 22:43
v3.0.10
Compare
Choose a tag to compare
  • Fixed issue with unknown socket on shutdown due to unpredictable __destruct() call order.

3.0.9

12 Oct 08:31
v3.0.9
Compare
Choose a tag to compare
  • Lazily parse captured TLS certificates. This improves performance and memory usage. Additionally, openssl_x509_parse currently leaks memory. This fix ensures it leaks only if explicitly requested (until the PHP bug is fixed). See https://bugs.php.net/bug.php?id=75363.
  • Small performance improvements for connections not using a proxy.

3.0.8

09 Oct 08:51
v3.0.8
Compare
Choose a tag to compare
  • Fixed null pointer access in response handling completely breaking the client.

3.0.7

09 Oct 08:35
v3.0.7
Compare
Choose a tag to compare

This is a borked release, don't use.

  • Clean references correctly, so unused bodies aren't consumed and the connection is closed.