Jump to content

xauxag

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Thanks, It works It is Chinese simplify
  2. Yes I am pretty sure it's a bug, I have debug into ICS and found the two function that caused failure of websocket connection , and am expecting fixing from more official way . I just a little time ago found it and am looking into those code , and not sure exact the correcting till now , so any suggestions are welcome
  3. Hi, Here may be a bug,would you please have a look?, unit: OverbyteIcsWebSocketCli.pas position: line 1494 ServerKey := Base64Encode(String(SHA1ofStr(s))); ------------ test: x3JJHMbDL1EzLkh9GBhXDw==258EAFA5-E914-47DA-95CA-C5AB0DC85B11 expect: HSmrc0sMlYUkAGmm5OPpG2HaGWk= output:HSmrc0sMlYUkAGmm5OPpG2E/aQ== ------------ test code: procedure TForm1.Button3Click(Sender: TObject); var s : AnsiString; ServerKey:string; begin s := AnsiString(edit1.Text); ServerKey := Base64Encode(String(SHA1ofStr(s))); memolog.Lines.Add(ServerKey); end; node.js - Base64 encoding for Sec-WebSocket-Accept value - Stack Overflow
  4. xauxag

    a icsv858 TSslHttpRest bug

    OK ,that's for your reply
  5. version icsv858 unit OverbyteIcsHttpProt procedure THttpCli.GetHeaderLineNext; Line 3056: if Field = 'location' then begin { Change the URL ! } I think is a bug, Based on https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201 The HTTP 201 Created success status response code indicates that the request has succeeded and has led to the creation of a resource. So with Fstatuscode = 201 , there can be a location line in the http header as a normal response Here is a example, when I send a post to the server,the server response with a location line, but it was taken as a redirection ,so ICS resend the post to the new llocation again : Connected to: api-fxtrade.oanda.com > POST /v3/accounts/001-004-********-002/orders HTTP/1.1 ... api-fxtrade.oanda.com SSL Connected OK with TLSv1.2, cipher DHE-RSA-AES256-GCM-SHA384, key auth RSA, key exchange DH, encryption AESGCM(256), message auth AEAD ... < HTTP/1.1 201 Created < Location: https://api-fxtrade.oanda.com/v3/accounts/001-004-******-002/orders/240 < RequestID: 42647542696837564 = https://api-fxtrade.oanda.com/v3/accounts/001-004-******-002/orders Redirected to: https://api-fxtrade.oanda.com/v3/accounts/001-004-******-002/orders/240 Connected to: api-fxtrade.oanda.com > POST /v3/accounts/001-004-******-002/orders/240 HTTP/1.1 ResponseRaw:{"errorMessage":"POST not allowed for endpoint."} I change the code to if (Field = 'location') and (FStatusCode <> 201) then begin { Change the URL ! } The reponse is OK So please check.
×