2.0.0 RC3
Pre-release
Pre-release
- Updated to
league/uri@^6
. Consequentially, PHP 7.2+ is now required. - Renamed
Server
toHttpServer
. An alias ofServer
toHttpServer
was kept for backward compatibility with v1.x, but may be removed in a future version. - Added
Push
object for pushed resources.Response::getPush()
now returns an array ofPush
objects. - Restored
Client::isUnix()
method. - Added
ClientException::getClient()
that returns theClient
that caused the error. - Renamed
Trailers::awaitMessage()
toawait()
. - Added
Request::removeAttribute()
. - Back-pressure from consumption of request bodies is now used to control window sizes in HTTP/2. Window sizes are only increased in small increments instead of the entire allowable body size. This will improve memory consumption when handling large request bodies.
- Refactored HTTP/2 flood prevention to be based on a ratio between payload and non-payload bytes received, inspired by NGINX's flood prevention. Some options were removed:
- Removed
Options::getMinimumAverageFrameSize()
andwithMinimumAverageFrameSize()
. - Removed
Options::getFramesPerSecondLimit()
andwithFramesPerSecondLimit()
.
- Removed
- Removed
Options::getConnectionTimeout()
andwithConnectionTimeout()
. HTTP/1.x and HTTP/2 connection timeouts are now separate and can be set using thehttp1Timeout
(default 15 seconds) andhttp2Timeout
(default 60 seconds) options. - Added
tlsSetupTimeout
option. Default is 5 seconds. - Removed
TimeReference
andSystemTimeReference
. UseAmp\Http\formatDateHeader()
in theamphp/[email protected]
package to generate the value for an HTTP header value containing a date. - Refactored
TimeoutCache
and renamed some methods. Client timeouts are no longer updated withinClient
, ratherHttpDriver
implementations must update the client timeout. Users should be unaffected by this change unless they implemented their ownClient
orHttpDriver
. HttpDriverFactory::selectDriver()
now requires instances ofErrorHandler
,Psr\Log\LoggerInterface
, andOptions
in addition to theClient
instance.