aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-runserver/mime.h
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-25 02:57:21 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-25 02:57:21 +0200
commit6ac53d4c783340ae9139c7f4dcfe9bfddace5892 (patch)
tree2637740546dcf002fbfe39eb94d6f722a2c5c7d6 /src/blogc-runserver/mime.h
parent0c916e2c8b56c320fdc81f68d445194559479041 (diff)
downloadblogc-6ac53d4c783340ae9139c7f4dcfe9bfddace5892.tar.gz
blogc-6ac53d4c783340ae9139c7f4dcfe9bfddace5892.tar.bz2
blogc-6ac53d4c783340ae9139c7f4dcfe9bfddace5892.zip
runserver: reimplemented http server without libevent
yeah, this patch implements a "complete" http server for static files. It is not the best code possible, and would be easily DDoS'able if used in production, as it spawns a thread for each request, without limiting. I'm sickish and this is the best code I can deliver now. At least it works! ;)
Diffstat (limited to 'src/blogc-runserver/mime.h')
-rw-r--r--src/blogc-runserver/mime.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/blogc-runserver/mime.h b/src/blogc-runserver/mime.h
new file mode 100644
index 0000000..a4b6409
--- /dev/null
+++ b/src/blogc-runserver/mime.h
@@ -0,0 +1,15 @@
+/*
+ * blogc: A blog compiler.
+ * Copyright (C) 2015-2016 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+ *
+ * This program can be distributed under the terms of the BSD License.
+ * See the file LICENSE.
+ */
+
+#ifndef _MIME_H
+#define _MIME_H
+
+const char* br_mime_guess_content_type(const char *filename);
+char* br_mime_guess_index(const char *path);
+
+#endif /* _MIME_H */