[erlang-questions] tcp active mode connection with http packet sometimes gives tcp packets?

Bob Ippolito <>
Sat Oct 18 04:51:02 CEST 2008

On Fri, Oct 17, 2008 at 7:03 PM, Marc Sugiyama <> wrote:
>> We are using a locally modified mochiweb that uses active mode
>> (active, true).  Mochiweb uses the http packet mode.
> [...]
> I'm going to answer my own question.
> I think I've tracked down the problem.  What's happening is that after
> reading the header
> mochiweb puts the socket in raw mode (for the web application to read
> data).  While the
> socket is in raw mode, we're getting another http request, which ends
> up being fed into
> mochiweb's http receive loop as tcp rather than http packets.
> This likely isn't a problem with passive mode, since Erlang won't
> interpret the tcp data until
> we explicitly read data.

Out of curiosity, why have you decided to use active mode?


More information about the erlang-questions mailing list