http:request returns {error, session_remotly_closed}

Soren Gronvald gronvald@REDACTED
Sun Feb 26 18:15:32 CET 2006

I have a problem with http:request that I think could
be a bug (but of course it could be due to ignorance
on my part).
I am trying to read a url from in the
simplest possible way - http:request(Url)- but it
fails with the error
This of course indicates that it is the server that
causes trouble, but I can read the same url with other
technologies (java and visual basic) with no hassle at
all.  And I can read similar but shorter urls from with erlang http:request without problems.
this url can be read successfully:
 U1 =

and this fails.
 U2 =

both should return a comma separated list of stock
exchange quotes from
As I can read the same url with other technologies it
makes me think that there is a bug in the http client
module. Or, could it be that I need some
HTTPOptins/Options to make it work?
I am using erlang R10B-9 on Windows XP SP2
professional edition with all updates applied. I have
downloaded the precompiled version from
Best regards 
I have included program examples below
this erlang program shows the problem
% this works 
testurl(1) ->
 U =
% this exits
testurl(2) ->
 U =
geturl(Url) ->
 X = http:request(Url),
 case X of
  {ok, { {_Version, 200, _ReasonPhrase}, _Headers,
Body} } ->
  _ -> X

this java program will handle same situation without
public class Geturl {
 public static void main(String[] args) throws
Exception {
  String u2 =
  URL url = new URL(u2);
  InputStream is = new
  Reader r = new InputStreamReader(is);
  int c =;
  while(c != -1) {
   c =;

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the erlang-questions mailing list