From e1e8233759f835025f15da302f2a37ff6845d600 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 20 Apr 2016 22:13:45 +0200 Subject: inets: Add peer_cert to ESI environment --- lib/inets/doc/src/mod_esi.xml | 66 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 12 deletions(-) (limited to 'lib/inets/doc/src/mod_esi.xml') diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml index 66c59a0c60..c2fb60c416 100644 --- a/lib/inets/doc/src/mod_esi.xml +++ b/lib/inets/doc/src/mod_esi.xml @@ -23,10 +23,6 @@ mod_esi - Joakim Grebenö - - 1997-10-14 - 2.2 mod_esi.sgml mod_esi @@ -39,6 +35,56 @@ +
+ DATA TYPES +

The following data types are used in the functions for mod_esi:

+ + + env() = +

{EnvKey()::atom(), Value::term()}

+
+ +

Currently supported key value pairs

+ + + {server_software, string()} +

Indicates the inets version.

+ + {server_name, string()} +

The local hostname.

+ + {gateway_interface, string()} +

Legacy string used in CGI, just ignore.

+ + {server_protocol, string()} +

HTTP version, currently "HTTP/1.1"

+ + {server_port, integer()} +

Servers port number.

+ + {request_method, "GET | "PUT" | "DELETE | "POST" | "PATCH"} + + {remote_adress, inet:ip_address()} +

The clients ip address.

+ + {peer_cert, undefined | no_peercert | DER:binary() + +

For TLS connections where client certificates are used this will + be an ASN.1 DER-encoded X509-certificate as an Erlang binary. + If client certificates are not used the value will be no_peercert, + and if TLS is not used (HTTP or connection is lost due to network failure) + the value will be undefined. +

+ + {script_name, string()} +

Request URI

+ + {http_LowerCaseHTTPHeaderName, string()} +

example: {http_content_type, "text/html"}

+
+ +
+ deliver(SessionID, Data) -> ok | {error, Reason} @@ -63,11 +109,11 @@ overhead. Do not assume anything about the data type of SessionID. SessionID must be the value given as input to the ESI callback function that you implemented.

- +
- +
ESI Callback Functions
@@ -78,9 +124,7 @@ to the server process by calling mod_esi:deliver/2. SessionID = term() - Env = [EnvironmentDirectives] ++ ParsedHeader - EnvironmentDirectives = {Key,Value} - Key = query_string | content_length | server_software | gateway_interface | server_protocol | server_port | request_method | remote_addr | script_name + Env = env() Input = string() @@ -111,9 +155,7 @@ Creates a dynamic web page and returns it as a list. This function is deprecated and is only kept for backwards compatibility. - Env = [EnvironmentDirectives] ++ ParsedHeader - EnvironmentDirectives = {Key,Value} - Key = query_string | content_length | server_software | gateway_interface | server_protocol | server_port | request_method | remote_addr | script_name. + Env = env() Input = string() Response = string() -- cgit v1.2.3