Warn and fix missing mime types#1050
Merged
Archmonger merged 18 commits intoreactive-python:mainfrom Jun 15, 2023
Merged
Conversation
Collaborator
|
I'll review this evening. |
rmorshea
reviewed
Jun 15, 2023
Contributor
Author
|
I thought the same thing at first. But the patch is a harmless fix for I didn't want to link to anything specific since the repair method depends on operating system. This issue technically isn't limited to Windows, but it is far more likely to happen on Windows. I will update the comment to be more specific about this issue being OS independent. |
rmorshea
reviewed
Jun 15, 2023
Collaborator
|
I just merged a fix for the |
rmorshea
reviewed
Jun 15, 2023
Co-authored-by: Ryan Morshead <[email protected]>
rmorshea
reviewed
Jun 15, 2023
Collaborator
|
After that last comment LGTM |
rmorshea
previously approved these changes
Jun 15, 2023
rmorshea
approved these changes
Jun 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
N/A
Summary
Windows registry can sometimes go corrupt causing missing mime types. This results in our backends assuming all file types are
text/plain. Ultimately, this causes us to fail to serve our ReactPy clientindex.js.This PR aims to only resolve a minimal set of file extensions (only the ones we potentially use within ReactPy core). I considered using a more comprehensive
mime_typeslist from this repo, but it seems a bit overkill for us right now. We may want to use it if we need to serve a variety of static files.Checklist
changelog.rsthas been updated with any significant changes.