Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 139 lines (106 sloc) 3.446 kB
21abc5b @klacke Initial revision
authored
1 %%%----------------------------------------------------------------------
2 %%% File : yaws.hrl
3 %%% Author : Claes Wikstrom <klacke@hyber.org>
4 %%% Purpose :
5 %%% Created : 16 Jan 2002 by Claes Wikstrom <klacke@hyber.org>
6 %%%----------------------------------------------------------------------
7
8 -author('klacke@hyber.org').
3c06a9e @klacke rearr of includefiles
authored
9
21abc5b @klacke Initial revision
authored
10
11 %% global conf
12 -record(gconf,{file,
13 yaws_dir,
a7ce22f @klacke ""
authored
14 tty_trace = false,
961926f @klacke ""
authored
15 trace,
16 debug,
21abc5b @klacke Initial revision
authored
17 logdir,
d69e4d8 @klacke ""
authored
18 ebin_dir = [],
8d5aa60 @klacke ""
authored
19 runmods = [],
21abc5b @klacke Initial revision
authored
20 keepalive_timeout = 15000,
21 max_num_cached_files = 400,
22 max_num_cached_bytes = 1000000, %% 1 MEG
f0b4192 @klacke ""
authored
23 max_size_cached_file = 8000,
fc117d0 *** empty log message ***
Johan Bevemyr authored
24 large_file_chunk_size = 10240,
f0341a3 @klacke ""
authored
25 cache_refresh_secs = 30, % seconds (auto zero when debug)
21abc5b @klacke Initial revision
authored
26 default_type = "text/html",
d3e0fa3 Upped read timeout and made it configurable
Johan Bevemyr authored
27 timeout = 30000,
d69e4d8 @klacke ""
authored
28 include_dir = [],
f0341a3 @klacke ""
authored
29 yaws, %% server string
3dc56a7 @klacke javascript support in ehtml
authored
30 uid %% unix uid of user running yaws
31 }).
32
21abc5b @klacke Initial revision
authored
33
34
661bd8c @klacke ""
authored
35 -record(ssl,
36 {
37 keyfile,
38 certfile,
39 verify = 0,
40 depth = 1,
41 password,
42 cacertfile,
43 ciphers,
44 cachetimeout}).
45
46
3dc56a7 @klacke javascript support in ehtml
authored
47
48
49 %% a list of lists of #sconfs
50 %% one list of #sconf's per listen ip
51
52
21abc5b @klacke Initial revision
authored
53 %% server conf
54 -record(sconf,
35208ae Fixed redirect_local
Johan Bevemyr authored
55 {port = 8000, %% which port is this server listening to
f48ee71 Fixed redirects and added rport and rmethod server settings.
Johan Bevemyr authored
56 rmethod, %% forced redirect method
0d6e5ea @klacke fixed tilde username expansion it didn't work, also made thta a confi…
authored
57 docroot, %% path to the docs
58 access_log = true, %% log acces
59 listen = {127,0,0,1}, %% bind to this IP, {0,0,0,0} is possible
60 servername = "localhost", %% servername is what Host: header is
75fde8b added servername to config file
Johan Bevemyr authored
61 add_port = true, %% add port after reading config
0d6e5ea @klacke fixed tilde username expansion it didn't work, also made thta a confi…
authored
62 ets, %% local store for this server
661bd8c @klacke ""
authored
63 ssl,
55c9af7 Changed implementation of multipart form data. There is a new config
Seah Hinde authored
64 authdirs = [],
0d6e5ea @klacke fixed tilde username expansion it didn't work, also made thta a confi…
authored
65 partial_post_size = nolimit,
66 appmods = [], %% list of modules for this app
7cb9a46 @klacke customized crash messages
authored
67 errormod_404 = yaws_404, %% the default 404 error module
68 errormod_crash = yaws_404, %% use the same module for crashes
c3386b0 @klacke added arg_rewrite_mod
authored
69 arg_rewrite_mod = yaws,
a7ac905 @klacke introduced opaque data in sconf
authored
70 tilde_expand = true, %% allow public_html user dirs
b0837d6 More opaque stuff.
Tobbe Tornquist authored
71 opaque = [], %% useful in embedded mode
72 start_mod %% user provided module to be started
21abc5b @klacke Initial revision
authored
73 }).
74
0d6e5ea @klacke fixed tilde username expansion it didn't work, also made thta a confi…
authored
75
0dd21d2 Added Basic Authentication support with a new subsection to the serve…
Seah Hinde authored
76 % Auth conf - from server conf and .yaws_auth
77 -record(auth,
55c9af7 Changed implementation of multipart form data. There is a new config
Seah Hinde authored
78 {dir = [],
79 realm = "",
80 type = "Basic",
81 users = []
82 }).
21abc5b @klacke Initial revision
authored
83
3dc56a7 @klacke javascript support in ehtml
authored
84
3b9e4a1 @klacke new ret vals from out/1
authored
85 -record(dcc, {
86 doclose = true,
87 chunked = false}).
00303e2 @klacke outh record, the outgoing headers are built up into a record now, muc…
authored
88
89
90
91
92 %% this internal record is used and returned by the URL path parser
93
94 -record(urltype, {type, %% error | yaws | regular | directory |
95 %% forbidden | appmod
96 finfo,
97 path,
98 fullpath,
99 dir, %% relative dir where the path leads to
100 %% flat | unflat need flat for authentication
101 data, %% Binary | FileDescriptor | DirListing | undefined
102 mime = "text/html", %% MIME type
103 q, %% query for GET requests
104 wwwauth = undefined %% or #auth{}
105 }).
106
107
108
109
110 %% this record is constructed as we build up
111 %% the outgoing headers
112
113 -record(outh, {
114 status, %% int status code
115
116 doclose, %% bool
117 chunked, %% bool
118 contlen, %% integer
119
120
121 %% and the total set of out headers we can have
122 %% as actual strings
123 connection,
124 server,
125 location,
126 cache_control,
127 date,
128 allow,
129 last_modified,
130 etag,
131 set_cookie,
132 content_length,
133 content_type,
134 transfer_encoding,
135 www_authenticate}).
136
137
138
Something went wrong with that request. Please try again.