Question:
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
This is fixed in v9.5.0.46 which is about to be released...
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).
Thats strange cause I've always used the percent upload... Since the recent version this has changed... Confused
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.
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.
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.
Hello, any news on this issue?
Best regards, Prâsad.