nanoFramework.WebServer
nanoFramework.WebServer copied to clipboard
WebServer - correct MIME-Type for images #1214
Description
- correct MIME-Type for images
- more MIME-Types for known types.
- secure file name handling.
- Method function according to parameter naming (filename)
Motivation and Context
- Fixes #1214
How Has This Been Tested?
Tested with modified WebServer.Sample: https://github.com/DaveSchmid/Samples/releases/tag/WebServer.Sample-Errors Sample shows misbehave of wrong MIME-Type.
Screenshots
Types of changes
- [x] Improvement (non-breaking change that improves a feature, code or algorithm)
- [x] Bug fix (non-breaking change which fixes an issue with code or algorithm)
- [x] New feature (non-breaking change which adds functionality to code)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Config and build (change in the configuration and build system, has no impact on code or features)
- [ ] Dependencies (update dependencies and changes associated, has no impact on code or features)
- [ ] Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
- [ ] Documentation (changes or updates in the documentation, has no impact on code or features)
Checklist:
- [x] My code follows the code style of this project (only if there are changes in source code).
- [ ] My changes require an update to the documentation (there are changes that require the docs website to be updated).
- [ ] I have updated the documentation accordingly (the changes require an update on the docs in this repo).
- [x] I have read the CONTRIBUTING document.
- [x] I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
- [ ] I have added new tests to cover my changes.
Signed-off-by: DaveSchmid [email protected]
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
@DaveSchmid, if you still want to add some elements, can you please pull the changes and add the few content type you really want. Again, as they can be passed in the function, it's not really needed to add a lot of them.