move timegm declaration to utils.h
[project/uhttpd.git] / mimetypes.h
1 /*
2 * uhttpd - Tiny single-threaded httpd - MIME type definitions
3 *
4 * Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 #ifndef _UHTTPD_MIMETYPES_
20
21 struct mimetype {
22 const char *extn;
23 const char *mime;
24 };
25
26 static struct mimetype uh_mime_types[] = {
27
28 { "txt", "text/plain" },
29 { "log", "text/plain" },
30 { "js", "text/javascript" },
31 { "css", "text/css" },
32 { "htm", "text/html" },
33 { "html", "text/html" },
34 { "diff", "text/x-patch" },
35 { "patch", "text/x-patch" },
36 { "c", "text/x-csrc" },
37 { "h", "text/x-chdr" },
38 { "o", "text/x-object" },
39 { "ko", "text/x-object" },
40
41 { "bmp", "image/bmp" },
42 { "gif", "image/gif" },
43 { "png", "image/png" },
44 { "jpg", "image/jpeg" },
45 { "jpeg", "image/jpeg" },
46 { "svg", "image/svg+xml" },
47
48 { "zip", "application/zip" },
49 { "pdf", "application/pdf" },
50 { "xml", "application/xml" },
51 { "xsl", "application/xml" },
52 { "doc", "application/msword" },
53 { "ppt", "application/vnd.ms-powerpoint" },
54 { "xls", "application/vnd.ms-excel" },
55 { "odt", "application/vnd.oasis.opendocument.text" },
56 { "odp", "application/vnd.oasis.opendocument.presentation" },
57 { "pl", "application/x-perl" },
58 { "sh", "application/x-shellscript" },
59 { "php", "application/x-php" },
60 { "deb", "application/x-deb" },
61 { "iso", "application/x-cd-image" },
62 { "tar.gz", "application/x-compressed-tar" },
63 { "tgz", "application/x-compressed-tar" },
64 { "gz", "application/x-gzip" },
65 { "tar.bz2", "application/x-bzip-compressed-tar" },
66 { "tbz", "application/x-bzip-compressed-tar" },
67 { "bz2", "application/x-bzip" },
68 { "tar", "application/x-tar" },
69 { "rar", "application/x-rar-compressed" },
70
71 { "mp3", "audio/mpeg" },
72 { "ogg", "audio/x-vorbis+ogg" },
73 { "wav", "audio/x-wav" },
74
75 { "mpg", "video/mpeg" },
76 { "mpeg", "video/mpeg" },
77 { "avi", "video/x-msvideo" },
78
79 { "README", "text/plain" },
80 { "log", "text/plain" },
81 { "cfg", "text/plain" },
82 { "conf", "text/plain" },
83
84 { "pac", "application/x-ns-proxy-autoconfig" },
85 { "wpad.dat", "application/x-ns-proxy-autoconfig" },
86
87 { NULL, NULL }
88 };
89
90 #endif
91