mirror of
https://github.com/actix/actix-web.git
synced 2024-11-25 11:01:14 +00:00
fix xhtml pages' content-disposition
(#2903)
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
parent
ad7e67f940
commit
73b94e902d
2 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## Unreleased - 2022-xx-xx
|
## Unreleased - 2022-xx-xx
|
||||||
|
- XHTML files now use `Content-Disposition: inline` instead of `attachment`. [#2903]
|
||||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||||
|
|
||||||
|
[#2903]: https://github.com/actix/actix-web/pull/2903
|
||||||
|
|
||||||
## 0.6.2 - 2022-07-23
|
## 0.6.2 - 2022-07-23
|
||||||
- Allow partial range responses for video content to start streaming sooner. [#2817]
|
- Allow partial range responses for video content to start streaming sooner. [#2817]
|
||||||
|
|
|
@ -132,7 +132,7 @@ impl NamedFile {
|
||||||
mime::IMAGE | mime::TEXT | mime::AUDIO | mime::VIDEO => DispositionType::Inline,
|
mime::IMAGE | mime::TEXT | mime::AUDIO | mime::VIDEO => DispositionType::Inline,
|
||||||
mime::APPLICATION => match ct.subtype() {
|
mime::APPLICATION => match ct.subtype() {
|
||||||
mime::JAVASCRIPT | mime::JSON => DispositionType::Inline,
|
mime::JAVASCRIPT | mime::JSON => DispositionType::Inline,
|
||||||
name if name == "wasm" => DispositionType::Inline,
|
name if name == "wasm" || name == "xhtml" => DispositionType::Inline,
|
||||||
_ => DispositionType::Attachment,
|
_ => DispositionType::Attachment,
|
||||||
},
|
},
|
||||||
_ => DispositionType::Attachment,
|
_ => DispositionType::Attachment,
|
||||||
|
|
Loading…
Reference in a new issue