middlewares/content-length

Middleware to inject the Content-Length header into the response based on the body size

Package info

github.com/middlewares/content-length

pkg:composer/middlewares/content-length

Statistics

Installs: 13 111

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

v2.1.0 2025-03-22 19:39 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT bdcd45892ae65d1cb2d9c5232983c72a4df16f55

httpservermiddlewarepsr-7psr-15

This package is auto-updated.

Last update: 2026-06-26 17:31:56 UTC


README

👁 Latest Version on Packagist
👁 Software License
👁 Testing
👁 Total Downloads

Middleware to inject the Content-Length header into the response based on the body size.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/content-length.

composer require middlewares/content-length

Example

$dispatcher = new Dispatcher([
 new Middlewares\ContentLength()
]);

$response = $dispatcher->dispatch(new ServerRequest());

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.