- Added function to get server welcome message.
- Use the peer address when the server responds
with all zeroes like is the case with IPv6.
- Added some small tests for types
- Make the test results clearer, using ? instead of asserting is_ok()
* Split implementation of `list_command` into the new
`get_lines_from_stream` fn in order to make it easier to test
* Add two tests `get_lines_from_stream` for dos and unix newlines
* Issue with list found: No code is sent at the beginning and the and at the end of the list function
List now works.
Everthing after a list doesn't work (PASV mode removes codes ?)
* Cannot move out of borrowed content..........
* rolled bad main branch
* into secure now taking a SslContext
* Updated help and test
* Switched back to anonymous in help of secure ftp
* Updated help: context is not a reference
* Added openssl as an external crate in the tests
* Got it back to the original, pre-update state
* removed general imports for specific ones
* No more issues (hopefully)
* remove unnecessary allocations (calls to format! and String::from)
* make write_str accepts S: AsRef<str> so we can pass a String without having to borrow it manually
* make list_command accept Cow<'static, str> (better than AsRef because we can have both a &str or a String at calling site)
* retr is generic over its result type (backward-compatible change)
* rewrite retr in a more ergonomic way
* rewrite simple_retr to use retr, remove simple_retr_
Possible backward-incompatible improvements, requiring major version changes:
- make simple_retr return a Vec rather than a Cursor
- change the signature of retr from Fn(&mut Read) to FnMut(R) where R: Read?
* add docker with configuration of vsftpd to test more easily
* update README
* porting script from docker to travis
* must run vsftpd inside the docker
* improved Dockerfile and README
* added & fixed tests
* trying to make .travis.yml prettier
Fixes issue #54.
The problem is that we're expecting to read a response from the server
on the control connection, but the server will only send a response when
the data connection has been properly closed. We can ensure this by
dropping the data connection before reading the server response.
* Update the example to be consistent with the API
* Simplified the README example, relying on the convention that using unwrap in examples is acceptable
* Fixed the rest of the API references
* Fixed syntax error
* Tested program in a working environment and fixed last syntax errors
* Fixed indentation
* Fixed indentation
* Add a secure_with_ssl method to FtpStream so that users can supply their own SSL configuration
* Add a field to FtpStream when compiling with the secure feature that will contain ssl configuration information to be used in data_command
* Fixed compilation errors
* Make the openssl requirement mandatory. It's not worth it to fragment the codebase and have multiple copies of definitions of things to work around a feature flag when the tradeoff is having a lot more usable SSL
* Since the secure() and insecure() methods actually have type signatures very similar to the into() method (https://doc.rust-lang.org/std/convert/trait.Into.html#tymethod.into), I changed their names to into_secure and into_insecure to be a little clearer about how they work
* Create a new FtpsStream<T> type and revert back to the old FtpStream type for other cases. The new type allows us to retain (and require) information about an Ssl configuration only when the user wants to supply one. Need a way to avoid so much code duplication though
* Let use of OpenSsl and indeed the entire FtpsStream type be optional under the secure feature flag again
* Move back to a single-type model with an SSL field that is only present when the secure feature flag is used