Skip to content

Use PSR-7 messages and a PSR-15 to handle HTTP Range valid partial download requests to files. Hande multiple ranges and check different env requirements.

License

lochmueller/http-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lochmueller/http-range

Latest Stable Version Total Downloads License Percentage of issues still open PHPStan

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

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

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

Problems

About

Use PSR-7 messages and a PSR-15 to handle HTTP Range valid partial download requests to files. Hande multiple ranges and check different env requirements.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages