| 16 | namespace mime { |
| 17 | |
| 18 | void initialize() |
| 19 | { |
| 20 | // These MIME types were collected via: |
| 21 | /* |
| 22 | python -c ' |
| 23 | import mimetypes |
| 24 | for extension, type in mimetypes.types_map.iteritems(): |
| 25 | print "types[\"%s\"] = \"%s\";" % (extension, type) |
| 26 | ' |
| 27 | */ |
| 28 | |
| 29 | types.insert({ |
| 30 | {".obj", "application/octet-stream"}, |
| 31 | {".ra", "audio/x-pn-realaudio"}, |
| 32 | {".wsdl", "application/xml"}, |
| 33 | {".dll", "application/octet-stream"}, |
| 34 | {".ras", "image/x-cmu-raster"}, |
| 35 | {".ram", "application/x-pn-realaudio"}, |
| 36 | {".bcpio", "application/x-bcpio"}, |
| 37 | {".sh", "application/x-sh"}, |
| 38 | {".m1v", "video/mpeg"}, |
| 39 | {".xwd", "image/x-xwindowdump"}, |
| 40 | {".doc", "application/msword"}, |
| 41 | {".bmp", "image/x-ms-bmp"}, |
| 42 | {".shar", "application/x-shar"}, |
| 43 | {".js", "application/x-javascript"}, |
| 44 | {".src", "application/x-wais-source"}, |
| 45 | {".dvi", "application/x-dvi"}, |
| 46 | {".aif", "audio/x-aiff"}, |
| 47 | {".ksh", "text/plain"}, |
| 48 | {".dot", "application/msword"}, |
| 49 | {".mht", "message/rfc822"}, |
| 50 | {".p12", "application/x-pkcs12"}, |
| 51 | {".css", "text/css"}, |
| 52 | {".csh", "application/x-csh"}, |
| 53 | {".pwz", "application/vnd.ms-powerpoint"}, |
| 54 | {".pdf", "application/pdf"}, |
| 55 | {".cdf", "application/x-netcdf"}, |
| 56 | {".pl", "text/plain"}, |
| 57 | {".ai", "application/postscript"}, |
| 58 | {".jpe", "image/jpeg"}, |
| 59 | {".jpg", "image/jpeg"}, |
| 60 | {".py", "text/x-python"}, |
| 61 | {".xml", "text/xml"}, |
| 62 | {".jpeg", "image/jpeg"}, |
| 63 | {".ps", "application/postscript"}, |
| 64 | {".gtar", "application/x-gtar"}, |
| 65 | {".xpm", "image/x-xpixmap"}, |
| 66 | {".hdf", "application/x-hdf"}, |
| 67 | {".nws", "message/rfc822"}, |
| 68 | {".tsv", "text/tab-separated-values"}, |
| 69 | {".xpdl", "application/xml"}, |
| 70 | {".p7c", "application/pkcs7-mime"}, |
| 71 | {".eps", "application/postscript"}, |
| 72 | {".ief", "image/ief"}, |
| 73 | {".so", "application/octet-stream"}, |
| 74 | {".xlb", "application/vnd.ms-excel"}, |
| 75 | {".pbm", "image/x-portable-bitmap"}, |