Permalink
Browse files

recompile generated module on server startup

  • Loading branch information...
1 parent ec5ad78 commit 33a766651bef72e3c610d313b2715eaf08ab11c0 Magnus Klaar committed Sep 9, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/mimetypes.erl
View
2 src/mimetypes.erl
@@ -86,6 +86,8 @@ init([]) ->
S = binary_to_list(B),
{ok, Tokens, _} = mimetypes_scan:string(S),
{ok, MimeTypes} = mimetypes_parse:parse(Tokens),
+ Mapping = extract_extensions(MimeTypes),
+ load_mapping(Mapping),
Extensions = aggregate_extensions(extract_extensions(MimeTypes)),
{ok, #state{
mime_types = dict:from_list(MimeTypes),

0 comments on commit 33a7666

Please sign in to comment.