[erlang-questions] http:request

Carlo Bertoldi carlo.bertoldi@REDACTED
Thu Apr 21 17:10:46 CEST 2011


Good afternoon,
  I have a problem with http:request.
The system in use is Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]
I'm also able to reproduce the problem on:
Erlang R14A (erts-5.8) [source] [64-bit] [smp:4:4] [rq:4] 
[async-threads:0] [kernel-poll:false]

I'm doing a simple HTTP GET to a webserver, here is the code, url omitted:

Result = http:request(get, {CompleteUrl, [{"User-Agent", "Erl-bot"}]}, 
[], []),
io:format("Result = ~p~n", [Result]).

Occasionally I don't see Result printed, but a nice error:
** Reason for termination ==
** {{badmatch,{16,6,18}},
     [{handle_probe,start_probe,2},
      {handle_probe,handle_cast,2},
      {gen_server,handle_msg,5},
      {proc_lib,init_p_do_apply,3}]}

I ran Wireshark to capture the requests made, both
the badmatch one and the correct one. I can't spot any relevant
differences, excluding the timestamp.

Can someone help me?

Thank you,
  Carlo Bertoldi




More information about the erlang-questions mailing list