Jump to content

drazde

Members
  • Content Count

    14
  • Joined

  • Last visited

Everything posted by drazde

  1. 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
  2. I have update ICS component with the latest (v8.65), I use UTF8Encode and then IcsUrlEncode (on the filename parameter the other are merely numbers) but nothing... I remain the better solution is pass the parameters in post (not in get like now), so I think I will talk with my colleague for change it. Thanks for your answers
  3. I know, this isn't a good solution, but with TDownloadURL component I don't have this problem in this cases.... I use this component only for downloading file that have params with space and all other with THttpCli. I don't want use always TDownloadURL because it have many other problems...
  4. 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
  5. Ok, the components works well, it is a problem of Windows Firewall, I resolved managing the unwanted session closed and reopening the connection (like FileZilla does)
  6. [UPDATE] I found this post: https://www.experts-exchange.com/questions/29124840/Socket-error-10054-during-ftp-session.html So I try to disable the Windows Firewall and my problem are solved! Now I have to find a correct rule to add at Windows Firewall...
  7. Ok, thank you so much for help me, I'm not expert with SSL and FTP, so I don't know if I do all the right operations. Sometimes happen that the session will close after a while, sometimes happen connection close when try to do some command (example: "Failed to change dir: 500 Control connection closed - Winsock - Connection reset by peer (#10054)". I will try to test the copy with other client
  8. I use this pice of code for manage the SSL Session, and I use the latest release of ICS 8.61 procedure TForm1.FTPSslCliGetSession(Sender: TObject; var SslSession: Pointer; var FreeSession: Boolean); begin SslSession := SslAvlSessionCache1.GetCliSession(FTP.HostName + FTP.Port, FreeSession); end; procedure TForm1.FTPSslCliNewSession(Sender: TObject; SslSession: Pointer; WasReused: Boolean; var IncRefCount: Boolean); begin if (not WasReused) then begin SslAvlSessionCache1.CacheCliSession(SslSession, FTP.HostName + FTP.Port, IncRefCount); end end;
  9. With TIcsFtpMulti , I have problem after only 45 files, this is the log (the last lines) of the sample project. 15:51:51:465 Upload OK: C:\CBA\Cartella Socio Sanitaria\ServizioAS\TestCopiaFTP\CopiaInFtp\ArchiviazioneSostitutiva\ARSENIO LUPIN-3454\MUST.pdf, size: 254 Kbytes, duration 0, average speed 0/sec 15:51:51:466 > MFMT 20190715092158 must.pdf 15:51:51:467 < 213 Modify=20190715092158; must.pdf 15:51:51:467 Check Exists C:\CBA\Cartella Socio Sanitaria\ServizioAS\TestCopiaFTP\CopiaInFtp\ArchiviazioneSostitutiva\ARSENIO LUPIN-3454\MUST.xml 15:51:51:467 Uploading File 63 of 839, C:\CBA\Cartella Socio Sanitaria\ServizioAS\TestCopiaFTP\CopiaInFtp\ArchiviazioneSostitutiva\ARSENIO LUPIN-3454\MUST.xml to /archiviazionesostitutiva/arsenio lupin-3454/must.xml, size 1,38 Kbytes 15:51:51:467 > MLST MUST_xml 15:51:51:469 < 550 'MUST_xml' non può essere interrogato 15:51:51:469 MLST Failed with Status 550 - 550 'MUST_xml' non può essere interrogato 15:51:51:469 > MDTM MUST_xml 15:51:51:470 < 550 MUST_xml: File o directory non esistente 15:51:51:470 MDTM Failed with Status 550 - 550 MUST_xml: File o directory non esistente 15:51:51:672 > PASV 15:51:51:673 < 227 Entering Passive Mode (192,168,10,198,147,175). 15:51:51:673 > LIST MUST_xml 15:51:51:675 Check for Old SSL Session 15:51:51:676 Old SSL Session Found Cached 15:51:51:676 < 150 Apertura della connessione dati in modalità BINARY per file list 15:51:51:681 ! SSL Connected OK with TLSv1.2, cipher ECDHE-RSA-AES128-GCM-SHA256, key auth RSA, key exchange ECDH, encryption AESGCM(128), message auth AEAD 15:51:51:682 SSL Connected OK with TLSv1.2, cipher ECDHE-RSA-AES128-GCM-SHA256, key auth RSA, key exchange ECDH, encryption AESGCM(128), message auth AEAD 15:51:51:686 < 450 MUST_xml: File o directory non esistente 15:51:51:686 ! RETR/LIST/NLST Failed 15:51:51:686 DIR Failed with Status 450 - 450 MUST_xml: File o directory non esistente 15:51:51:686 Unable to Resume, Partial File Not Found: MUST_xml 15:51:51:876 > ALLO 1410 15:51:51:878 < 202 Nessuna allocazione di spazio su disco necessaria 15:51:51:882 Saved File Resume Info C:\CBA\Cartella Socio Sanitaria\ServizioAS\TestCopiaFTP\CopiaInFtp\ArchiviazioneSostitutiva\ARSENIO LUPIN-3454\MUST.xml.ftp 15:51:51:882 > PASV 15:51:51:884 FTP Session Closed - Connection reset by peer (#10054) 15:51:51:884 Lost FTP Control Connection, Abandoning Uploads 15:51:51:884 No Connection to Server, Cancelled Uploading Files (3) 15:51:51:884 Task Result: Failed 15:51:51:884 No Connection to Server, Cancelled Uploading Files (3) I also tried with FileZilla and also give some error... (I cut the line not interesting) Errore: Disconnesso dal server: ECONNABORTED - Connessione interrotta Errore: Trasferimento fallito Errore: Disconnesso dal server: ECONNABORTED - Connessione interrotta Errore: Trasferimento fallito Errore: Disconnesso dal server: ECONNABORTED - Connessione interrotta Errore: Trasferimento fallito Errore: Disconnesso dal server: ECONNABORTED - Connessione interrotta Errore: Trasferimento fallito
  10. I have the 8.58 version of ICS. I must connet to a server with SSL protocol (sslTypeAuthTls); le connection works, but when I try to transfer a file I give this error: Error 425 Can't open data connection I'm not behind a firewall. If I try to send a file with FileZilla it works UPDATE: with sslTypeAuthTls I also connect, but I have the error 522 Thanks in advance
  11. [SOLVED] I found where was the problem. The client don't use the cached SSL session! so the server reject the transfer This was the log on the tls.log 2019-07-05 09:41:54,739 mod_tls/2.6[26250]: starting TLS negotiation on data connection 2019-07-05 09:41:54,745 mod_tls/2.6[26250]: client did not reuse SSL session, rejecting data connection (see the NoSessionReuseRequired TLSOptions parameter) 2019-07-05 09:41:54,745 mod_tls/2.6[26250]: unable to open data connection: TLS negotiation failed I set the property SslSessionCacheModes with sslSESS_CACHE_CLIENT And now it works, It transfer the file!
  12. Ok, thanks for all! I saw the comands in the log, I must follow the command like you tell. If TIcsFtpMulti uses TSslFtpClient the is something I have miss!
  13. OK, I update the version of ICS at 8.61. With OverbyteIcsSslFtpTst sample I have the same problem, but with OverbyteIcsXferTst I can copy the files. Ok for many aspects FtpMultiClient is less complex but i must change many rows of my code! I'd rather use TSslFtpClient... but if I can't I will use FtpMultiClient
  14. Hi, I also use passive mode (and I also disable the windows firewall...) I use try also with the sample OverbyteIcsSslFtpTst and I do the following step 1. set host, password.... 2. set SSL Type (TLS or SSL) 3. connect (and works) 4. put a file.... and doesn't work, the server give me error 425, I find a file on the FTP but it is empty 😞 I try also doing Pbsz and Prot before put the file but without success Probably I missing something but I can't underestand what
×