Basic libURL bug?

Dave Cragg dave.cragg at
Sun Jan 2 21:59:34 EST 2011

On 3 Jan 2011, at 02:27, Chipp Walters wrote:

> Dave,
> It's just a standard IIS logfile from a server. There's nothing funny about
> it. In fact, I cut/pasted it into a text file and uploaded it to the server
> it's on right now, so as to keep Chris from hollering at me! (It had the
> problem on our server as well).
> Do you suggest I add the debug line you mention, or is there something
> 'better' to do for now?

Not sure, Chipp. It's not clear whether we're all seeing exactly the same thing or not. 

Two suggestions for now:

1.  In the libUrl script where I added the DEBUG 1 line, add this instead:

    wait 15 milliseconds with messages

This works here. But it fails if I set it to 10 milliseconds. (But I guess this will slow the total download by a number of seconds, so it's a bit of a desperate fix.) 

2.  set the httpHeaders to "Connection: close"

I was seeing socket errors sometimes (perhaps similar to what Mark reported) when retrying the script. I think the error on the socket probably occurred on the previous try, but for some reason, the error isn't being seen by LC and it is trying to re-use the faulty (or already closed) socket on subsequent calls. Setting the connection header will force the socket to get closed on completion and LC will automatically open a fresh socket for subsequent calls. So not a fix as such, but it may help to reduce some of the consequential effects. 


More information about the Use-livecode mailing list