dirl/config.def.h
FRIGN 0ce86bba15 Initial commit of quark rewrite
Roughly 700 LOC (half of the old quark on the Hiltjo branch) in size,
this rewrite supports partial content and other good stuff that will
make it fun again to use quark for simple static purposes.
The error checking is rigorous and strict and it will report proper
error codes back to the client whenever there was a problem or the
request was invalid in some way.

A cool feature is the support for listening on a UNIX-domain socket,
which will in the long run allow us to solve problems with virtual hosts
and other things in separate programs. But until then, this should be
robust enough for most use-cases.

This resets quark's version to 0, but this was no problem as there
haven't been any quark releases yet.

Feedback is appreciated.
2016-09-02 09:59:02 +02:00

35 lines
1 KiB
C

static const char *host = "127.0.0.1";
static const char *port = "80";
static const char *servedir = ".";
static const char *docindex = "index.html";
static const int listdirs = 1;
static const char *user = "nobody";
static const char *group = "nogroup";
static const int maxnprocs = 512;
#define MAXREQLEN 4096 /* >= 4 */
static const struct {
char *ext;
char *type;
} mimes[] = {
{ "xml", "application/xml" },
{ "xhtml", "application/xhtml+xml" },
{ "html", "text/html; charset=UTF-8" },
{ "html", "text/html; charset=UTF-8" },
{ "htm", "text/html; charset=UTF-8" },
{ "css", "text/css" },
{ "txt", "text/plain" },
{ "text", "text/plain" },
{ "md", "text/plain" },
{ "png", "image/png" },
{ "gif", "image/gif" },
{ "jpg", "image/jpg" },
{ "c", "text/plain" },
{ "h", "text/plain" },
{ "iso", "application/x-iso9660-image" },
{ "gz", "application/x-gtar" },
{ "pdf", "application/x-pdf" },
{ "tar", "application/tar" },
{ "mp3", "audio/mp3" },
};