Jump to content

Search the Community

Showing results for tags 'ics'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 25 results

  1. The patch below suggests fixes for 7 memory leaks in OverbyteIcsWSocket.pas. They surfaced after the OverbyteIcsSslWebServ.dpr sample project was linked against YuOpenSSL. A total of > 10k memory allocations reported not freed, adding up to > 500k bytes of leaked memory. The leaks were easy to spot because YuOpenSSL does not use the OpenSSL DLLs but compiles all OpenSSL code into the application binary. As a side effect, YuOpenSSL uses the Delphi memory manager and by default allows memory trackers to see OpenSSL memory allocations. Otherwise this does normally not happen when the OpenSSL DLLs employ their own memory management. The leaks then sum up in the DLLs' memory space, and out of sight of Delphi's memory trackers. For anyone who would like to test their ICS applications for memory leaks with YuOpenSSL, here is the link: https://www.yunqa.de/delphi/products/openssl/index Index: OverbyteIcsWSocket.pas =================================================================== --- OverbyteIcsWSocket.pas (revision 1492) +++ OverbyteIcsWSocket.pas (working copy) @@ -13933,7 +13933,8 @@ for I := 0 to Result - 1 do begin P := f_OPENSSL_sk_value(CertStack, I); if Assigned(P) then { V8.64 sanity test } - Add(f_X509_dup(PX509(P))); + // Add(f_X509_dup(PX509(P))); // ralfjunker fix memory leak. + Add(PX509(P)); // ralfjunker fix memory leak. end; end; @@ -14866,7 +14867,8 @@ OneErr := String(LastOpenSslErrMsg(FALSE)); OneErr := 'Error Cert ' + IntToStr(tot) + ' - ' + OneErr; end; - end; + // end; ralfjunker fix memory leak. + end else f_BIO_free(MemBio); // ralfjunker fix memory leak. // ignore private keys and other stuff if OneErr <> '' then begin @@ -17369,7 +17371,8 @@ procedure TX509Base.FreeAndNilX509Inters; { V8.41 } begin if Assigned(FX509Inters) then begin - f_OPENSSL_sk_free(FX509Inters); + // f_OPENSSL_sk_free(FX509Inters); // ralfjunker fix memory leak. + f_OPENSSL_sk_pop_free(FX509Inters, @f_X509_free); // ralfjunker fix memory leak. FX509Inters := nil; end; end; @@ -18334,7 +18337,10 @@ // pending, search stack for server certificate, might not be first { first in stack is server certificate } - SetX509(PX509(f_OPENSSL_sk_delete(MyStack, 0))); + // SetX509(PX509(f_OPENSSL_sk_delete(MyStack, 0))); // ralfjunker fix memory leak. + x := PX509(f_OPENSSL_sk_delete(MyStack, 0)); // ralfjunker fix memory leak. + SetX509(x); // ralfjunker fix memory leak. + f_X509_free(x); // ralfjunker fix memory leak. { remaineder are intermediates } if (TotInfo > 1) and (IncludeInters > croNo) then begin @@ -19394,7 +19400,8 @@ begin result := '' ; if not Assigned(X509) then Exit; - pubkey := f_X509_get_pubkey(X509); + // pubkey := f_X509_get_pubkey(X509); // ralfjunker fix memory leak. + pubkey := f_X509_get0_pubkey(X509); // ralfjunker fix memory leak. Result := GetKeyDesc(pubkey); end; @@ -19500,17 +19507,27 @@ {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TX509Base.LoadIntersFromPemFile(const FileName: String); { V8.41 } +var // ralfjunker fix memory leak. + x: PStack; // ralfjunker fix memory leak. begin InitializeSsl; - SetX509Inters(IcsSslLoadStackFromInfoFile(FileName, emCert)); + // SetX509Inters(IcsSslLoadStackFromInfoFile(FileName, emCert)); // ralfjunker fix memory leak. + x := IcsSslLoadStackFromInfoFile(FileName, emCert); // ralfjunker fix memory leak. + SetX509Inters(x); // ralfjunker fix memory leak. + f_OPENSSL_sk_free(x); // ralfjunker fix memory leak. end; {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TX509Base.LoadIntersFromString(const Value: String); { V8.41 } +var // ralfjunker fix memory leak. + x: PStack; // ralfjunker fix memory leak. begin InitializeSsl; - SetX509Inters(IcsSslLoadStackFromInfoString(Value, emCert)); + // SetX509Inters(IcsSslLoadStackFromInfoString(Value, emCert)); // ralfjunker fix memory leak. + x := IcsSslLoadStackFromInfoString(Value, emCert); // ralfjunker fix memory leak. + SetX509Inters(x); // ralfjunker fix memory leak. + f_OPENSSL_sk_free(x); // ralfjunker fix memory leak. end;
  2. Hi, I use THttpCli component (ICS v8.61) for downloading files. It works well in many case, but when I try pass a parameter with space (encoding with "+" or "%20") I have the error 400 Bad Request Why? What can I do? PS: if I put the url in a browser, the request is successful text/html; charset=iso-8859-1 => CONSEGNA Attestazione avvenuta pubblicazione avviso selezione infermiere.eml Location = http://192.168.2.221/cbadoc/upload/2019/08/14/CONSEGNA Attestazione avvenuta pubblicazione avviso selezione infermiere.eml URL = http://192.168.2.221/cbadoc/download.php?file=CONSEGNA+Attestazione+avvenuta+pubblicazione+avviso+selezione+infermiere.eml&id=20878&liv1=2019&liv2=08&liv3=14 Document = CONSEGNA Attestazione avvenuta pubblicazione avviso selezione infermiere.eml RequestDone, no error. Status = 400 Request Failed ! StatusCode = 400 ReasonPhrase = Bad Request
  3. How to send files to an API using TSslHttpRest? In Postman I can, this is the http code: POST /api/br-invoice-integration/v1/batches HTTP/1.1 Host: qed.onvio.com.br Accept: application/json Authorization: Bearer 42dc0b99-2d17-4898-9c85-0b52ae364c63Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file[]"; filename="/C:/MyFile.xml" Content-Type: text/xml (data) ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="query" {"boxe/File":true} ----WebKitFormBoundary7MA4YWxkTrZu0gW With SslHttpRest, I'm trying to SendStream, like that (similar to the sample OverbyteIcsHttpPost1): FileName := 'C:\MyFile.xml'; RandBoundary := '-----------------------------' + IntToHex(Random(MaxInt), 8) + IntToHex(Random(MaxInt), 8); SslHttpRest1.ContentTypePost := 'multipart/form-data; boundary=' + RandBoundary; Header := RandBoundary + #13#10 + 'Content-Disposition: form-data; name="file[]"; filename="' + 'MyFile.xml' + '"' + #13#10 + 'Content-Type: text/xml' + #13#10 + #13#10; Footer := RandBoundary + #13#10 + 'Content-Disposition: form-data; name="query"' + #13#10 + #13#10 + '{"boxe/File":true}' + #13#10 + RandBoundary + #13#10; SslHttpRest1.SendStream := TMultiPartFileReader.Create(Filename, Header, Footer); SslHttpRest1.SendStream.Position := 0; SslHttpRest1.RestRequest(httpPOST, Myurl); But it doesn't work, just get error: Request completed: 500 Request done, StatusCode #500 {"error":{"code":500,"errors":[],"message":"HTTP 400 Bad Request"}} Has anyone ever needed to do something similar, would this be the way? If anyone can help, I appreciate it.
  4. Hello Community, since last week I have been trying to let a TsslWSocket and a TsslWSocketServer communicate with each other. I want to get a long-term stable connection between a TCP client and a TCP server that is secured with TLS1.3. However, after a runtime of a few minutes, the data transfer breaks down. There is a client thread and a server thread. In the respective Execute method I create the socket and initialize it, call Listen (server) or Connect (client) and run the MessageLoop. After a successful SSL handshake, my client sends 128KB data packets to the server. The data arrives at the server, TwSocketClient.onDataAvailable is triggered, the bytes can be read there with TwSocketClient (Sender).Receive (pBuffer ...). When the server has received 128KB, it sends an "ACK" packet to the client (An AnsiString "ACK", 3 bytes). When the client receives the packet, it sends again 128KB of testdata. This works a few thousand, sometimes some tenthousands times, until TwSocketClient.onDataAvailable is suddenly no longer called. There is no OnSessionClosed, no onError, no onException and also no onBgException that would indicate a problem. Apparently the problem is on the client side: A running Wireshark shows an [ACK] packet from the server to the client as last entry. Further clicks on the "Manual Send" button do not lead to any further lines in the Wireshark log. When this state has been reached another client can connect to the server without any problems, so the server is not completely dead. I have no idea what I could do wrong ... Maybe it's not ok to send in the context of another thread? But how is that supposed to work when the client thread is blocked by the MessageLoop? Simultaneous web browsing leads to the problem faster. When I look at any website, it usually takes less than half a minute to see the problem. My test project is attached. I would be interested to know if you have observed the same problem and if anyone has a guess as to what might be the cause ... The project is complete, the Win32 folder also contains the certificate used for testing ... Usage: Enter your own IP address, press the "btCreateStart" button, then the "btSendData Manual Send" button. The "logICStest.log" file in the program directory grows until the problem occurs ... Thanks in advance... P.S: I have already tried not to send after receiving the ACK packet, but cyclically via timer or thread. If you can select both in the test project with checkboxes, the result is the same. The problem does not only occur with TLS1.3, also with TLS1.2. I even think it shows up without encryption, just takes longer ... I crossposted this in the german Delphi-Praxis in german language (https://www.delphipraxis.net/205223-stabile-tcp-verbindung-mit-ics-ich-kriegs-nicht-hin.html)... Test Overbyte ISC Client und Server.7z
  5. f_CRYPTO_get_ex_data should return Pointer, not Integer. The code in question is at OverbyteIcsLIBEAY.pas line 1847, SVN 1476: f_CRYPTO_get_ex_data: function(r: PCRYPTO_EX_DATA; idx: integer): integer; cdecl = Nil; The corresponding C declaration from OpenSSL's crypto.h: void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx); Suggested solution: f_CRYPTO_get_ex_data: function(r: PCRYPTO_EX_DATA; idx: integer): Pointer; cdecl = Nil; Reference: https://www.openssl.org/docs/man1.1.1/man3/CRYPTO_get_ex_data.html Ralf
  6. EVP_PKEY_paramgen() pkey should be a double pointer parameter. OverbyteIcsLIBEAY.pas line 1752, SVN 2063: f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; pkey: PEVP_PKEY): Integer; cdecl = Nil; Notice the two ** asterisks in the OpenSSL's evp.h C declaration: int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); Possible fixes: { More C like: Better if ppkey may be nil. } f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; ppkey: PPEVP_PKEY): Integer; cdecl = Nil; { More Pascal like. Notice that nil cannot be passed this way. } f_EVP_PKEY_paramgen: function(pctx: PEVP_PKEY_CTX; var pkey: PEVP_PKEY): Integer; cdecl = Nil; Reference: https://www.openssl.org/docs/man1.1.1/man3/EVP_PKEY_paramgen.html Ralf
  7. At the time of this writing, TCryptoExNewFunc is declared as a function while it should be a procedure. OverbyteIcsLIBEAY.pas line 1752, SVN 1476: TCryptoExNewFunc = function(parent: Pointer; ptr: Pointer; ad: PCRYPTO_EX_DATA; idx: integer; argl: DWord; argp: Pointer): Integer; cdecl; This is the corresponding C declaration from OpenSSL's crypto.h, documented here: https://www.openssl.org/docs/man1.1.1/man3/CRYPTO_EX_new.html typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); This is the Pascal translation matching the C declaration: TCryptoExNewFunc = procedure(parent: Pointer; ptr: Pointer; ad: PCRYPTO_EX_DATA; idx: integer; argl: DWord; argp: Pointer); cdecl; Ralf
  8. In OverbyteIcsWSocket.pas, PunyServerName is always filled with 8-bit data, even if it is a 16-bit UnicodeString on Unicode Delphis. This happens in OverbyteIcsWSocket.pas line 15916 (SVN 1469): Move(DataExt[5], Ws.FCliHelloData.PunyServerName[1], Slen); The line above works well with non Unicode Delphis, but copies incorrect data in Unicode enabled Delphis. Cause is the declaration of PunyServerName (line 3488): TClientHelloData = record ServerName: String; PunyServerName: String; // <-- Problem here. ... Later on, this results in incorrect conversion to ServerName. See that the OverbyteIcsSslWebServ demo outputs garbled SNI and Server Name instead of localhost: HTTPS Server is waiting for connections https://localhost/demo.html HTTP Server is waiting for connections http://localhost/demo.html [10:17:36 127.0.0.1] SNI "潬慣桬獯t Client Hello: Server Name: 潬慣桬獯t [10:18:15 127.0.0.1] SNI "潬慣桬獯t Client Hello: Server Name: 潬慣桬獯t A quick remedy is to declare PunyServerName as AnsiString and work around the warning "OverbyteIcsWSocket.pas(15968): W1057 Implicit string cast from 'AnsiString' to 'string'", possibly be adding a typecast. TClientHelloData = record ServerName: String; PunyServerName: AnsiString; // <-- 8-bit string, even in Unicode Delphis. ... Ralf
  9. OverbyteIcsLIBEAY.pas line 1994 (SVN 1469) declares f_EVP_DigestSignInit() like this: f_EVP_DigestSignInit: function(ctx: PEVP_MD_CTX; pctx: PEVP_PKEY_CTX; etype: PEVP_MD; impl: PEngine; pkey: PEVP_PKEY): Integer; cdecl = Nil; In Pascal, pctx is a single pointer, but C declares pctx as a double pointer: int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); Following nearby declarations, Pascal should probably change pctx to a var parameter. Reference: https://www.openssl.org/docs/man1.1.1/man3/EVP_DigestSignInit.html Ralf
  10. Dear All, I need to fill two fields in a form and then submit it. As I'm not well versed in this area, I come here and for some guidance. The page where they sit is coded as follows: <html> <body> <form id="form1" name="form1" action="envia_arq2.php" method="post"> Senha: <input TYPE="password" NAME="senha" SIZE="12"><br /><br /> Seu nome: <input TYPE="text" NAME="nome" SIZE="12"> <input name="enviar" type="submit" value="Enviar"> </form> </body> </html> This is a FMX application, so I can't use TWebBrowser as I've found in several articles in the internet. Furthermore, even the VCL version I couldn't make work, after navigating to the page the Document property is nil, making it impossible to retrieve the fields as indicated in those articles. I then moved on to ICS TSslHttpCli, tried a few basic things, but I came up empty on the very first attempt where I just set the URL (https://www.trivial.com.br/envia_arq2.htm) and did a GET to try and see how to proceed from there. An exception is raised signaling a missing SSL Context. Perhaps this is not the way to go. Could you please kindly share some light on this? Thanks in advance. -- Carlos
  11. Samples\Delphi\SslInternet\OverbyteIcsHttpsServer1.pas line 415 has a reference to OverbyteIcsWSocket.SslWSocketCopyRight which does not exist: Display(' ' + Trim(OverbyteIcsWSocket.SslWSocketCopyRight)); As a result, the OverbyteIcsHttpsServer1.pas unit does not compile. Ralf
  12. OverbyteIcsWSocket.pas has at least one small memory leak. In line 17009 (SVN 1464), an X509Obj is duplicated before its is added to the list. However, TX509Base.Create() duplicates the duplication once more before TX509List.Add() stores it to the list. The first duplicated object is never freed, resulting in the leak. This is the line in question: CertList.Add(f_X509_dup(f_X509_OBJECT_get0_X509 (MyX509Obj))); The fix is to remove f_X509_dup(), so the line looks like this: CertList.Add(f_X509_OBJECT_get0_X509 (MyX509Obj)); Code analysis suggests that a similar leak is present in line 15012, but I have not been able to trigger this code running one of the Sample projects: Cert.AddToInters(f_X509_dup(f_X509_OBJECT_get0_X509 (MyX509Obj))); Ralf
  13. OverbyteIcsLIBEAY.pas line 2336 (SVN 1464) declares f_X509_check_ip_asc() like this: f_X509_check_ip_asc: function(Cert: PX509; Paddress: PAnsiChar; namelen: size_t; flags: Cardinal): Integer; cdecl = nil; This is different from the OpenSSL definition. The Pascal declaration has an extra namelen parameter not present in the C header: int X509_check_ip_asc(X509 *, const char *address, unsigned int flags); Reference: https://www.openssl.org/docs/man1.1.1/man3/X509_check_ip_asc.html Ralf
  14. OverbyteIcsSSLEAY.pas line 2160 (SVN 1464) declares f_SSL_set_msg_callback() to use a TProto_msg_cb callback. TProto_msg_cb is defined in line 1270 as a function: TProto_msg_cb = function (write_p, version, content_type: integer; buf: PAnsiChar; size_t: integer; ssl: PSSL; arg: Pointer): Integer; cdecl; { V8.40 handshake protocol message callback } This is different from the OpenSSL definition. The C header declares the callback as a procedure which does not return a value (void): void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); Reference: https://www.openssl.org/docs/man1.1.1/man3/SSL_set_msg_callback.html Ralf
  15. OverbyteIcsSSLEAY.pas line 2097 (SVN 1464) declares f_SSL_clear() like this: f_SSL_clear: procedure(S: PSSL); cdecl = nil; This is different from the OpenSSL definition. The Pascal declaration is a procedure, but the C declaration a function with an Integer return value: int SSL_clear(SSL *ssl); Reference: https://www.openssl.org/docs/man1.1.1/man3/SSL_clear.html Ralf
  16. OverbyteIcsSSLEAY.pas line 2095 (SVN 1464) declares f_SSL_bytes_to_cipher_list() like this: f_SSL_bytes_to_cipher_list: function(s: PSSL; cbytes: PAnsiChar; len: size_t; isv2format: Boolean; sk, scvsvs: PSTACK_OF_SSL_CIPHER): LongInt; cdecl = nil; { V8.64 } This is different from the OpenSSL definition. The Pascal declaration passes sk and scvsvs as simple pointers, instead of pointer addresses or var parameters. In contrast, the C header uses a double pointer for both parameters: int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len, int isv2format, STACK_OF(SSL_CIPHER) **sk, STACK_OF(SSL_CIPHER) **scsvs); Reference: https://www.openssl.org/docs/man1.1.1/man3/SSL_bytes_to_cipher_list.html Ralf
  17. I am using ICS TSslFTPServer (FtpSslType=ftpAuthTls,ftpAuthSsl) and TSslWSocketServer (SslEnable=True) on my Server side application along with TSslContext wherein I am pointing to SslPrivKeyFile and SslCertFile to your sample 01key.pem and 01cert.pem respectively. My Client Application connects and all is well. problem-1) If I try to change the certificates to another of your provided examples or If I build with OpenSSL it gives error 'Can't read certificate file ... error:0909006C:PEM routines:get_name:no start line' problem-2) Using SSL I lose compatibility with WinXP and probably with Vista too. Is there a workaround ? (Angus has suggested me to use the IcsHosts property instead of SslContext but I will need to do more work to get it working for me, hope I am using above mentioned components properly to begin with SSL) (How I generated my own PEM files openssl genpkey -aes256 -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out 01key.pem openssl pkey -in 01key.pem -out 01cert.pem -pubout)
  18. I am using TSslFtpServer , TSslWSocketServer along with TSSLContext component successfully when using the SslCAFile , SslCertFile and SslPrivateKeyFile properties to point to files on the Hard Disk. I noticed there are matching SslCALines , SslCertLines and SslPrivateKeyLines . I filled these properties with text from the corresponding files but it did not work. I am asking this because I would prefer not to expose the Certificate files.
  19. AllanF

    Some assistance on SSL required

    Hi, I am using ICS TFTPServer and TWSocketServer on my Server side application (Delphi Seattle). I want to use SSL to secure the connections. This question is more related to SSL rather than ICS. I have read on SSL and checked the Demo programs too. I yet need some clarity. Mine is a backup application and will be sending critical data over the WAN. If I generate my own certificates via OpenSSL where do I keep the PEM files for the ICS Server components to access ? Should I generate a different PEM file per customer upon installation or can I supply a common one ? I files are large can I have only password exchanged secretly and data without encryption (My data is already compressed with AES ) ? Regards Allan (Thanks for all the new features in ICS)
  20. Can someone help me? We are having a bug (access violation) with SSL (HTTPS support) only in 64bits. My current Overbyte ICS version is 8.63. The bug is attached image. {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { V8.57 convert wire-format concactanted length prefixed strings to TStrings } function IcsWireFmtToStrList(Buffer: TBytes; Len: Integer; SList: TStrings): Integer; var offset, mylen: integer; AStr: AnsiString; begin Result := 0; if NOT Assigned(SList) then Exit; SList.Clear; offset := 0; while offset < Len do begin mylen := Buffer[offset]; if mylen = 0 then Exit; // illegal offset := offset + 1; SetLength(AStr, mylen); Move(Buffer[offset], AStr[1], mylen); SList.Add(String(AStr)); offset := offset + mylen; end; Result := Slist.Count; end;
  21. AllanF

    OverbyteIcsSslFtpTst not connecting

    Hi , I am not able to connect to a SSL site with OverbyteIcsSslFtpTst.exe whereas with FileZilla it connects. 'Test.Rebex.Net' allows us to test SSL FTP site. OverbyteIcsSslFtpTst.exe connects to the non-SSL site and gives me directory list, whereas with SSL it does not connect. I have copied libcrypto-1_1 and libssl-1_1 in Exe folder too. I have compiled with Delphi Seattle. With SSL port 990 Executing Requested Command ! Init SSL failed Access violation at address 0062E467 in module 'OverbyteIcsSslFtpTst.exe'. Read of address 00000040 Session Closed, error = 0 Request 12 Done. StatusCode = 550 LastResponse was : '550 Access violation at address 0062E467 in module 'OverbyteIcsSslFtpTst.exe'. Read of address 00000040' Error = 550 (550 Access violation at address 0062E467 in module 'OverbyteIcsSslFtpTst.exe'. Read of address 00000040) Command Failure Without SSL port 21 Executing Requested Command < 220 Microsoft FTP Service Session Connected, error = 0 > USER demo < 331 Password required for demo. > PASS password < 230 User logged in. > CWD / < 250 CWD command successful. > PASV < 227 Entering Passive Mode (195,144,107,198,4,9). ! Passive connection requested to: 195.144.107.198:1033, control channel: 195.144.107.198 > NLST *.* < 150 Opening ASCII mode data connection. < 226 Transfer complete. ! 12bytes received/sent in 203 milliseconds > QUIT < 221 Goodbye. Session Closed, error = 0 Request 12 Done. StatusCode = 226 LastResponse was : '226 Transfer complete.' No error Command Success
  22. Hello, I am trying to get data from a page and am getting error "206", the only detail is a "Authorization: Bearer" header. I'm entering the header in event "BeforeHeaderSend" Headers.Add('Authorization:Bearer ' + mToken.Text); HttpCliSusp.Connection := 'Keep-Alive'; HttpCliSusp.ContentTypePost := 'application/json;charset=UTF-8'; HttpCliSusp.RequestVer := '1.0'; HttpCliSusp.RcvdStream := TMemoryStream.Create; HttpCliSusp.URL := 'https://www.url-to-get.com'; HttpCliSusp.Get; i get HttpCliSusp.StatusCode = 206 Using the Indy component "TIdHttp" I get the content normally without error! IdHttp.Request.CustomHeaders.Add('Authorization:Bearer ' + mToken.Text); xHtmlRetorno := IdHttp.Get('https://www.url-get.com'); xHtmlRetorno comes content without errors. Where am I going wrong using the ICS TSslHttpCli component? Thanks!!!
  23. Hi, I use TSslFtpClient component for connecting to a server via SSL (TSL connections), and also TSslContext and TSslAvlSessionCache. I can connect and trasfer some file, but after a while (7/8 seconds, and about 145 files) the session (not the connection) closes, so I close also the connection and restart it. I would know if is it possible avoid expire the session and do a reconnect to the server. I have to transfer also thousands of file at a time Thanks in advance PS: if I try to copy many file with the OverbyteIcsXferTst1 example, that use TIcsFtpMulti, It give me "FTP Session Closed - Connection reset by peer (#10054)" after only having transferred 45 files
  24. Hi, I'm trying to build a webservice using Overbyte ICS THTTPAppServer component, i plan to run it as a windows service, i've setup the windows service but got problem when trying the AddGetHandler, the class to handle the request seems not recognized. It failed on line : 948 : TMyHttpHandler(Proc)(FLags); on file OverbyteIcsHttpAppServer.pas. It cause access violation. My Setup is the usual windows service template, and i run the HTTPAppServer on serviceStart event The webserver is working, i'm trying using the FHTTPServer.AddGetAllowedPath('/', afBeginBy); routine and it can handle the request Problem only when try to access the URLHandler. so is it possible to make HTTPAppServer as windows service? And how to setup it correctly Thank you
  25. I'm trying to receive UDP packets which are sent to a multicast group. I can see the packets being received in WireShark (dest ip = 225.255.255.255 dest port = 1120), and can receive the data using an example python script I found on the net, meaning that UDP multicast group and port are correct. I'm creating an UDP server like this: var UDPServer: TWSocketServer; begin UDPServer := TWSocketServer.Create(Self); UDPServer.Proto := 'udp'; UDPServer.Addr := '0.0.0.0'; UDPServer.Port := '1120'; UDPServer.MultiCast := true; UDPServer.ReuseAddr := true; UDPServer.MultiCastAddrStr := '225.255.255.255'; UDPServer.OnDataAvailable := OnUDPDataAvailable; UDPServer.Listen(); end; The OnUDPDataAvailable is never called, am I missing something here in setting the server up properly to listen for this group?
×