yaws 1.73 compatibility
[fuzed.git] / include / yaws / yaws_api.hrl
blob2a0970372534485568c8165a9a20b372caf125af
1 %%%----------------------------------------------------------------------
2 %%% File : yaws_api.hrl
3 %%% Author : Claes Wikstrom <klacke@hyber.org>
4 %%% Purpose :
5 %%% Created : 24 Jan 2002 by Claes Wikstrom <klacke@hyber.org>
6 %%%----------------------------------------------------------------------
8 -author('klacke@hyber.org').
10 -record(arg, {
11 clisock, %% the socket leading to the peer client
12 client_ip_port, %% {ClientIp, ClientPort} tuple
13 headers, %% headers
14 req, %% request
15 clidata, %% The client data (as a binary in POST requests)
16 server_path, %% The normalized server path (pre-querystring part of URI)
17 querydata, %% For URIs of the form ...?querydata
18 %% equiv of cgi QUERY_STRING
19 appmoddata, %% (deprecated - use pathinfo instead) the remainder of the path leading up to the query
20 docroot, %% Physical base location of data for this request
21 docroot_mount, %% virtual directory e.g /myapp/ that the docroot refers to.
22 fullpath, %% full deep path to yaws file
23 cont, %% Continuation for chunked multipart uploads
24 state, %% State for use by users of the out/1 callback
25 pid, %% pid of the yaws worker process
26 opaque, %% useful to pass static data
27 appmod_prepath, %% (deprecated - use prepath instead) path in front of: <appmod><appmoddata>
28 prepath, %% Path prior to 'dynamic' segment of URI.
29 %% ie http://some.host/<prepath>/<script-point>/d/e
30 %% where <script-point> is an appmod mount point, or .yaws,.php,.cgi etc script file.
31 pathinfo %% Set to '/d/e' when calling c.yaws for the request http://some.host/a/b/c.yaws/d/e
32 %% equiv of cgi PATH_INFO
33 }).
36 -record(http_request, {method,
37 path,
38 version}).
40 -record(http_response, {version,
41 status,
42 phrase}).
44 -record(headers, {
45 connection,
46 accept,
47 host,
48 if_modified_since,
49 if_match,
50 if_none_match,
51 if_range,
52 if_unmodified_since,
53 range,
54 referer,
55 user_agent,
56 accept_ranges,
57 cookie = [],
58 keep_alive,
59 location,
60 content_length,
61 content_type,
62 content_encoding,
63 authorization,
64 transfer_encoding,
65 other = [] %% misc other headers
66 }).
71 -record(url,
72 {scheme,
73 host,
74 port, %% undefined means not set
75 path = [],
76 querypart = []}).
79 -record(setcookie,{
80 key,
81 value,
82 quoted,
83 comment,
84 comment_url,
85 discard,
86 domain,
87 max_age,
88 expires,
89 path,
90 port,
91 secure,
92 version}).