You are not logged in.
Pages: 1
I discovered that on some systems (our customers) client on WinHTTP get error:
EWinHTTP ("winhttp.dll error 87 (The parameter is incorrect)")
but WinINet client works properly, why?
Last edited by jaclas (2017-12-12 13:04:15)
Offline
btw You have doubled const defined:
Offline
I discovered that on some systems (our customers) client on WinHTTP get error:
but WinINet client works properly, why?
Never seen it in practice yet.
On which Windows version does it occur?
With which exact version of the framework (current is 1.18.4060)?
Offline
Windows 10 and latest mORMot.
Offline
I think that it's related with new win HTTP API units of websockets from @mpv
Esteban
Offline
Ok, I will collect this data on monday
Offline
Winhttp.dll have two constants definition in syncrtsock.pas: winhttpdll and winhttp_dll, I think that the problem Is there.
Esteban
Offline
I'm unable to debug something till 12.12.2017. On vacation without PC. May be I merge some constant incorrectly... But Original code from winhttp brunch work on production during many month. More details about problem required..
Offline
First report from customer:
14:20:44.20: System: Windows Vista SP2 (6.0.6002)
14:20:50.20: mORMot [ver.1.18.4061] client TSQLHttpClientWinHTTP test....
14:20:51.20: Trying connect to REST server ...
14:20:51.20: 20171211 13205102 + mORMotHttpClient.TSQLHttpClientWinHTTP(03A54630).CallBackGet Companies/Timestamp
14:20:51.20: 20171211 13205112 + mORMotHttpClient.TSQLHttpClientWinHTTP(03A54630).007F7FBC
mORMotHttpClient.TSQLHttpClientGeneric.InternalURI (525)
14:20:51.20: 20171211 13205122 EXC EWinHTTP ("winhttp.dll error 87 (Parametr jest niepoprawny)") at 00694735
SynCrtSock.RaiseLastModuleError (3656) stack trace API 00694735
SynCrtSock.RaiseLastModuleError (3656) 0069ACD5
SynCrtSock.TWinHTTP.InternalConnect (10025) 00699631
SynCrtSock.THttpRequest.Create (9423) 007F9CA8
mORMotHttpClient.TSQLHttpClientRequest.InternalCheckOpen (916) 007F7FCC
mORMotHttpClient.TSQLHttpClientGeneric.InternalURI (527) 007AB0BA mORMot.CallInternalURI (37775)
"Parametr jest niepoprawny" in polish mean "The parameter is incorrect"
Offline
@jaclas - I don't have a Windows Vista. If you can - please, debug a TWinHTTP.InternalConnect to determine a function what fail.
I see two potential error place:
- If you use a HTTPs the problem may be in TLS1.2 enabled in WINHTTP_FLAG_SECURE_PROTOCOL_MODERN flags
- if you use a proxy may be WinHttpAPI.Open fail because if incorrect OpenType option
But hard to say exactly without having access to environment where exception occurred
Offline
I don't have Vista, problem occurs on our customer station (I have access only to his log file).
Yes, I use SSL connection. I don't use proxy.
Offline
Can you comment a line in SynCrtSock
WINHTTP_FLAG_SECURE_PROTOCOL_MODERN: DWORD =
WINHTTP_FLAG_SECURE_PROTOCOL_SSL3
or WINHTTP_FLAG_SECURE_PROTOCOL_TLS1
//or WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 or WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2; <--- commented line
and check recompiled code on customer station?
Offline
Yes, you are right, I add more logs and problem occurs in line:
if not WinHttpAPI.SetOption(fSession, WINHTTP_OPTION_SECURE_PROTOCOLS,
@WINHTTP_FLAG_SECURE_PROTOCOL_MODERN, SizeOf(WINHTTP_FLAG_SECURE_PROTOCOL_MODERN)) then
RaiseLastModuleError(winhttpdll,EWinHTTP);
How resolve this issue?
Offline
After commented this line TWinHTTP client connect properly. And what now?
Offline
Fix committed - see [b0c526a5b9]. @jaclas- thanks for help with debugging
Offline
Pages: 1