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

Robert Raschke rtrlists@REDACTED
Mon Apr 7 16:56:29 CEST 2008


I poked around the sources of httpd a bit (R12B). and found
http_transport:send/3 :

%%-------------------------------------------------------------------------
%% send(RequestOrSocketType, Socket, Message) -> ok | {error, Reason}
%%     SocketType = ip_comm | {ssl, _}
%%     Socket = socket()
%%     Message = list() | binary()
%% Description: Sends a packet on a socket, using either gen_tcp or ssl.
%%-------------------------------------------------------------------------
send(ip_comm, Socket, Message) ->
    gen_tcp:send(Socket, Message);
send({ssl, _}, Socket, Message) ->
    ssl:send(Socket, Message).

There's a small issue here, in that gen_tcp:send/2 takes a [char()] or
binary() as its second argument, whereas ssl:send/2 takes iolist() or
binary().

I think this is what causes iolist() arguments to mod_esi:deliver/2 to
not work under the ip_comm connection type.

Robby



More information about the erlang-questions mailing list