-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Content-Type header set for SVG files #1217
fix Content-Type header set for SVG files #1217
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Hi @mbektas - thank you for identifying the issue and providing a pull request. In looking into this just now (sorry, I hadn't seen your PR), I came to roughly the same conclusion about where the fix is located. I also added a test case since resources from a gateway are handled a bit differently than local resources (in that they don't go through the static file handler). Would you mind if I pushed the test update to your branch as part of this PR? |
hi @kevin-bates , sure, please feel free to push any updates as necessary. |
(Sorry for the delay. I just pushed the test update.) |
…svg-icon-content-type
Codecov ReportBase: 80.44% // Head: 39.37% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1217 +/- ##
===========================================
- Coverage 80.44% 39.37% -41.07%
===========================================
Files 68 68
Lines 8134 8135 +1
Branches 1586 1587 +1
===========================================
- Hits 6543 3203 -3340
- Misses 1176 4733 +3557
+ Partials 415 199 -216
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hi @mbektas - I think the test failure is legitimate. When I step through the FWIW, the way I resolved this was to add a |
@kevin-bates I am not that familiar with this codebase and came up with my solution after a quick debugging. Your solution looks more explicit and safe. I wouldn't mind closing this PR and going with your changes. |
Ok - that sounds good. I would like to add you as a co-author in my PR, do you mind if I do that? |
sounds great! thank you! |
Content-Type for SVG icon is properly set in GatewayResourceHandler but overridden in the base handler to
application/json
. This change prevents overriding Content-Type if previously set.Fixes #1216