login about faq

When I use CkHttp::SynchronousRequest to POST a file with progress monitoring the PercentDone callback is never called. The callback works fine when I download a file. I guess it has something to do with "numValueBytes: 0" in the ChilkatLog?

Here is the verbose log:

    ChilkatLog:
  SynchronousRequest:
    DllDate: Nov 18 2013
    ChilkatVersion: 9.4.1.73
    UnlockPrefix: XXXXXXXXXX
    Username: XXXXXXXXXX
    Architecture: Little Endian; 32-bit
    Language: Visual C++ 12.0 (32-bit)
    VerboseLogging: 1
    domain: XXXXXXXXXX
    port: 443
    ssl: 1
    originallySetFromUrl: https://XXXXXXXXXX/api/SpeedTest
    httpRequest:
      httpVersion: 1.1
      verb: POST
      path: /api/SpeedTest
      contentType: multipart/form-data
      charset: windows-1252
      sendCharset: 0
      mimeHeader: 
      RequestParams:
        RequestItem:
          name: file1
          fileOnDisk: C:\Users\ra_000\AppData\Local\Temp\XXXXXXXXXX\UploadTest\data.bin
          numValueBytes: 0
        --RequestItem
      --RequestParams
    --httpRequest
    readTimeout: 300
    connectTimeout: 30
    fullRequest:
      findAddHttpConn:
        GetIEProxySetting:
          RegistryQueryError: The system cannot find the file specified.
          ValueName: ProxyServer
          Failed to get key value
          valueName: ProxyServer
          Failed to read registry: CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/ProxyServer
        --GetIEProxySetting
      --findAddHttpConn
      httpRequest:
        httpVersion: 1.1
        verb: POST
        path: /api/SpeedTest
        contentType: multipart/form-data
        charset: windows-1252
        sendCharset: 0
        mimeHeader: 
        RequestParams:
          RequestItem:
            name: file1
            fileOnDisk: C:\Users\ra_000\AppData\Local\Temp\XXXXXXXXXX\UploadTest\data.bin
            numValueBytes: 0
          --RequestItem
        --RequestParams
      --httpRequest
      HttpOptions:
        AddHostHeader: 1
        AllowCookieResponseCaching: 0
        AllowGzip: 1
        ConnectTimeoutMs: 30000
        CookieDir: 
        FollowRedirects: 1
        Login: 
        LoginDomain: 
        AuthMethod: 
        MaxResponseSize: 0
        MaxUrlLen: 2000
        PasswordLen: 0
        ProxyHostname: 
        ProxyLogin: 
        ProxyLogin: 
        ProxyAuthDomain: 
        ProxyPasswordLen: 0
        ProxyPort: 80
        ReadTimeoutMs: 300000
        RequiredContentType: 
        ResumePoint: 0
        SaveCookies: 1
        SendBufferSize: 1048576
        SendCookies: 1
        SslProtocol: 0
        UnavailableRetryCount: 0
        UnavailableRetryWaitMs: 2000
      --HttpOptions
      a_synchronousRequest:
        generateRequest:
          httpRequestGenStartLine:
            authOnly: 0
            hasMimeBody: 1
            genStartLine:
              startLine: POST /api/SpeedTest HTTP/1.1
            --genStartLine
          --httpRequestGenStartLine
          addCookies:
            Not auto-adding cookies.
          --addCookies
          addHostHeader: XXXXXXXXXX
          genMultipartFormData:
            requestParam:
              name: file1
              filename: C:\Users\ra_000\AppData\Local\Temp\XXXXXXXXXX\UploadTest\data.bin
            --requestParam
          --genMultipartFormData
          fullHttpRequest:
            domain: XXXXXXXXXX
            port: 443
            ssl: 1
            openHttpConnection:
              Opening connection to HTTP server.
              hostname: XXXXXXXXXX
              port: 443
              ssl: 1
              GetIEProxySetting:
                RegistryQueryError: The system cannot find the file specified.
                ValueName: ProxyServer
                Failed to get key value
                valueName: ProxyServer
                Failed to read registry: CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/ProxyServer
              --GetIEProxySetting
              connectSocket:
                domainOrIpAddress: XXXXXXXXXX
                port: 443
                connectTimeoutMs: 300000
                connect_ipv6_or_ipv4:
                  Multi-threaded domain to IP address resolution
                  resolveHostname6:
                    Resolving domain name (IPV4/IPV6)...
                  --resolveHostname6
                  AddrInfoList:
                    AddrInfo:
                      ai_flags: 0
                      ai_family: 2
                      ai_socktype: 1
                      ai_protocol: 0
                      ai_addrlen: 16
                      ai_canonname: (NULL)
                    --AddrInfo
                  --AddrInfoList
                  connecting to IPV4 address...
                  ipAddress: XXXXXXXXXX
                  connect:
                    Waiting for the connect to complete...
                    myIP: XXXXXXXXXX
                    myPort: 63368
                    socket connect successful.
                  --connect
                --connect_ipv6_or_ipv4
              --connectSocket
              Secure Channel Established.
              connectElapsedMs: 531
              HTTP connection succeeded.
            --openHttpConnection
            connectTime: Elapsed time: 531 millisec
            startLine: POST /api/SpeedTest HTTP/1.1
            requestHeader:
              requestHeader: Content-Type: multipart/form-data; boundary=------------020700080104050007010605
Host: XXXXXXXXXX
Content-Length: 256193
            --requestHeader
            sendRequestHeader:
              sendHeaderElapsedMs: 0
            --sendRequestHeader
            sendRequestBody:
              genMultipartFormData:
                requestParam:
                  name: file1
                  filename: C:\Users\ra_000\AppData\Local\Temp\XXXXXXXXXX\UploadTest\data.bin
                --requestParam
                sendBodyElapsedMs: 922
              --genMultipartFormData
              readResponseHeader:
                responseHeader: HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
X-Content-Type-Options: nosniff
Date: Mon, 03 Mar 2014 09:40:33 GMT
Content-Length: 0

              --readResponseHeader
              statusCode: 200
              statusText: OK
              readResponseBody:
                contentLength: 0
              --readResponseBody
            --sendRequestBody
          --fullHttpRequest
        --generateRequest
        totalTime: Elapsed time: 1969 millisec
        Success.
      --a_synchronousRequest
    --fullRequest
  --SynchronousRequest
--ChilkatLog

asked Mar 03 '14 at 05:02

roan98dk's gravatar image

roan98dk
326192034

Perhaps I should add that the SendRate() callback is working fine, so it is only the current progress that does not appear to be working.

(Mar 06 '14 at 02:54) roan98dk

This is fixed in v9.5.0.46 which is about to be released...

link

answered Dec 03 '14 at 16:02

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

It appears to be working in 9.5.0.46 :-)

(Dec 10 '14 at 02:44) roan98dk

The percent-done progress monitoring for HTTP is based on the response. Unfortunately, the sending of the request, which in this case is an upload, is not hooked up for percent-done callbacks. This is on Chilkat's list of features: to hookup percent-done callbacks for the request-sending portion of an upload. Unfortunately, Chilkat is at this very moment undergoing a new version release (v9.5.0) and this cannot be addressed until after the new version release is complete (which may take a week or two).

link

answered Mar 06 '14 at 15:03

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

That is ok. Actually I've been using the upload progress for quite a while now, I just never noticed that only SendRate was working and that my progress bar was not incrementing. Since most of my uploads are quite small, it is not that critical, but of cause it should be addressed anyway.

(Mar 06 '14 at 15:19) roan98dk

Hi Matt, 9.5.0 was released quite a while ago, but this matter still does not seem to have been addressed!? What is the current status?

(Dec 03 '14 at 15:57) roan98dk

Thats strange cause I've always used the percent upload... Since the recent version this has changed... Confused

link

answered Jun 29 '14 at 22:14

Konnect's gravatar image

Konnect
1

Hello, I think there is a problem with version 9.5. I have 2 project, one with 9.5.39, and the other with 9.4.1 They use the very same code to upload via http synchronous request.

In the one using 9.4.1, the callback is fired, in the 9.5, it is not.

Please fix this. Best regards, Prâsad.

link

answered Jul 02 '14 at 03:40

Pr%C3%A2sad%20Ramassamy's gravatar image

Prâsad Ramassamy
1112

To understand the cause of the problem, information is required. The sources of information include the LastErrorText property (which can be made verbose via the VerboseLogging property), and the http.SessionLogFilename property -- to get an exact recording of the HTTP requests/responses.

link

answered Jul 02 '14 at 08:38

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Hello, here is the LastErrorText:

    ChilkatLog:
  SynchronousRequest:
    DllDate: May  8 2014
    ChilkatVersion: 9.5.0.39
    UnlockPrefix: ENDIREHttp
    Username: PRASAD-WIN8:prasad
    Architecture: Little Endian; 32-bit
    Language: .NET 4.5
    VerboseLogging: 1
    domain: replay.hec.fr
    port: 80
    ssl: 0
    httpRequest:
      httpVersion: 1.1
      verb: POST
      path: /services/files
      contentType: multipart/form-data
      charset: windows-1252
      sendCharset: 0
      mimeHeader: Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
      requestParams:
        requestItem:
          name: chunks
          value: 1
        --requestItem
        requestItem:
          name: chunk
          value: 0
        --requestItem
        requestItem:
          name: path
          contentType: application/octet-stream
          fileOnDisk: D:\Records\2014-06-25_103232\2014-06-25_103232.mp4
          numValueBytes: 104857600
        --requestItem
      --requestParams
    --httpRequest
    readTimeout: 120
    connectTimeout: 10
    fullRequest:
      httpRequest:
        httpVersion: 1.1
        verb: POST
        path: /services/files
        contentType: multipart/form-data
        charset: windows-1252
        sendCharset: 0
        mimeHeader: Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
        requestParams:
          requestItem:
            name: chunks
            value: 1
          --requestItem
          requestItem:
            name: chunk
            value: 0
          --requestItem
          requestItem:
            name: path
            contentType: application/octet-stream
            fileOnDisk: D:\Records\2014-06-25_103232\2014-06-25_103232.mp4
            numValueBytes: 104857600
          --requestItem
        --requestParams
      --httpRequest
      HttpOptions:
        AddHostHeader: 1
        AllowCookieResponseCaching: 0
        AllowGzip: 1
        ConnectTimeoutMs: 10000
        CookieDir: C:\ProgramData\\Multicam\\Core\\Publish\\Cookies\prasad_hecreplay
        FollowRedirects: 1
        Login: prasad_hecreplay
        LoginDomain: 
        AuthMethod: digest
        MaxResponseSize: 0
        MaxUrlLen: 2000
        PasswordLen: 14
        ProxyHostname: 
        ProxyLogin: 
        ProxyLogin: 
        ProxyAuthDomain: 
        ProxyPasswordLen: 0
        ProxyPort: 80
        ReadTimeoutMs: 120000
        RequiredContentType: 
        ResumePoint: 0
        SaveCookies: 1
        SendBufferSize: 65535
        SendCookies: 1
        SslProtocol: 0
        UnavailableRetryCount: 0
        UnavailableRetryWaitMs: 2000
      --HttpOptions
      a_synchronousRequest:
        generateRequest:
          httpRequestGenStartLine:
            authOnly: 0
            hasMimeBody: 1
            genStartLine:
              startLine: POST /services/files HTTP/1.1
            --genStartLine
          --httpRequestGenStartLine
          genHeaderSb:
            getMimeHeaderHttp:
              headerField: Accept-Encoding: gzip, deflate
              headerField: X-Requested-With: XMLHttpRequest
            --getMimeHeaderHttp
          --genHeaderSb
          addCookies:
            Auto-adding any accumulated cookies.
            CookieDir: C:\ProgramData\\Multicam\\Core\\Publish\\Cookies\prasad_hecreplay
            CookieDomain: replay.hec.fr
            CookiePath: /services/files
            LoadCookieJar:
              Path: /services/files
              GetDomainCookiesXml:
                CookieDir: C:\ProgramData\\Multicam\\Core\\Publish\\Cookies\prasad_hecreplay
                Domain: replay.hec.fr
              --GetDomainCookiesXml
            --LoadCookieJar
            AddingCookie: libcastmultimediacms=upsadf4u49bo61pp1evvt3vvo7
          --addCookies
          addHostHeader: replay.hec.fr
          genMultipartFormData:
            requestParam:
              name: chunks
            --requestParam
            requestParam:
              name: chunk
            --requestParam
            requestParam:
              name: path
              filename: D:\Records\2014-06-25_103232\2014-06-25_103232.mp4
            --requestParam
          --genMultipartFormData
        --generateRequest
        fullHttpRequest:
          domain: replay.hec.fr
          port: 80
          ssl: 0
          openHttpConnection:
            Using existing connection.
          --openHttpConnection
          connectTime: Elapsed time: 0 millisec
          startLine: POST /services/files HTTP/1.1
          requestHeader:
            requestHeader: Content-Type: multipart/form-data; boundary=------------060600070802080602090804
Accept-Encoding: gzip, deflate
X-Requested-With: XMLHttpRequest
Cookie: libcastmultimediacms=upsadf4u49bo61pp1evvt3vvo7
Authorization: Digest username="prasad_hecreplay", realm="Libcast", nonce="ade494652f28d6abb377e6c9df14bd0d", uri="/services/", algorithm="MD5", response="5a09a9981634d6134ca9dd36cb6b12ce", qop="auth", nc=00000001, cnonce="9a9296829c44e020", opaque="94619f8a70068b2591c2eed622525b0e"
Host: replay.hec.fr
Content-Length: 104857988
          --requestHeader
          sendRequestHeader:
            sendHeaderElapsedMs: 0
          --sendRequestHeader
          sendRequestBody:
            genMultipartFormData:
              requestParam:
                name: chunks
              --requestParam
              requestParam:
                name: chunk
              --requestParam
              requestParam:
                name: path
                filename: D:\Records\2014-06-25_103232\2014-06-25_103232.mp4
              --requestParam
            --genMultipartFormData
            sendBodyElapsedMs: 17766
          --sendRequestBody
          readResponseHeader:
            responseHeader: HTTP/1.1 201 Created
Date: Mon, 07 Jul 2014 08:56:54 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.4.28-1+deb.sury.org~precise+1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Api-Version: 2.5.10
Location: http://replay.hec.fr/services/file/2014_06_25_103232-mp4-2
Content-Length: 1699
Content-Type: application/xml; charset=utf-8

          --readResponseHeader
          statusCode: 201
          statusText: Created
          readResponseBody:
            contentLength: 1699
          --readResponseBody
        --fullHttpRequest
        success: 1
      --a_synchronousRequest
    --fullRequest
    totalTime: Elapsed time: 23547 millisec
    Success.
  --SynchronousRequest
--ChilkatLog

Best regards, Prâsad.

link

answered Jul 07 '14 at 05:03

Pr%C3%A2sad%20Ramassamy's gravatar image

Prâsad Ramassamy
1112

edited Jul 07 '14 at 05:13

Hello, any news on this issue?

Best regards, Prâsad.

link

answered Aug 22 '14 at 13:12

Pr%C3%A2sad%20Ramassamy's gravatar image

Prâsad Ramassamy
1112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186
×50
×22
×14
×7

Asked: Mar 03 '14 at 05:02

Seen: 2,312 times

Last updated: Dec 10 '14 at 02:44

powered by OSQA