<div dir="ltr">I tried the same thing with the Network.Download.Curl library and that worked! I gueas something was wrong with the Network.Download library.<div><br></div><div>Best regards,</div><div><br></div><div>Stéphane</div></div><br><div class="gmail_quote"><div dir="ltr">2017年2月8日(水) 11:33 Stéphane Thibaud <<a href="mailto:snthibaud@gmail.com">snthibaud@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Thank you for your answer!<div class="gmail_msg">I get 200 OK status codes (I think after I get one 404 first) and it does seem like some (pieces of) data are sent (as tcpflow was printing data when the requests were failing - even when I started tcpflow after the failing requests started).<br class="gmail_msg">Network.Download gives back the following error: Left "Failed to connect: Not Found"</div><div class="gmail_msg">I have attached my code.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best regards,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Stéphane</div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">2017年2月7日(火) 10:53 Brandon Allbery <<a href="mailto:allbery.b@gmail.com" class="gmail_msg" target="_blank">allbery.b@gmail.com</a>>:<br class="gmail_msg"></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Mon, Feb 6, 2017 at 8:49 PM, Stéphane Thibaud <span dir="ltr" class="gmail_msg"><<a href="mailto:snthibaud@gmail.com" class="gmail_msg" target="_blank">snthibaud@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have tried the Network.Download library in order to download CSV files from Yahoo Finance, but after the 10th download every next download fails. Does Network.Download keep connections open? I did consume the result of the openURI function (even with deepseq). Any ideas?</blockquote></div><br class="gmail_msg"></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg">Can you get any details about why/how it fails? It could well be something as simple as Yahoo throttling you for too many connections in too short a time or something; in that case, the error from Yahoo should indicate it, but if all you get back is a 4xx or 5xx code then it won't be obvious. (Which may well mean something like running it under strace with +RTS -V0 to see the actual error returned.)</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><br clear="all" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div>-- <br class="gmail_msg"><div class="m_2868832835491696843m_-6198542118643076269gmail_signature gmail_msg" data-smartmail="gmail_signature"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">brandon s allbery kf8nh                               sine nomine associates</div><div class="gmail_msg"><a href="mailto:allbery.b@gmail.com" class="gmail_msg" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" class="gmail_msg" target="_blank">ballbery@sinenomine.net</a></div><div class="gmail_msg">unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" class="gmail_msg" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div></blockquote></div></div></blockquote></div>