Releases: stephank/hyper-staticfile
Releases · stephank/hyper-staticfile
v0.10.1
v0.9.6
v0.10.0
These are all the changes since v0.9.5 combined:
- Breaking change: Upgraded to Hyper 1.0.
- Breaking change: The top-level
resolve*functions are now methods on a new typeResolver. - Breaking change:
ResolveResult::Foundnow contains aResolvedFile, a new struct replacing the old unnamed tuple parameters. - Breaking change: The
FileBytesStreamandFileResponseBuilderexports have moved to autilsubmodule. - A filesystem abstraction was added. Different backing can now be implemented using traits from the
vfssubmodule.- Breaking change:
Static,ResolveResult,util::FileBytesStream,util::FileBytesStreamRange,util::FileBytesStreamMultiRangeare now generic over traits from thevfssubmodule. The type parameters have defaults set for the Tokio implementation, which should make migration effortless in many cases. - A
MemoryFswas added, which allows serving files efficiently from memory, and preloading an entire directory into memory.
- Breaking change:
- Added
Static::allowed_encodings, which can be used to serve precompressed.brand.gzfiles if a client requests them with theAccept-Encodingheader. - Added
Resolver::set_rewrite, which allows rewriting a request before the filesystem is accessed.
v0.10.0-alpha.7
- Upgraded to Hyper 1.0.0-rc.4. (Thanks @aaronriekenberg!)
v0.10.0-alpha.6
ResolvedFilenow has apathfield containing the resolved and sanitized path of the file.
v0.9.5
v0.10.0-alpha.5
- Fixes an issue in path sanitization that made open redirects possible. (RUSTSEC-2022-0072)
v0.9.4
v0.9.3
- Fixes an issue in path sanitization that made open redirects possible. (RUSTSEC-2022-0072)
v0.10.0-alpha.4
- Breaking change:
FileBytesStreamandFileResponseBuilderare no longer exported. If you were using these, please let us know via an issue, so we can design an API that fits the changes in structures. - Breaking change: The VFS layer now uses a new
FileAccesstrait instead ofAsyncRead, to save on copy operations when serving fromMemoryFs. An additionalIntoFileAccesstrait was also added to provide an intermediate step where buffer allocation can take place. These changes are reflected in type constraints throughout the crate API. - Fixed an issue where
MemoryFswould not serve the directory index for/.