Fixed resource leakage during connection accept(2)
[middleman.git] / include / settings.h
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 /* program version */
5 #define MMAN_VERSION "1.2.1"
6
7 /* url for web interface */
8 #define INTERFACEURL "mman"
9
10 /* timeout for receiving first header and waiting on remote server to send response */
11 #define TIMEOUT 60
12
13 /* duration connection will remain open for keep-alive */
14 #define KEEPTIMEOUT 120
15
16 /* maximum listening ports allowed */
17 #define MAXLISTENPORTS 20
18
19 /* maximum threads (thus, maximum connections) */
20 #define MAXTHREADS 1024
21
22 /* template for mkstemp() when using external program with temporary file */
23 #define TEMPFILE "/tmp/mmanXXXXXX"
24
25 /* time in seconds to hold dns results in cache before purging */
26 #define DNS_EXPIRE 360
27
28 /* size of hashtable for cached dns results */
29 #define DNS_HASH_SIZE 1024
30
31 /* flags for regcomp */
32 #define REGFLAGS REG_EXTENDED | REG_ICASE | REG_NOSUB
33
34 /* flags for pcre_compile */
35 #define PCREFLAGS PCRE_CASELESS | PCRE_DOTALL | PCRE_MULTILINE
36
37 /* format of log timestamps, see strftime manpage for help */
38 #define TIMEFORMAT "%a %d %H:%M:%S"
39
40 /* maximum substrings for regexp's with backreferences (rewrite rules) */
41 #define PCRE_MAX_SUBSTRING 16
42
43 /* filebuf size will always be aligned to a multiple of this number, must be a power of 2.
44    this reduces overhead due to excessive realloc'ing */
45 #define FILEBUF_ALIGNMENT 65536
46
47 /* size of blocks to read/write at once */
48 #define BLOCKSIZE 65536
49
50 /* maximum size of pages to buffer for rewriting and external parsing (in bytes), or -1 to disable checking
51    note: this doesn't work for pages that use chunked encoding */
52 #define BUFFERMAX 512000
53
54 /* default number of log entries to keep in memory for web interface */
55 #define LOGBUFFERSIZE 1000
56
57 /* mask of log entry types to _NOT_ show on the web interface */
58 #define LOGMASK MMLOG_DEBUG
59
60 /* web interface colours */
61 #define INTERFACE_BG "#99AABB" /* background */
62 #define INTERFACE_TEXT "#000000" /* text */
63 #define INTERFACE_LINK "#0000FF" /* link */
64 #define INTERFACE_VLINK "#0000FF" /* visited link */
65 #define INTERFACE_TABLEBG "#DDEEFF" /* table background */
66
67 #endif                          /* CONFIG_H */