summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2014-07-13 16:12:59 +0200
committerReyk Floeter <reyk@esdenera.com>2014-07-13 16:12:59 +0200
commitb0a1cfbe755d14e21af5e866fc7321cf6a3c8d0b (patch)
tree948585fe33752889c039c67cc1eccd73ec5fa5c8 /http.h
parent660b4faa8d41d0817c59d00f8d606daab3586535 (diff)
downloadhttpd-b0a1cfbe755d14e21af5e866fc7321cf6a3c8d0b.tar.gz
httpd-b0a1cfbe755d14e21af5e866fc7321cf6a3c8d0b.zip
Implement media type support
Diffstat (limited to 'http.h')
-rw-r--r--http.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/http.h b/http.h
index 76d98e3..d9cf13e 100644
--- a/http.h
+++ b/http.h
@@ -119,6 +119,24 @@ struct http_error {
{ 0, NULL } \
}
+struct http_mediatype {
+ char *media_name;
+ char *media_type;
+ char *media_subtype;
+};
+/* Some default media types */
+#define MEDIA_TYPES { \
+ { "css", "text", "css" }, \
+ { "html", "text", "html" }, \
+ { "txt", "text", "plain" }, \
+ { "gif", "image", "gif" }, \
+ { "jpeg", "image", "jpeg" }, \
+ { "jpg", "image", "jpeg" }, \
+ { "png", "image", "png" }, \
+ { "js", "application", "javascript" }, \
+ { NULL } \
+}
+
/* Used during runtime */
struct http_descriptor {
struct kv http_pathquery;