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::Found
now contains aResolvedFile
, a new struct replacing the old unnamed tuple parameters. - Breaking change: The
FileBytesStream
andFileResponseBuilder
exports have moved to autil
submodule. - A filesystem abstraction was added. Different backing can now be implemented using traits from the
vfs
submodule.- Breaking change:
Static
,ResolveResult
,util::FileBytesStream
,util::FileBytesStreamRange
,util::FileBytesStreamMultiRange
are now generic over traits from thevfs
submodule. The type parameters have defaults set for the Tokio implementation, which should make migration effortless in many cases. - A
MemoryFs
was 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.br
and.gz
files if a client requests them with theAccept-Encoding
header. - 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
ResolvedFile
now has apath
field 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:
FileBytesStream
andFileResponseBuilder
are 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
FileAccess
trait instead ofAsyncRead
, to save on copy operations when serving fromMemoryFs
. An additionalIntoFileAccess
trait 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
MemoryFs
would not serve the directory index for/
.