PageRenderTime 103ms CodeModel.GetById 60ms app.highlight 6ms RepoModel.GetById 35ms app.codeStats 0ms

/include/yaws_api.hrl

http://github.com/skarab/ewgi
Erlang | 112 lines | 77 code | 18 blank | 17 comment | 0 complexity | e25e6b91b0afcee8f9e8d1396dd54f78 MD5 | raw file
  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, {
 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         }).
 40
 41
 42-record(http_request, {method,
 43                       path,
 44                       version}).
 45
 46-record(http_response, {version,
 47                        status,
 48                        phrase}).
 49
 50-record(headers, {
 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         }).
 73
 74
 75
 76
 77-record(url,
 78        {scheme,
 79         host, 
 80         port,            %% undefined means not set
 81         path = [],
 82         querypart = []}).
 83
 84
 85-record(setcookie,{
 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}).
 99
100
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         }).
109
110
111
112