Archived Forum Post

Index of archived forum posts

Question:

How to download non direct URL using HTTP ?

Jul 31 '13 at 12:04

Hi ,

 I ran the HTTP example of chilkat to download remote file. It works fine.
 Now my requirement is when I send a HTTP request to download a file.
  1. Server side it generates dynamically and doesn't store anywhere directly pass the file to HTTP request.

 when I do this manually it worked.

 But while programmatically. I got error.

 I am sending the chilkat log.

 **Log :**
    DequeuedMessageType: ServerHelloDone
            OK to ServerHelloDone!
            No client certificate required by the server.
            Encrypted pre-master secret with server certificate RSA public key is OK.
            Sending ClientKeyExchange...
            Sent ClientKeyExchange message.
            Sending ChangeCipherSpec...
            Sent ChangeCipherSpec message.
            Derived keys.
            Installed new outgoing security params.
            Sending FINISHED message..
            algorithm: aes
            keyLength: 128
            Sent FINISHED message..
            readIncomingTls_changeCipherSpec2:
              processTlsRecord:
                processChangeCipherSpec:
                  ccsProtocolType: 1
                --processChangeCipherSpec
              --processTlsRecord
            --readIncomingTls_changeCipherSpec2
            readIncomingTls_handshakeFinished2:
              processTlsRecord:
                processHandshake:
                  handshakeMessageType: HandshakeFinished
                  handshakeMessageLen: 0xc
                  processHandshakeMessage:
                    MessageType: HandshakeFinished
                    FinishedMsgLen: 12
                    Queueing Finished message.
                  --processHandshakeMessage
                --processHandshake
              --processTlsRecord
            --readIncomingTls_handshakeFinished2
            Dequeue the FINISHED message...
            Dequeued Finished message.
            Handshake completed successfully.
            Secure Channel Established.
            connectElapsedMs: 936
            -- BuildGetRequest --
            Not auto-adding cookies.
            Adding Basic Authentication Header
            login: xxxxxxxxx
            sendElapsedMs: 0
            StatusCode: 500
            StatusText: Internal Server Error
            contentLength: 673
            Reading response body...
            fetchSslResponseData2_2:
              No transfer-encoding header field.
              sslContentLength: 673
              extraLen: 673
              Already have entire response.
            --fetchSslResponseData2_2
            readResponseElapsedMs: 234
            Got connection:close header
          --simpleHttpRequest_3
        --qGet_1
      --QuickGetToOutput_Redirect

Answer

The HTTP error code is 500, which means that the problem is on the server-side - are you sure you are using the correct parameters for the API in your code? Maybe you could post your source code?


Answer

It's important to include the information at the beginning of the LastErrorText because it gives context to the remainder of the information. In this case, it's important to know the version of Chilkat used. If it's an older version, it could be an issue that my have already been solved by updating to the latest version.

I agree with jpbro though, a 500 Server Internal Error points to a problem on the server-side. (Which doesn't necessarily mean that's where the source of the problem lies, but it just points in that direction and one would think it's more probable that the cause is on the server-side.)