Build 2666 released: Streams in SFTP, new methods, lots of enhancements in MIME

There are many new features in this build. The SFTP component finally has the long-awaited GetUploadStream and GetDownloadStream for stream-based remote access. These also support the Seek method, unlike the corresponding methods of the FTP component - SFTP is actually a much powerful protocol. SetFileDateTime method is also supported at last in FTP and SFTP, and both components got FileExists and DirectoryExists as well. In case you are wondering why it took so long for these methods to appear in Rebex FTP - there is nothing in the original FTP protocol that would make it possible to determine whether a file or directory exists and we had to resort to a complicated combination of various other commands to achieve the desired result. It should work for a vast majority of FTP servers - if it doesn't work for you though, please let us know about it!

Users dealing with draconian firewalls might like the DataPortRange property that was added to the FTP component - this allows you to specify a local port range to bind the local end of the data connection for both active and passive mode.

An annoying problem that caused an unnecessary slowdown of your transfers over SSL or SSH channel was also fixed in this release, as well as the GetConnectionState method that had an annoying habit of throwing an exception on disconnected objects.

Finally, there is a number of smaller changes in our MIME parser - some of these are bugfixes, but most are changes towards better compatibility with various broken mail messages that circulate the Internet in vast numbers. And there is even more to come in the next release!

Complete list of changes:

  • Installer: There is a new option to register the installed assemblies with Visual Studio .NET. Registered assemblies will appear in the .NET tab of the Add References dialog.
  • FTP/SFTP: Added SetFileDateTime method.
  • FTP/SFTP: Added FileExists and DirectoryExists methods. These simple operations are very hard to achieve using the FTP protocol and we use a combination of several commands to achieve the desired functionality. In SFTP, on the other hand, they are just simple wrappers around the existing SetAttributes method.
  • FTP/SFTP: GetConnectionState no longer fails on disconnected objects.: GetConnectionState no longer fails on disconnected objects.
  • SSH: Client no longer announces key exchange and encryption methods that are not supported on its current platform (only on .NET CF).
  • SSH: Fixed a bug that caused any extra key-exchange to fall.
  • SSH/SSL: Speed drop caused by ineffective data receiving loop was fixed.
  • SFTP: Added workaround to GetInfo method for WeOnlyDo SFTP server that reports missing files as access denied.
  • SFTP: Added GetUploadStream and GetDownloadStream methods for stream-based remote file access.
  • FTP: Added SetFileDateTime method.
  • FTP: Added DataPortRange property to specify local data port range for active and passive mode transfers.
  • FTP: GetFile/PutFile methods refactored to use the same infrastructure as GetDownloadStream/GetUploadStream methods.
  • FTP: GetList method optimized to parse the list on-the-fly, resulting in enhanced speed.
  • FTP: Removed unnecessary control channel checking code that caused a noticable slowdown of data transfers.
  • FTP: Fixed a bug in MLSD list parser - date/time was treated as local time.
  • FTP: In active mode, when waiting for the server to connect, error response is now processed as soon as it arrives, without waiting for the connection attempt to time out.
  • SMTP/POP3/IMAP: Added CheckConnectionState/GetConnectionState methods to check the state of the connection without sending any command to the server.
  • MIME: Broken MIME messages that use LF-only end-of-line markers instead of CRLF are now parsed as well.
  • MIME: Entities with a missing body are assumed to have an empty body.
  • MIME: Default Hebrew charset has been changed from iso-8859-8 to windows-1255.
  • MIME: If both iso-8859-1 and iso-8859-2 are unable to encode the text, windows-1252 and windows-1250 are also tested before trying additional charsets.
  • MIME: Fixed MimeEntity.Name and ContentDisposition.FileName properties that might fail for some filenames with invalid characters.
  • MIME: Embedded messages encoded as base64 or quoted-printable are now parsed correctly.
  • MIME: If content transfer encoding value is an empty string, 7bit is assumed instead.
  • MIME: Maximum allowed line length on input was extended to 65536.
  • MIME: Rules for parsing address headers were relaxed to allow more kinds of invalid input data.
  • MIME: Header parser enhanced to assembly multi-byte characters that were split across several encoded blocks.
  • MIME: IgnoreUnparsableHeaders option assumes a reasonable default for invalid content type headers.

Special thanks goes to Yoni Douek for his extensive testing of the MIME component and lots of great suggestions!