Question:
Hello, I am working with Http ActiveX in Visual FoxPro 9. Until two days ago my app was working fine but now it fail every time a download is attempted. No change in code, same target domain. I would appreciate any help to solve this issue. Component Log following:
ChilkatLog:
Download:
DllDate: Feb 28 2011
UnlockPrefix: JORGELHttp
Username: SOFT1:Carlos Jones
Architecture: Little Endian; 32-bit
Language: ActiveX
backgroundThread: 0
localFileAlreadyExists: 0
QuickGetToOutput_Download:
simpleHttpRequest_3:
httpMethod: GET
requestUrl: http://alpacel.com/soporte/desktop/repositorio/asignamov.dbf
Connecting to web server...
httpServer: alpacel.com
port: 80
ConnectTimeoutMs: 10000
calling ConnectSocket2
Connect using IPV4.
ai_protocol: 0
IPV4_retry:
dnsCacheLookup: alpacel.com
dnsCacheHit: 173.254.28.112
myIP_1: 192.168.2.206
myPort_1: 2860
connect successful.
connectElapsedMs: 109
-- BuildGetRequest --
Not auto-adding cookies.
sendElapsedMs: 0
StatusCode: 406
StatusText: Not Acceptable
Reading response body...
readResponseElapsedMs: 141
totalElapsedMs: 250
ContentLength: 226
Failed.
TIA. Carlos Jones.
First you should update to the latest version of the Chilkat component you are using, since your current version is quite old (2011).
If the problem persists after updating, HTTP 406 is a server returned error code indicating that the Acceptable Charset, Encoding, Language, and/or Ranges as submitted by the client can not be satisfied by the server. Since this worked before, it's possible that some server-side configuration has changed recently which is causing the request to fail now.
You will need to try some different combinations of Accept headers to see what works with the server now (or consult the server API documentation, or ask the server administrator for advice to see what Accept headers need to be fulfilled before your request can be satisfied by the server).