Mercurial > prosody-hg
comparison plugins/mod_http_files.lua @ 5718:16db80c2b74d
Merge 0.9->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 29 Jun 2013 10:11:55 +0100 |
| parents | 345761f0c2be 8a0465de172e |
| children | bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
| 5715:ce9818e48ebb | 5718:16db80c2b74d |
|---|---|
| 30 png = "image/png", | 30 png = "image/png", |
| 31 gif = "image/gif", | 31 gif = "image/gif", |
| 32 jpeg = "image/jpeg", jpg = "image/jpeg", | 32 jpeg = "image/jpeg", jpg = "image/jpeg", |
| 33 svg = "image/svg+xml", | 33 svg = "image/svg+xml", |
| 34 }; | 34 }; |
| 35 module:shared("mime").types = mime_map; | 35 module:shared("/*/http_files/mime").types = mime_map; |
| 36 | 36 |
| 37 local mime_types, err = open(module:get_option_string("mime_types_file", "/etc/mime.types"),"r"); | 37 local mime_types, err = open(module:get_option_string("mime_types_file", "/etc/mime.types"),"r"); |
| 38 if mime_types then | 38 if mime_types then |
| 39 local mime_data = mime_types:read("*a"); | 39 local mime_data = mime_types:read("*a"); |
| 40 mime_types:close(); | 40 mime_types:close(); |
