Module must be found in the code path and export
Function with an arity of three. An erlScriptAlias must
also be set up in the configuration file for the web server.
- If the HTTP request is a 'post' request and a body is sent,
- content_length is the length of the posted
- data. If 'get' is used, query_string is the data after
- ? in the URL.
- ParsedHeader is the HTTP request as a key-value tuple
- list. The keys in ParsedHeader are in lower case.
- SessionID is an identifier
- the server uses when deliver/2 is called. Do not
- assume anything about the datatype.
- Use this callback function to generate dynamic web
- content dynamically. When a part of the page is generated, send the
- data back to the client through deliver/2. Notice
- that the first chunk of data sent to the client must at
- least contain all HTTP header fields that the response
- will generate. If the first chunk does not contain the
- end of HTTP header, that is, "\r\n\r\n",
- the server assumes that no HTTP header fields will be generated.
+
+ mod_esi:deliver/2 shall be used to generate the response
+ to the client and SessionID is an identifier that shall by used when
+ calling this function, do not assume anything about
+ the datatype. This function may be called
+ several times to chunk the the respons data. Notice that the
+ first chunk of data sent to the client must at least contain
+ all HTTP header fields that the response will generate. If the
+ first chunk does not contain the end of HTTP header,
+ that is, "\r\n\r\n", the server assumes that no HTTP
+ header fields will be generated.
+
+ Env environment data of the request see description above.
+
+ Input is query data of a GET request or the body of
+ a PUT or POST request. The default behavior (legacy reasons)
+ for delivering the body, is that the whole body is gathered and
+ converted to a string. But if the httpd config parameter
+ max_client_body_chunk
+ is set, the body will be delivered as binary chunks
+ instead. The maximum size of the chunks is either max_client_body_chunk
+ or decide by the client if it uses HTTP chunked encoding
+ to send the body. When using the chunking
+ mechanism this callback must return {continue, State::term()}
+ for all calls where Input is {first,
+ Data::binary()} or {continue, Data::binary(),
+ State::term()}. When Input is {last,
+ Data::binary(), State::term()} the return value will be ignored.
+ Note that if the body is
+ small all data may be delivered in only one chunk and then the
+ callback will be called with {last, Data::binary(), undefined}
+ without getting called with {first,
+ Data::binary()}.
The input State is
+ the last returned State, in it the callback can include
+ any data that it needs to keep track of when handling the chunks.
+
+