middlewares / content-length
中间件,根据响应体大小注入 Content-Length 头部
v2.0.0
2020-12-02 00:05 UTC
Requires
- php: ^7.2 || ^8.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- laminas/laminas-diactoros: ^2.3
- middlewares/utils: ^3.0
- oscarotero/php-cs-fixer-config: ^1.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^8|^9
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-08-29 03:31:34 UTC
README
中间件,根据响应体大小注入 Content-Length 头部。
要求
- PHP >= 7.2
- 一个 PSR-7 http 库
- 一个 PSR-15 中间件分发器
安装
此软件包可以通过 Composer 以 middlewares/content-length 的形式安装和自动加载。
composer require middlewares/content-length
示例
$dispatcher = new Dispatcher([ new Middlewares\ContentLength() ]); $response = $dispatcher->dispatch(new ServerRequest());
有关最近更改的更多信息,请参阅 CHANGELOG,有关贡献详情,请参阅 CONTRIBUTING。
MIT 许可证 (MIT)。有关更多信息,请参阅 LICENSE。