Author Topic: Error downloading files  (Read 1073 times)

pgrooff

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Error downloading files
« on: November 18, 2017, 05:48:14 AM »
I am using VS Express 2013 and ChilkatVersion: 9.5.0.55.

Downloading the first file (plain text) is ok, but the 2nd (image) fails.
When I load the 2nd one directly using Chrome it is ok.

Code: [Select]
success = http.Download("http://piet.grooff.eu/license.txt", localFilePath);
success = http.Download("https://lh3.ggpht.com/p/AF1QipPSOaD46w834UEJdBfyblSVdFPQBFR3d6zHs4p8=x0-y0-z4", localFilePath);

I am getting following error text using following code:
Code: [Select]
CkString ErrorText;
ErrorText = http.lastErrorText();
if (debug) printCkString("Download error http.Download. Http.lastErrorText(): ", ErrorText);

Download error http.Download. Http.lastErrorText(): ChilkatLog:
  Download:
    DllDate: Dec 29 2015
    ChilkatVersion: 9.5.0.55
    UnlockPrefix: WABGROHttp
    Username: LENOVO-PC:Pim
    Architecture: Little Endian; 64-bit
    Language: Visual C++ 12.0 / x64
    VerboseLogging: 0
    url: https://lh3.ggpht.com/p/AF1QipPSOaD46w834UEJdBfyblSVdFPQBFR3d6zHs4p8=x0-y0-z4
    toLocalPath: C:\Users\Pim\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\Streetview4DHdr\hdr.tmp
    currentWorkingDir: C:\Program Files\MAXON\CINEMA 4D R17
    a_httpDownload:
      httpDownloadFile:
        localFilePath: C:\Users\Pim\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\Streetview4DHdr\hdr.tmp
        localFileAlreadyExists: 1
        quickHttpRequest:
          httpVerb: GET
          url: https://lh3.ggpht.com/p/AF1QipPSOaD46w834UEJdBfyblSVdFPQBFR3d6zHs4p8=x0-y0-z4
          openHttpConnection:
            Opening connection directly to HTTP server.
            httpHostname: lh3.ggpht.com
            httpPort: 443
            ssl: 1
            socket2Connect:
              connect2:
                connectImplicitSsl:
                  clientHandshake:
                    clientHandshake2:
                      readHandshakeMessages:
                        Failed to read beginning of SSL/TLS record.
                      --readHandshakeMessages
                    --clientHandshake2
                  --clientHandshake
                  Client handshake failed. (3)
                --connectImplicitSsl
                ConnectFailReason: 103
              --connect2
            --socket2Connect
            connect: Socket connection closed.
          --openHttpConnection
        --quickHttpRequest
        outputLocalFileSize: 0
        numOutputBytesWritten: 0
        httpDownloadFile failed.
      --httpDownloadFile
      a_httpDownload failed.
    --a_httpDownload
    totalElapsedMs: 3000
    Failed.
  --Download
--ChilkatLog

pgrooff

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Error downloading files
« Reply #1 on: November 18, 2017, 06:07:29 AM »
I added http.put_SslProtocol("TLS 1.0 or higher"); but that  did not help.

Chilkat

  • Administrator
  • Full Member
  • *****
  • Posts: 103
  • Karma: +7/-0
    • View Profile
Re: Error downloading files
« Reply #2 on: November 18, 2017, 12:14:46 PM »
Update to the latest version of Chilkat.

As the years go by, the external world changes.  Protocol versions are updated, new protocol features are introduced, old protocol features become deemed insecure, and as servers are updated new requirements might come into effect.  Chilkat keeps pace with these developments.  It's likely that updating to the latest version of Chilkat will resolve the problem.

In general, I believe that any software that communicates with anything over the Internet cannot remain static for many years. 

pgrooff

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Error downloading files
« Reply #3 on: November 19, 2017, 08:27:26 AM »
Sorry, I should have done that in the first place.
It works, thanks.