[erlang-questions] Using mod_esi:deliver() ?

Ingela Anderton Andin <>
Tue Apr 8 08:56:38 CEST 2008

On 4/7/08, Ky?sti Ranto <> wrote:

> > Accoring to the documentation, the second argument of deliver/2 can be
> > either of type string() or io_list(). I don't know about the latter
> > but you can convert your parameter to string() by calling
> > lists:flatten(), i.e.
> >
> > lists:flatten(io_lib:format(...))

> Ha! That did it, mod_esi:deliver() works with flat strings.

No that is not entirely true. The data can be a string() or an io_list() but
if you want to send http-header data it has to be a string. From the documentation:  

"Sends data from a Erl Scheme script back to the client. Note
that if any HTTP-header fields should be added by the
script they must be in the first call to deliver/2 and the
data in the call must be a string."

Regards Ingela - OTP team

More information about the erlang-questions mailing list