Closed etnt closed 4 years ago
Thanks for submitting this.
In trying to add a unit test for it, I found it doesn't work as it should, since mime_types:t/1
is implemented to always return global settings, but this PR should honor per-server settings. The fix is easy: pass the #sconf{}
from out404/3
through to mime_types:t/2
. I'll add this fix before I merge the PR.
Rebased to master at 64cc8cd.
When returning the default '404 Not Found' page, the content type was hardcoded to 'text/html', i.e with no charset information.
Now we make use of the 'mime_types' module to get the proper content type (which takes into account what charset that has been configured).