PHPackages                             lochmueller/http-range - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. lochmueller/http-range

ActiveLibrary[HTTP &amp; Networking](/categories/http)

lochmueller/http-range
======================

Use PSR-7 messages and a PSR-15 handler/middleware to handle HTTP Range request and trigger valid partial download for streams/files. Hande multiple ranges and check different env requirements.

3.1.0(1y ago)14.0k—0%MITPHPPHP ^8.1

Since Jun 15Pushed 1y ago2 watchersCompare

[ Source](https://github.com/lochmueller/http-range)[ Packagist](https://packagist.org/packages/lochmueller/http-range)[ RSS](/packages/lochmueller-http-range/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (13)Used By (0)

lochmueller/http-range
======================

[](#lochmuellerhttp-range)

[![Latest Stable Version](https://camo.githubusercontent.com/7b60f586ed65245e4630a1061321495767700d4dbf6fd7ffec682b7c509212e8/68747470733a2f2f706f7365722e707567782e6f72672f6c6f63686d75656c6c65722f687474702d72616e67652f762f737461626c65)](https://packagist.org/packages/lochmueller/http-range)[![Total Downloads](https://camo.githubusercontent.com/10f1de6d07287d8b2519502e6943f1cfe74478b06d155f586ab1b766bdd3260f/68747470733a2f2f706f7365722e707567782e6f72672f6c6f63686d75656c6c65722f687474702d72616e67652f646f776e6c6f616473)](https://packagist.org/packages/lochmueller/http-range)[![License](https://camo.githubusercontent.com/f039e88c3b778a69071eb54fb856a799b5c9ed1b4c543d464f74fe5e9d680519/68747470733a2f2f706f7365722e707567782e6f72672f6c6f63686d75656c6c65722f687474702d72616e67652f6c6963656e7365)](https://packagist.org/packages/lochmueller/http-range)[![Percentage of issues still open](https://camo.githubusercontent.com/59016dd0a1917d63297f29d8230a0319d7e482326339062f6dfc1067471ac98c/68747470733a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f6c6f63686d75656c6c65722f687474702d72616e67652e737667)](https://isitmaintained.com/project/lochmueller/http-range "Percentage of issues still open")[![PHPStan](https://camo.githubusercontent.com/7a8a54e7ee075f9a33edda53b4e146cabdd7b14478a2ca64d17080aaff0f3b3d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/lochmueller/http-range/actions)

Use PSR-7 messages and a PSR-15 handler/middleware to handle HTTP Range request and trigger valid partial download for streams/files. Hande multiple ranges and check different env requirements.

Usage
-----

[](#usage)

```
use Lochmueller\HttpRange\HttpRangeRequestHandler;
use Lochmueller\HttpRange\Stream\ReadLocalFileStream;

$handler = new HttpRangeRequestHandler(new ReadLocalFileStream($filePath));
$response = $handler->handle($serverRequest);
// Use response header and content

// or via middleware - HttpRangeMiddleware::class
// response is used for the range split
```

Tests
-----

[](#tests)

Run `composer test` to execute the current tests suite or run `composer code-fix` to format the code in dev context.

Problems
--------

[](#problems)

- [ramsey/http-range#7](https://github.com/ramsey/http-range/issues/7)
-

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance44

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~156 days

Total

12

Last Release

436d ago

Major Versions

0.1.1 → 1.0.02023-06-16

1.0.0 → 2.0.02023-06-19

2.2.1 → 3.0.02023-06-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/11603a6f53d94137ce97cc4510dae54aaf652b5beda5eb932f390714dcb94595?d=identicon)[lochmueller](/maintainers/lochmueller)

---

Top Contributors

[![lochmueller](https://avatars.githubusercontent.com/u/3907126?v=4)](https://github.com/lochmueller "lochmueller (28 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lochmueller-http-range/health.svg)

```
[![Health](https://phpackages.com/badges/lochmueller-http-range/health.svg)](https://phpackages.com/packages/lochmueller-http-range)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[league/route

Fast routing and dispatch component including PSR-15 middleware, built on top of FastRoute.

6633.1M115](/packages/league-route)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
