8 Commits

Author SHA1 Message Date
David Herberth
6c20928e50 fix(fs): Return 0 content length for range requests for empty files (#556) 2025-04-09 08:57:25 -04:00
Benjamin Swart
95e28bfc6d fs: Fix serving precompressed files without an extension (#507) 2024-09-19 15:45:26 +00:00
valkyrie_pilot
833bec4b8d support servefile zstd (#450)
* support servefile zstd

* Add zstd serve_file test

* ZStd precompressed file - RustRover did not show that it needed to be added
2024-01-05 08:47:30 +01:00
c5soft
ec394e7e08 ServeDir/File: Fix build_and_validate_path to prevent accessing arbitrary files (#204)
* fixed build_and_validate_path to exclude colon

* Fix directory traversal using `Path::components`

* Also check each component individually

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2022-01-21 13:26:17 +01:00
Oskar Nehlin
1069c2ee78 Make ServieFile specialized version of ServeDir (#187)
* Make ServieFile specialized version of ServeDir

* Add missing test for index.html redirection

* Fix tiny doc error

* Update changelog to include breaking change in service types
2021-11-24 14:08:12 +01:00
Oskar Nehlin
e8cf92b6a4 Fallback to other precompressed files if one variant isnt found (#178) 2021-11-20 14:17:20 +01:00
Oskar Nehlin
8de97ead16 Fallback to uncompressed file version if precompressed can't be found (#175)
* ServeFile: Fallback to uncompressed version if precompressed isn't found

* ServeDir: fallback to uncompressed version if precompressed isn't found
2021-11-17 15:19:12 +01:00
Oskar Nehlin
754aafec36 Precompressed files (#156)
* Split out content encoding enum

* Support precompressed files

fixup! Support precompressed files

* Add some more tests

* Support precompressed directory files

* Fix pr comments and improve docs

* Fix cargo hack issue

* Update changelog

Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
2021-11-15 12:04:47 +01:00