[erlang-questions] Are you using {packet, http} ?

Justin Sheehy justin@REDACTED
Mon Jul 14 16:52:08 CEST 2008


Sverker,

Mochiweb also uses the undocumented http mode for sockets.

I think (offhand, without checking) that it uses it in passive mode and
wouldn't care about the change, but you may want to get one of the mochiweb
developers would need to chime in as an authoritative voice.  But as a heavy
user of mochiweb I wanted to make sure that you were aware of it as another
implementation relying on this.

I'm very glad you're making it official.  It's a great feature.

Thanks!

-Justin



On 7/14/08 10:20 AM, "Sverker Eriksson" <sverker@REDACTED> wrote:

> A message from the OTP team:
>
> There is an undocumented socket packet mode that provides HTTP parsing.
> We are planning to make this packet mode official and possibly also
> change the format of the tuples returned in this mode. One current big
> user is the web server Yaws. We would like to know of other applications
> using this HTTP mode and what kind of impact such an incompatible change
> would have.
>
> A socket using {packet, http} returns tuples like this in *passive* mode:
>
> {ok, {http_request, ...}}
> {ok, {http_response, ...}}
> {ok, {http_header, ...}}
>
>
> and tuples like this in *active* mode:
>
> {http_request, Socket, ...}
> {http_response, Socket, ...}
> {http_header, Socket, ...}
>
>
> The proposed change would only affect the active mode like this:
>
> {http, Socket, {http_request, ...}}
> {http, Socket, {http_response, ...}}
> {http, Socket, {http_header, ...}}
>
>
> The purpose is to make the inner tuples look the same regardless of how
> they were received. This would simplify both the implementation and the
> documentation as well as any applications using both receive modes.
> Applications only using http in passive mode (like Yaws) will not be
> affected.
>
> Am I stirring up any worried http-users out there?
>
> /Sverker, Erlang/OTP Ericsson
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>




More information about the erlang-questions mailing list