Jump to content

iddqd345

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Hi, I use HttpRest, but it uses HttpCli, so the question is about the latter. My program freezes after executing the GET request. As a result of the request, a JSON object is downloaded and the program freezes after that. To make sure that the problem is not in my code, I tried to repeat the error in OverbyteIcsHttpsTst.exe the result is the same . Unfortunately, I cannot provide access to this server for the test, and I understand that this greatly complicates the search for the problem. Here is a part of the log OverbyteIcsHttpsTst.exe, these lines with "TCustomSslWSocket.Do_FD_CLOSE error" are repeated in a loop indefinitely. It looks like there's some kind of problem with windows messages processing, but my knowledge is lacking here. 19:01:04:473 ProtoMsg: TLS 1.3 Handshake: New Session Ticket, State: SSLv3/TLS read server session ticket, Recv, DataLen: 391, Data= 040001830000012CAD664D34080000000000000001016E7E78006A32B910C63995E26ED8C34A6C6C886400B92837D931524BB9AFC3BB686B6C08B5478FE607E41E0C24A2B36B6FC73B68F3EBC9BA0E5B4318B88B4CC6FE95E86E6CC3E9864BA6FF73DE58CF321B4F1F43EFCCE759382480F1B2E6409B812CEEDD564F74017D2455F539812540FFB90450749767EC04F8C319A6CFBBDF60BBD01E0578C6B4A857D3AF582785C85C5ACD683D1E33D3FE9C72FD34509280239D0A8466EA6C3D305263C3E232428F09CCACD3A8460285B43C2B148E10C2A9BFF1833D0F919474EC58049B59CCE5DEAAA0E5FDBCBA1FF8C38443F448A158D004E62B81052A4739CE857CBE38E14612882B47EB2EE9AF23DAE4D80B367410E6048ADF63B40AD653413039C128FE721C1D429ADA2DEB00BB7752B8939C4B6C2E1706F2A2C21BBA756AC33F264BF852F65BCE2EB9C0F313651DCC8F32C4DD1B14F111E7214B5E982FBF1AB0DDD047628F1E545E3066A31785AD37EF5AA85AC22EE4A98BF178C9528AB35D142CB644DF0000 19:01:04:473 NSCB> New session created 19:01:04:473 0589E980 CliNewSessionCB [034849F0] Reused: False 19:01:04:473 0589E980 ICB> SSL_connect: SSLv3/TLS read server session ticket 19:01:04:551 ProtoMsg: TLS 1.2, State: SSL negotiation finished successfully, Recv, DataLen: 5, Data= 17030301C0 19:01:04:551 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:551 0589E980 *CloseCalled handle=1136, State=SSL negotiation finished successfully (TLS_ST_OK), Err=No error returned 19:01:04:551 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:551 ProtoMsg: TLS 1.3, State: SSL negotiation finished successfully, Recv, DataLen: 1, Data= 17 19:01:04:551 Data available. Len=431 19:01:04:598 End of header 19:01:04:598 State = httpWaitingBody 19:01:04:598 GetBodyLineNext begin 19:01:04:598 DocBegin 19:01:04:614 GetBodyLineNext FBodyDataLen=43 19:01:04:614 End of document 19:01:04:614 State = httpBodyReceived 19:01:04:614 DocEnd 19:01:04:614 GetBodyLineNext end 19:01:04:614 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:614 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:614 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:614 0589E980 SslInternalClose handle=1136 19:01:04:614 0589E980 TCustomSslWSocket.ShutDown 1 handle=1136 19:01:04:614 0589E980 SslInternalShutdown handle=1136 19:01:04:614 ProtoMsg: TLS 1.2, State: SSL negotiation finished successfully, Send, DataLen: 5, Data= 1703030013 19:01:04:614 ProtoMsg: TLS 1.2, State: SSL negotiation finished successfully, Send, DataLen: 1, Data= 15 19:01:04:614 ProtoMsg: TLS 1.3 Alert, Warning: Close Notify, State: SSL negotiation finished successfully, Send, DataLen: 2, Data= 0100 19:01:04:614 0589E980 ICB> SSL3 alert write warning close notify 19:01:04:614 0589E980 SslShutdownCompleted *0* handle=1136 19:01:04:614 State = httpReady 19:01:04:614 ProtoMsg: TLS 1.2, State: SSL negotiation finished successfully, Recv, DataLen: 5, Data= 1703030013 19:01:04:614 0589E980 SslShutdownCompleted *0* handle=1136 19:01:04:614 0589E980 TriggerSslShutDownComplete(0) 1136 19:01:04:614 0589E980 TCustomWSocket.Shutdown 1 handle=1136 19:01:04:614 0589E980 SslShutdownCompleted *1* handle=1136 19:01:04:614 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:614 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:614 RequestDone 19:01:04:692 ProtoMsg: TLS 1.3, State: SSL negotiation finished successfully, Recv, DataLen: 1, Data= 15 19:01:04:692 ProtoMsg: TLS 1.3 Alert, Warning: Close Notify, State: SSL negotiation finished successfully, Recv, DataLen: 2, Data= 0100 19:01:04:692 0589E980 ICB> SSL3 alert read warning close notify 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1 19:01:04:692 **data available. Len=-1 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 0589E980 TCustomSslWSocket.Do_FD_CLOSE error #0 handle=1136 19:01:04:692 Data available. Len=-1
  2. Hi, I need to send the following line in the request: S := 'aaa'+#29+'bbb' If I do this soNode.AsArray.s[0] := S; HttpRest.RestParams.AdditemSO('codes',soNode); then it is sent as 'aaa~bbb' If I escape myself: S := 'aaa\u001dbbb'; then the result: 'aaa\\u001dbbb' This is a strange result. Why does this happen? In TRestParams.AddItemSO, escaping when getting from ISuperObject is disabled: Items[Index].PValue := aValue.AsJson(false,false) { no indent, no escape } At the same time, in RestRequest: EncParams := AnsiString(IcsStrRemCntlsA(EncParams)); where "Source^ < IcsSpace" replaced with '~'. Yes, I found a solution: HttpRest.RestParams.AddItem('codes', soNode.AsJSon(False,true),True); but it doesn't look very logical when using SuperObject I don't understand the logic of not full escaping when using AddItemSO. In this case, when escape=False, in TSuperObject.Write DoMinimalEscape is executed instead of DoEscape, which escapes '\', but does not escape char < #32 Perhaps this is a mistake?
  3. It seems that I have found the reason for the slow startup - with {$DEFINE OpenSSL_Check_Signed} commented out, the program starts quickly. Probably, these computers have something wrong with the Magenta Systems Ltd. certificate chain. This is a local problem, and there is no need to rush to solve it. This solution with {$DEFINE OpenSSL_Check_Signed} suits me at the moment. Thanks for your help.
  4. Yes, it is, but it is worth a try. Win 2008 is still in use. And if I have to choose between reinstalling Windows and trying to solve the problem in the program, I will try the second option first.
  5. Yes, I tried that. Dont work. But I commented out {$DEFINE OpenSSL_AutoLoad_CA_Bundle}, and the program started to launch quickly. But now the first call to tsslHttpRest takes a long time. It turns out that the problem is in loading certificates. I'll think about it..
  6. Upd: When I commented out "{$DEFINE OpenSSL_Resource_Files}" - the program started to start up quickly, because it can't find the DLL and writes an error in the log. When I also commented out "{$DEFINE OpenSSL_ProgramData}" and put three OpenSSL DLLs into the program directory, the program started to run slowly again. Probably, I don't understand something
  7. The program with tsslHttpRest (ICS 9.3) starts up slowly, 30-40 seconds on some Windows 2008 under a user who is not an administrator. At the same time, it starts up normally under the administrator. If I give administrator rights to another user, it still starts up slowly under this user. This does not happen on all computers with Windows 2008, there are some on which it starts up quickly under any user. I tried to compare the installed system updates, service pack - everything is the same. I used Procmon.exe from Sysinternals to log the program startup. When comparing the logs, it is clear that during a long startup there are many requests to the system registry, which are not there if the program starts up quickly. When I commented out "{$DEFINE OpenSSL_Resource_Files}" - the program started to start up quickly. This is how I solved the problem for myself - I will download SSL files separately. I am attaching the Procmon logs of a quick and long startup of the program. I compared these files using the CompareIt! program. Admin.CSV User.CSV
×