[erlang-questions] ssl:setopts/2 and packet type httph

Ingela Andin ingela@REDACTED
Thu Sep 15 10:55:43 CEST 2011


This was discussed a bit of list as I happend  to reply from the wrong
email address (sorry about that).
Anyway here is the conclution.

Packet httph was invented for the statless erlang:decode_packet/3
function (used for example by the ssl application), howerver gen_tcp
and ssl sockets will
switch atomatically from http to httph after receiving the
request/status line, hence we did not see the need to be able to set
httph an ssl option.

When using gen_tcp you happen to be able to use packet httph in an
other context e.i. parsing trailers from chunked encoding, which is
quite logical as
they are defined to be entity-headers in the HTTP RFC. So what happens
to work for gen_tcp we think is the desired behaviour and we will
ssl to handle it too. We wil also update the inet documentation.

Regards Ingela Erlang/OTP team - Ericsson AB

Den 7 september 2011 23:20 skrev Oscar Hellström <oscar@REDACTED>:
> Hi,
> I'm trying to use lhttpc with OTP HEAD from github and ran in to troubles
> when trying to call ssl:setopts(S, [{packet, httph}]). I started poking
> around and found this in the inet manual:
> "Note that the packet type httph is not needed when reading from a socket."
> Apart from that I can't find any reference to httph any more. I'm not sure
> what's meant by that but I guess I'm missing something here. I'm using
> packet type httph to read trailers after chunked transfer coding.
> Is packet type httph intentionally removed, and will it be so from pure tcp
> sockets also?
> Thanks
> /Oscar
> --
> Oscar Hellström, oscar@REDACTED
> web: http://oscar.hellstrom.st
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list