Commit Graph

71 Commits

Author SHA1 Message Date
Yuki Okushi da2d74ec28
perf(files): drop some needless allocations (#4042) 2026-04-26 19:14:54 +00:00
Yuki Okushi 6d81907540
fix(files,http,web): do not compress 206 at all (#3923) 2026-02-15 08:56:43 +09:00
Yuki Okushi f31f9bc92c
fix(files): do not panic on pre-EPOCH files (#3922) 2026-02-14 10:25:48 +09:00
Yuki Okushi 5548fadc7d
fix(files): handle `bytes=0-` nicely (#3914) 2026-02-09 21:40:29 +00:00
Anton Lazarev 9856a3b056
Support serving pre-compressed files for static sites (#2615)
* support serving pre-compressed files for static sites

* Update CHANGES.md

* fix behavior change for audio file

* follow-up some inconsistency

* test(files): make encoding test independent of fixture line endings

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2026-02-08 02:15:38 +00:00
Yuki Okushi 06a354fe52
Merge commit from fork 2026-02-06 21:05:15 +09:00
Yuki Okushi 0eef0601a1
docs(files): refine docs of `read_mode_threshold` (#3897) 2026-02-01 22:10:47 +09:00
Rob Ede 4966a54e05
refactor(files): rename read_mode_threshold fn 2025-08-29 22:30:47 +01:00
Andrew Scott 00b0f8f700
feat(actix-files): opt-in filesize threshold for faster synchronous reads (#3706)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-08-29 21:52:34 +01:00
dependabot[bot] 9656383646
build(deps): update derive_more requirement from 1 to 2 (#3571)
* build(deps): update derive_more requirement from 1 to 2

Updates the requirements on [derive_more](https://github.com/JelteF/derive_more) to permit the latest version.
- [Release notes](https://github.com/JelteF/derive_more/releases)
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md)
- [Commits](https://github.com/JelteF/derive_more/compare/v1.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: derive_more
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: simplify derive_more calls

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-02-10 01:27:56 +00:00
John Vandenberg d6bdfac1b9
build(deps): update derive_more to v1.0 (#3453)
* build(deps): update derive_more to v1.0

* refactor: use from derive module

---------

Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-08-18 14:17:03 +00:00
Dialga fcfc727295
actix-files: fix handling linebreaks in filenames (#3237)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2024-01-10 03:56:15 +00:00
Sven-Hendrik Haase febba786fa
actix-files: Properly handle newlines in file names (#3235) 2024-01-06 10:11:40 +00:00
Rob Ede 79a38e0628
apply standard formatting 2023-07-17 02:38:12 +01:00
Rob Ede 6fdda45ca3
update bitflags to v2 2023-05-06 11:38:51 +01:00
kkocdko 73b94e902d
fix xhtml pages' `content-disposition` (#2903)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
2022-10-09 12:44:10 +01:00
Rob Ede 20f4cfe6b5
fix partial ranges for video content (#2817)
fixes #2815
2022-07-23 16:27:01 +01:00
Rob Ede a03a2a0076
deprecate `NamedFile::set_status_code` 2022-03-10 02:54:06 +00:00
Rob Ede 745e738955
fix negative impl assertion on 1.60+
see https://github.com/rust-lang/rust/issues/94791
2022-03-10 02:36:57 +00:00
Rob Ede 1fd90f0b10
Implement getters for named file fields (#2689)
Co-authored-by: Janis Goldschmidt <github@aberrat.io>
2022-03-10 01:29:26 +00:00
Clément Nerma 955c3ac0c4
Add support for audio files streaming (#2645) 2022-03-03 00:29:59 +00:00
Rob Ede 10ef9b0751
remove useless doctest main fns 2022-02-22 12:32:06 +00:00
Rob Ede 21a08ca796
tweak set_content_encoding docs 2022-01-28 20:27:16 +00:00
Luca Palmieri a9f497d05f
Guard against broken intra-doc links in CI (#2616) 2022-01-28 17:28:16 +00:00
Rob Ede 6c97d448b7
update tokio-uring to 0.2 (#2583) 2022-01-12 17:53:36 +00:00
Rob Ede 0bc4ae9158
remove `BodyEncoding` trait (#2565) 2022-01-03 18:46:04 +00:00
Rob Ede e890307091
Fix AcceptEncoding header (#2501) 2022-01-03 13:17:57 +00:00
Rob Ede 11ee8ec3ab
align remaining header map terminology (#2510) 2021-12-13 16:08:08 +00:00
Rob Ede 2d053b7036
remove `actix_http::http` module (#2488) 2021-12-05 14:37:20 +00:00
Rob Ede c7c02ef99d
body ergonomics v3 (#2468) 2021-12-04 19:40:47 +00:00
fakeshadow dd347e0bd0
implement io-uring for actix-files (#2408)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-11-22 01:19:09 +00:00
Rob Ede 194a691537
files: 304 Not Modified responses omit Content-Length header (#2453) 2021-11-19 14:04:12 +00:00
Igor Aleksanov 262c6bc828
Various refactorings (#2281)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-06-26 15:33:43 +01:00
Ali MJ Al-Nasrawy 8d124713fc
files: inline disposition for common web app file types (#2257) 2021-06-16 20:33:22 +01:00
Ali MJ Al-Nasrawy 812269d656
clarify docs for BodyEncoding::encoding() (#2258) 2021-06-10 15:38:35 +01:00
Ibraheem Ahmed 26e9c80626
Named file service (#2135) 2021-04-18 23:34:51 +01:00
Rob Ede 3188ef5731
don't use rust annotation on code doc blocks 2021-03-25 08:45:52 +00:00
Rob Ede 31d9ed81c5
change rustfmt line width to 96 2021-02-11 23:03:17 +00:00
fakeshadow 20cf0094e5
fix master branch build. change web::block output type. (#1957) 2021-02-06 16:23:59 +00:00
Rob Ede b1dd8d28bc
response header rework (#1869) 2021-01-15 02:11:10 +00:00
Robin Schoonover a919d2de56
actix-files: Fix If-(Un)Modified to not consider sub-seconds (#1887) 2021-01-11 18:18:23 +00:00
fakeshadow d40ae8c8ca
use sync method on Responder trait (#1891) 2021-01-08 22:17:19 +00:00
Aravinth Manivannan a929209967
`actix-files` intra-doc migration (#1785) 2020-11-10 23:54:38 +00:00
Rob Ede 26c1a901d9
add files preference for utf8 text responses (#1714) 2020-10-06 21:56:28 +01:00
Rob Ede f7bcad9567
split up files lib (#1685) 2020-09-20 23:18:25 +01:00
Yuki Okushi 92b5bcd13f
Check format and tweak CI config (#1619) 2020-07-22 00:28:33 +01:00
Yuki Okushi 245dd471dd
files: Minimize `futures` dependencies 2020-05-19 08:24:34 +09:00
Omid Rad b0866a8a0f
Actix-files will always send SizedStream (#1496)
* Fixes #1384

* There is no need to set no_chunking

* Test content-length for static files

* Update the tests

* Add Changelog

* Try to simply fix Windows test issues!

Co-authored-by: Rob Ede <robjtede@icloud.com>
2020-05-18 06:54:42 +09:00
Nikolay Kim 1732ae8c79 fix Bodyencoding trait usage 2019-12-18 09:30:14 +06:00
Nikolay Kim 01613f334b Move BodyEncoding to dev module #1220 2019-12-16 17:22:26 +06:00