roxen.lists.pike.general

Subject Author Date
Re: Protocols.HTTP.get_url() timeout Martin Stjernholm <mast[at]lysator[dot]liu[dot]se> 26-08-2009
<bertrand.lupart[at]linkeo.com> (Bertrand LUPART) wrote:

>   mixed result = catch{ http=Protocols.HTTP.get_url(url); };

That is a synchronous query. The timeouts only apply to the
asynchronous ones (done through e.g. Protocols.HTTP.do_async_method).

I agree that it's confusing that the synchronous variety doesn't obey
the timeouts. It probably has historic reasons since it was very hard
to do blocking I/O with timeouts in pike before. Nowadays it's still a
bit tricky, but it's possible to emulate blocking I/O with nonblocking
and a local backend. The synchronous requests ought to be fixed to do
it that way.