3 ms·
So why wouldn't we just have a mapping between mime-types and extensions for look ups? Why bother examining the accept header beyond splitting and searching wit
by Something1234 8y ago
So why wouldn't we just have a mapping between mime-types and extensions for look ups? Why bother examining the accept header beyond splitting and searching within the list? Like in such a way that we're opening arbitrary files with it?
- tptacek 8y agoThat's essentially what the patch does; the "symbol" call only resolves for known-good mime types.
- Something1234 8y agoWhere would this code be in the rails code base? I usually don't touch ruby. I'm mildly curious what was there originally.
- tptacek 8y agoIn the template resolver in ActionView. It's spread over multiple files and a bit hard to follow, which no doubt contributed to the problem.
- lostapathy 8y agoUnfortunately a lot of rails internals are like this :(.