PageRenderTime 21ms CodeModel.GetById 12ms RepoModel.GetById 0ms 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
Possible License(s): MPL-2.0-no-copyleft-exception
  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. -author('klacke@hyber.org').
  8. -record(arg, {
  9. clisock, %% the socket leading to the peer client
  10. client_ip_port, %% {ClientIp, ClientPort} tuple
  11. headers, %% headers
  12. req, %% request
  13. clidata, %% The client data (as a binary in POST requests)
  14. server_path, %% The normalized server path
  15. %% (pre-querystring part of URI)
  16. querydata, %% For URIs of the form ...?querydata
  17. %% equiv of cgi QUERY_STRING
  18. appmoddata, %% (deprecated - use pathinfo instead) the remainder
  19. %% 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
  22. %% refers to.
  23. fullpath, %% full deep path to yaws file
  24. cont, %% Continuation for chunked multipart uploads
  25. state, %% State for use by users of the out/1 callback
  26. pid, %% pid of the yaws worker process
  27. opaque, %% useful to pass static data
  28. appmod_prepath, %% (deprecated - use prepath instead) path in front
  29. %%of: <appmod><appmoddata>
  30. prepath, %% Path prior to 'dynamic' segment of URI.
  31. %% ie http://some.host/<prepath>/<script-point>/d/e
  32. %% where <script-point> is an appmod mount point,
  33. %% or .yaws,.php,.cgi etc script file.
  34. pathinfo %% Set to '/d/e' when calling c.yaws for the request
  35. %% http://some.host/a/b/c.yaws/d/e
  36. %% equiv of cgi PATH_INFO
  37. }).
  38. -record(http_request, {method,
  39. path,
  40. version}).
  41. -record(http_response, {version,
  42. status,
  43. 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. }).
  67. -record(url,
  68. {scheme,
  69. host,
  70. port, %% undefined means not set
  71. path = [],
  72. querypart = []}).
  73. -record(setcookie,{
  74. key,
  75. value,
  76. quoted,
  77. comment,
  78. comment_url,
  79. discard,
  80. domain,
  81. max_age,
  82. expires,
  83. path,
  84. port,
  85. secure,
  86. version}).
  87. -record(redir_self, {
  88. host, %% string() - our own host
  89. scheme, %% http | https
  90. scheme_str, %% "https://" | "http://"
  91. port, %% integer() - our own port
  92. port_str %% "" | ":<int>" - the optional port part
  93. %% to append to the url
  94. }).