<div>I ran your sample under Windows XP service pack 2 with OTP R10B-9.</div>
<div>I could not reproduce the problem.</div>
<div> </div>
<div>One of my application do http:request every 5 minutes. It has been doing that since 2005 June. So far didn't see that error since. But mine do http:request every 5 min so yours probably do it really fast without interval.
</div>
<div> </div>
<div>I think it may be the persistent connection that confuses whoever that is, http module or web server. :-)</div>
<div> </div>
<div>Try asynchronously and see if happens again.</div>
<div> </div>
<div>regards,</div><br><br>
<div><span class="gmail_quote">On 2/26/06, <b class="gmail_sendername">Soren Gronvald</b> <<a href="mailto:gronvald@yahoo.com">gronvald@yahoo.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">hi,<br><br>I have a problem with http:request that I think could<br>be a bug (but of course it could be due to ignorance
<br>on my part).<br><br>I am trying to read a url from <a href="http://yahoo.com">yahoo.com</a> in the<br>simplest possible way - http:request(Url)- but it<br>fails with the error<br><br>{error,session_remotly_closed}<br>
<br>This of course indicates that it is the server that<br>causes trouble, but I can read the same url with other<br>technologies (java and visual basic) with no hassle at<br>all. And I can read similar but shorter urls from
<br><a href="http://yahaoo.com">yahaoo.com</a> with erlang http:request without problems.<br><br>this url can be read successfully:<br>U1 =<br>"<a href="http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv">
http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv</a>".<br><br>and this fails.<br>U2 =<br>"<a href="http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv">
http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv</a>".<br><br>both should return a comma separated list of stock<br>exchange quotes from <a href="http://yahoo.com">yahoo.com
</a>.<br><br>As I can read the same url with other technologies it<br>makes me think that there is a bug in the http client<br>module. Or, could it be that I need some<br>HTTPOptins/Options to make it work?<br><br>I am using erlang R10B-9 on Windows XP SP2
<br>professional edition with all updates applied. I have<br>downloaded the precompiled version from <a href="http://erlang.org">erlang.org</a>.<br><br>Best regards<br>Gronvald<br><br><br>I have included program examples below
<br><br>this erlang program shows the problem<br><br>% this works<br>testurl(1) -><br>U =<br>"<a href="http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv">http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv
</a>",<br>geturl(U);<br><br>% this exits<br>testurl(2) -><br>U =<br>"<a href="http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv">http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv
</a>",<br>geturl(U).<br><br>geturl(Url) -><br>application:start(inets),<br>X = http:request(Url),<br>case X of<br>{ok, { {_Version, 200, _ReasonPhrase}, _Headers,<br>Body} } -><br> Body;<br>_ -> X<br>end.<br>
<br><br>this java program will handle same situation without<br>error<br><br>import java.net.*;<br>import java.io.*;<br><br>public class Geturl {<br><br>public static void main(String[] args) throws<br>Exception {<br><br>
String u2 =<br><br>"<a href="http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv">http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv</a>
";<br><br>URL url = new URL(u2);<br>InputStream is = new<br>BufferedInputStream(url.openStream());<br>Reader r = new InputStreamReader(is);<br><br>int c = r.read();<br>while(c != -1) {<br> System.out.print((char)c);
<br> c = r.read();<br>}<br>}<br>}<br><br><br><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around<br><a href="http://mail.yahoo.com">
http://mail.yahoo.com</a><br></blockquote></div><br>