-
Notifications
You must be signed in to change notification settings - Fork 621
refactor: remove enable_secure
in FTP service.
#709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: ClSlaid <[email protected]>
1. remove `enable_secure` in ftp service 2. if the endpoint begins with `ftps://`, enable_secure of suppaftp set to true NOTE: now all endpoints should be prefixed `ftp://` and `ftps://` Signed-off-by: ClSlaid <[email protected]>
Please update to branch before start new PR. |
Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
Signed-off-by: ClSlaid <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tested on my device and it works perfectly. Just a little suggestion, maybe we could add a bit more tests under test_build()
for error condition like:
// invalid scheme
let mut builder = Builder::default();
builder.endpoint("invalidscheme://ftp_server.local:8766");
let b = builder.build();
assert!(!b.is_ok());
let expected = "backend error: (context: {}, source: endpoint scheme unsupported or invalid: \"invalidscheme\")";
assert_eq!(b.unwrap_err().to_string(), expected);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM!
Signed-off-by: ClSlaid <[email protected]>
@ClSlaid are there other updates? |
Signed-off-by: ClSlaid <[email protected]>
forgot to add test on the error message, resolving git conflicts. |
…to remove-enable-tls-in-builder
Please don't... OpenDAL never relays on the error message. |
Signed-off-by: ClSlaid <[email protected]>
test on error kinds then. |
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
enable_secure
in FTP service builderftps://
, the backend will use TLS secured connectionNote
now all endpoints should be prefixed with
ftp://
andftps://
.