summaryrefslogtreecommitdiff
path: root/src/config/PROTOCOL.txt
blob: ffeb72f8041c218dc5bdd3d5ce784b87f976da51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
* Globals

G:verbosity -> 4 bytes
G:read_timeout -> 4 bytes	exit if waiting on client input for read_timeout ms
G:write_timeout -> 4 bytes	die if waiting on flush to client for write_timeout ms
G:cgi_timeout -> 4 bytes	504 if CGI hasn't finished answering / die if NPH hasn't finished reading
G:max_request_body_length -> 4 bytes
G:max_cgi_body_length -> 4 bytes
G:index_file -> file1\0file2\0file3\0  list of files to attempt when URL is a directory

They all need to exist, tipidee-config creates defaults.


* Content-Type

T:extension -> string		T:pdf -> application/pdf
or individual Content-Types in resource attributes

tipidee-config hardcodes a number of default content-types, they
can be overridden.


* Individual redirection

R:vres -> Xurl			R:skarnet.org/rickroll.html -> Xhttps://www.youtube.com/watch?v=dQw4w9WgXcQ
				X = '@' | redir_type (307=0, 308=1, 302=2, 301=3)


* Prefix redirection

r:prefix -> Xurlprefix		r:s6.org -> Xhttps://skarnet.org/software/s6
				X = '@' | redir_type (307=0, 308=1, 302=2, 301=3)

* Resource attributes

A:file -> Xstring	X = '@' | 1 (iscgi)
			if string nonempty: it's the content-type for the resource. If empty, default ctype

a:prefix -> Xstring	same, but for prefixes

* NPH prefixes

N:domain -> nphprefix		N:skarnet.org -> nph-	any CGI under skarnet.org starting with nph