{packet, http} with gen_tcp:connect/2 problem

Michael Truog <>
Wed Oct 28 20:05:35 CET 2009

When {active, false} and {packet, http} are used with gen_tcp:connect/2
there is a difference between what dialyzer (in R13B02-1 or R13B01)
expects and what happens in reality.  Based on the code here:
erts/emulator/beam/erl_bif_port.c on line 1230 in R13B02-1

It makes sense that you can get a response {ok, {http_error, _}} when
calling "case gen_tcp:recv(Socket, 0, Timeout) of" and this is the
result dialyzer expects.  However, in reality I get {error, {http_error,
_}} and need to make sure my code is {_, {http_error, _}} to avoid the
problem.  I am not sure what is changing the output of

- Michael

More information about the erlang-bugs mailing list