fix: correct MIME type of .txt files (ref: #6762)#7111
fix: correct MIME type of .txt files (ref: #6762)#7111lucasfernog merged 8 commits intotauri-apps:devfrom
Conversation
|
I wonder if we should use Self::Txt as a general fallback instead of Self::Html 🤔 Not sure what depends on that though so maybe something to think about later when Lucas is back. |
|
Pushed a fixup to fix the linter error. Unfortunately the 'test core' jobs are failing with: |
|
i want to cry 😂 |
|
Can you add the package to this list: https://github.com/tauri-apps/tauri/blob/dev/.github/workflows/test-core.yml#L95 pinning it to 0.15.2 please? |
|
Done. It was |
|
Okay, now there's that other Clippy failure. I can reproduce the |
|
Yeah, don't worry about it. Since your change doesn't trigger it we can fix it in another PR :) |
|
For Tauri itself I think it's fine to change the default fallback to txt (I hope the asset will always have the .html extension), though for users it might be a little weird. The fallback for |
This reverts commit 9112964.
|
I'm thinking about it and it should be a separate PR (maybe even targetting v2 instead with a better way of handling this). |
|
Why though? When would falling back to text be worse than falling back to html? Or different: When do we want to send html for non html files? Genuine question btw, i'm so out of the loop on this topic by know that i can't think of a use-case right now. |
|
|
|
hmm, i thought we always tried to load index.html in these cases, or well, i guess we do but the other way around? idk, probably not much of a problem anyway now that we handle text files 🤷 |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___)Other information
This sets the MIME type for .txt files as
text/plaininstead oftext/html. See #6762 for more details. (Whethertext/htmlis always the right fallback is also a question, but I haven't done anything about that here.)I also moved MP4 up to its correct place alphabetically in a few places.