Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 113 lines (94 sloc) 3.718 kb
21abc5b @klacke Initial revision
authored
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 %%%----------------------------------------------------------------------
7
8 -author('klacke@hyber.org').
9
10 -record(arg, {
d0caaf6 @klacke tabs cleanup
authored
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
17 %% (pre-querystring part of URI)
18 querydata, %% For URIs of the form ...?querydata
19 %% equiv of cgi QUERY_STRING
20 appmoddata, %% (deprecated - use pathinfo instead) the remainder
21 %% of the path leading up to the query
22 docroot, %% Physical base location of data for this request
23 docroot_mount, %% virtual directory e.g /myapp/ that the docroot
24 %% refers to.
25 fullpath, %% full deep path to yaws file
26 cont, %% Continuation for chunked multipart uploads
27 state, %% State for use by users of the out/1 callback
28 pid, %% pid of the yaws worker process
29 opaque, %% useful to pass static data
30 appmod_prepath, %% (deprecated - use prepath instead) path in front
31 %%of: <appmod><appmoddata>
32 prepath, %% Path prior to 'dynamic' segment of URI.
33 %% ie http://some.host/<prepath>/<script-point>/d/e
34 %% where <script-point> is an appmod mount point,
35 %% or .yaws,.php,.cgi etc script file.
36 pathinfo %% Set to '/d/e' when calling c.yaws for the request
37 %% http://some.host/a/b/c.yaws/d/e
38 %% equiv of cgi PATH_INFO
39 }).
21abc5b @klacke Initial revision
authored
40
41
42 -record(http_request, {method,
d0caaf6 @klacke tabs cleanup
authored
43 path,
44 version}).
21abc5b @klacke Initial revision
authored
45
8e69e2c @klacke first almost working vsn of revproxy
authored
46 -record(http_response, {version,
d0caaf6 @klacke tabs cleanup
authored
47 status,
48 phrase}).
8e69e2c @klacke first almost working vsn of revproxy
authored
49
21abc5b @klacke Initial revision
authored
50 -record(headers, {
d0caaf6 @klacke tabs cleanup
authored
51 connection,
52 accept,
53 host,
54 if_modified_since,
55 if_match,
56 if_none_match,
57 if_range,
58 if_unmodified_since,
59 range,
60 referer,
61 user_agent,
62 accept_ranges,
63 cookie = [],
64 keep_alive,
65 location,
66 content_length,
67 content_type,
68 content_encoding,
69 authorization,
70 transfer_encoding,
71 other = [] %% misc other headers
72 }).
21abc5b @klacke Initial revision
authored
73
74
75
76
8da2b3a @klacke parse_url
authored
77 -record(url,
d0caaf6 @klacke tabs cleanup
authored
78 {scheme,
79 host,
80 port, %% undefined means not set
81 path = [],
82 querypart = []}).
a1b8e0c Added set cookie parser
Johan Bevemyr authored
83
84
85 -record(setcookie,{
d0caaf6 @klacke tabs cleanup
authored
86 key,
87 value,
88 quoted,
89 comment,
90 comment_url,
91 discard,
92 domain,
93 max_age,
94 expires,
95 path,
96 port,
97 secure,
98 version}).
a1b8e0c Added set cookie parser
Johan Bevemyr authored
99
dbab7a3 @klacke ssi include with var expansion + docs
authored
100
883fa5a @klacke added redirect_self to yaws_api
authored
101 -record(redir_self, {
102 host, %% string() - our own host
103 scheme, %% http | https
104 scheme_str, %% "https://" | "http://"
105 port, %% integer() - our own port
106 port_str %% "" | ":<int>" - the optional port part
107 %% to append to the url
108 }).
b2d5a00 @klacke postvar(), queryvar(), ssi docs
authored
109
110
dbab7a3 @klacke ssi include with var expansion + docs
authored
111
d0caaf6 @klacke tabs cleanup
authored
112
Something went wrong with that request. Please try again.