CkHttp::Download is periodically failing for one of my customers that has a slow internet connection. Apparently there are lots of people on their connection at times. This is part of a "check for updates" feature in my app which first downloads a small text file with the version info and then downloads the necessary replacement ZIP file (1-2MB). The small text file always succeeds but most of the time the larger file fails on download for this customer. No other customers report any download issues so I believe it's associated with their internet connection being slow and perhaps a timeout used by CkHttp during the download process needing to be lengthened.
The following is the error message when the download fails(the actual URL has been changed for security reasons):
DllDate: Jul 9 2013
Username: OWNER-PC:OWNER Architecture: Little Endian; 32-bit
Language: Visual C++ 11.0
url: http://www.<remainder of="" url="" has="" been="" hidden="">
requestUrl: http://www.<remainder of="" url="" has="" been="" hidden="">
Using existing connection to web server...
-- BuildGetRequest --
Not auto-adding cookies.
Timeout waiting to read socket or accept connection
Failed to get response header
The user reports that it fails after about 20 seconds which is what the timeout in the error message indicates. But I'm wondering if there is some other timeout involved that needs to be adjusted since Internet Explorer has no problem retrieving the file via the same URL.
As a side note, I'm linking to ver 11 of the Chilkat libs although it shows in the above error that it's version 9. Why wouldn't it be 11.x?
My guess is that you simply need to increase the timeout.
I'm not sure where you see "version 11"? Maybe you're thinking of the version of Visual C++ itself (VC++ 11.0)? The version of Chilkat would have nothing to do with the version of Visual C++. (In other words, Chilkat v9.4.1 is offered for many versions of Visual C++)
If you wish to potentially see better information in LastErrorText, here is a new pre-release that may be better in this respect:
Ok, I'll increase the timeout and see if that helps them.
You're right on the version, my mistake. I was linking to the libs in the ChilkatVC11 folder and without thinking about it thought it was ver 11 of Chilkat which obviously it's VC11 instead.
Just reporting back. I increased the timeout from 20 to 40 seconds and the user that had the problem reports that took care of the issue and they can download successfully. For whatever reason I guess 20 was too short for their internet connection.