[erlang-bugs] {header,1} inconsistency between TCP and SSL

Andrew Thompson <>
Sat Jul 20 05:25:09 CEST 2013


Today I noticed a difference in behaviour of the {header, 1} option when
using TCP and SSL in erlang releases R15B02 and newer:

https://gist.github.com/Vagabond/dabecf53ac8b4317e51c

As you can see, SSL in {header, 1} mode no longer includes the empty
binary as the second element in the list.

I believe this change was made in this commit:

https://github.com/erlang/otp/commit/8f97b428eb8f2fb89c3f9ec348f577304b1b9131

If you change that back, things work the same as TCP again, but all the
header_decode tests in ssl_packet_SUITE start to fail.

I'm simply going to stop using {header,1} and just use the bit syntax,
since I notice that Ingela considers it to be a silly option, but I
wanted to at least point the inconsistency out, for posterity.

Andrew


More information about the erlang-bugs mailing list