ICS V8.70

From Overbyte
Revision as of 16:59, 3 November 2022 by Magsys (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Changes in ICS V8.70 include:

  1. V8.70 has various minor improvements providing better compatibility with modern compilers such as more unicode overloads to avoid ANSI string warnings and casts, and more use of TBytes to avoid ANSI strings. Updated various samples to use TIcsRestEmail to support OAuth2 authentication for GMail and Outlook that no longer allow old authentication protocols.
  2. The TIcsFileCopy, TIcsFtpMulti and TIcsHttpMulti file transfer components now support file zipping and unzipping using System.Zip in recent Delphi compilers, instead of the obsolete VclZip which is no longer available. Before a file copy or FTP upload, files may be automatically zipped, useful for large log files, after a file copy, FTP or HTTP download, files may be unzipped in various ways. The W versions of the components for non-unicode compilers still support VclZip.
  3. Added support to TIcsFileCopy to copy file names longer than 259 characters by adding \\?\ to the start of long names passed to Windows APIs, if supported by the disk file system, unicode APIs only. Fixed a problem deleting empty directories after copying. Fixed a problem with BuildDirList2 with COMPILER16_UP where SearchRec.TimeStamp returns a UTC timestamp instead of local time, unlike SearchRec.Time with returns local time, so gnore it. This caused problems with all file transfer components that could not check if old files were unchanged correctly.
  4. The OverbyteIcsXferTst sample has a new tabs, 'Single File Copy' to test the CopyOneFile method and 'Zip/Unzipping Files' to test zipping and unzipping that has always been supported by the components but not this demo.
  5. Allow content compression for HTTP and FTP using System.Zlib in newer versions of Delphi instead of the OverbyteIcsZLibObj unit to avoid duplication. Only Delphi 11.1 and later have the same ZLIB 1.2.12 as ICS, so will automatically used System.Zip. If older ZLIB versions are acceptable in older versions of Delphi, the USE_DELPHI_ZLIB define can be set. Also simplified use of ZLIB so higher level units only need OverbyteIcsZlibHigh which is the only unit now checking defines to use OverbyteIcsZLibObj, OverbyteIcsZLibDll or System.Zip. Beware a new version of OverbyteIcsDefs.inc is required to allow ZLIB to work correctly, otherwise it will default to using the DLL which is unlikely to be available, it is not in the distribution. So either install the new inc file and customise it, or copy the ZLIB changes to your own inc file.
  6. In TWsocket, added ReceiveTB(var Data : TBytes; MaxLen : Integer = -1): Integer; where MaxLen is optional, to receive TCP data into a TBytes dynamic array of bytes. Also ReceiveFromTB and ReceiveFrom6TB for UDP datagrams. The last release added similar SendTB functions, so buffer pointers and ANSI strings can now be avoided. Added new ComponentOptions wsoNoSendException which stops an exception being raised if Send is called when the socket is not connected, which can happen if the connection drops unexpectedly. Improved Unicode compatibility by adding UnicodeString overloads of various low level AnsiString functions for getting and setting IPs, ports and hosts to avoid casting and warnings. Added GetLocalHostName.
  7. Added UTF-8 support to TIcsIpStrmLog, to convert received lines from UTF-8 to Unicode with unicode compilers (as String) and converts sent data to UTF-8. Changed FRxBuffer to TBytes, use SendTB and ReceiveTB methods with TBytes. The OverbyteIcsIpStmLogTst sample has a new 'Use UTF-8' tick box so the component sends and receives UTF-8 instead of ANSI, and 'Test Unicode Data' to create some unicode characters for testing.
  8. Updated OpenSSL to 3.0.7 and 1.1.1s. OpenSSL 3.0.6 was withdrawn shortly after release, we never distributed it.
  9. Fixed bug in V8.65 where FloattoStr could create Json with comma decimal point instead of a period with some languages.
  10. In OverbyteIcsSslHttpOAuth, added an OAuth2 and Rest Email Microsoft User Authority property to access different user authorities, defaults to 'consumers' but can be changed to 'common' or an Azure Active Directory tenant GUID for corporate accounts. Also added IcsLoadRestEmailFromIni to load TIcsRestEmail secrets and tokens from an INI file. Ideally these settings should be encrypted!!
  11. Added TIcsRestEmail to support OAuth2 authentication to the OverbyteIcsSslMultiWebServ, OverbyteIcsSslMultiFtpServ and OverbyteIcsDDWebService samples, since GMail and Outlook that no longer allow old authentication protocols. Need a new [RestEmail] section in INI file with OAuth2 account client id and secret and refresh token (see top of OverbyteIcsSslHttpOAuth.pas unit). The refresh token can be obtained using the OverbyteMailQuTst sample with the same client account.
  12. In TIcsMailQueue, don't use synchronize for logging in thread if component is multithreaded, it blocks the queue. Fixed a memory leak. In the OverbyteIcsMailQuTst sample, set SMPT UTF-8 charset so headers get inline MIME encoded if necessary, rather than being converted to ANSI. Note body lines are not converted in this sample. Added Microsoft User Authority property to access different user authorities.
  13. In the OverbyteIcsSslMailSnd sample, added header character set and body line wrapping and encoding from non-SSL sample. Note the 'Use Mail Message' check box means you pass the entire body in MailMessage property instead of using the OnGetData event to send one line at a time, this will also word wrap long lines and encode body content.
  14. In the TIcsInetAlive component, added a new method AliveMethEither so internet alive checking works if either ping or HTTP works, instead of one or the other.
  15. Added a new utility function IcsBuiltWithEx that returns the compiler version for display, ie 'Delphi 11.2 Win32'. Added to several samples to ease testing.
  16. In OverbyteIcsLIBEAY, corrected the names of Win64 providers for YuOpenSSL.