proc: do not cancel script killing after writing headers
[oweals/uhttpd.git] / mimetypes.h
1 /*
2  * uhttpd - Tiny single-threaded httpd
3  *
4  *   Copyright (C) 2010-2013 Jo-Philipp Wich <xm@subsignal.org>
5  *   Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org>
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19
20 #ifndef _UHTTPD_MIMETYPES_
21
22 struct mimetype {
23         const char *extn;
24         const char *mime;
25 };
26
27 static const struct mimetype uh_mime_types[] = {
28
29         { "txt",     "text/plain" },
30         { "log",     "text/plain" },
31         { "js",      "text/javascript" },
32         { "css",     "text/css" },
33         { "htm",     "text/html" },
34         { "html",    "text/html" },
35         { "diff",    "text/x-patch" },
36         { "patch",   "text/x-patch" },
37         { "c",       "text/x-csrc" },
38         { "h",       "text/x-chdr" },
39         { "o",       "text/x-object" },
40         { "ko",      "text/x-object" },
41
42         { "bmp",     "image/bmp" },
43         { "gif",     "image/gif" },
44         { "png",     "image/png" },
45         { "jpg",     "image/jpeg" },
46         { "jpeg",    "image/jpeg" },
47         { "svg",     "image/svg+xml" },
48
49         { "json",    "application/json" },
50         { "jsonp",   "application/javascript" },
51         { "zip",     "application/zip" },
52         { "pdf",     "application/pdf" },
53         { "xml",     "application/xml" },
54         { "xsl",     "application/xml" },
55         { "doc",     "application/msword" },
56         { "ppt",     "application/vnd.ms-powerpoint" },
57         { "xls",     "application/vnd.ms-excel" },
58         { "odt",     "application/vnd.oasis.opendocument.text" },
59         { "odp",     "application/vnd.oasis.opendocument.presentation" },
60         { "pl",      "application/x-perl" },
61         { "sh",      "application/x-shellscript" },
62         { "php",     "application/x-php" },
63         { "deb",     "application/x-deb" },
64         { "iso",     "application/x-cd-image" },
65         { "tar.gz",  "application/x-compressed-tar" },
66         { "tgz",     "application/x-compressed-tar" },
67         { "gz",      "application/x-gzip" },
68         { "tar.bz2", "application/x-bzip-compressed-tar" },
69         { "tbz",     "application/x-bzip-compressed-tar" },
70         { "bz2",     "application/x-bzip" },
71         { "tar",     "application/x-tar" },
72         { "rar",     "application/x-rar-compressed" },
73
74         { "mp3",     "audio/mpeg" },
75         { "ogg",     "audio/x-vorbis+ogg" },
76         { "wav",     "audio/x-wav" },
77
78         { "mpg",     "video/mpeg" },
79         { "mpeg",    "video/mpeg" },
80         { "avi",     "video/x-msvideo" },
81
82         { "README",  "text/plain" },
83         { "log",     "text/plain" },
84         { "cfg",     "text/plain" },
85         { "conf",    "text/plain" },
86
87         { "pac",      "application/x-ns-proxy-autoconfig" },
88         { "wpad.dat", "application/x-ns-proxy-autoconfig" },
89         { "appcache", "text/cache-manifest" },
90         { "manifest", "text/cache-manifest" },
91
92         { NULL, NULL }
93 };
94
95 #endif
96