Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit c3814d7

Browse files
authored
Fix FTPS commands to force encrption (#39)
1 parent b33d7cb commit c3814d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GeneXusFtps/src/main/java/com/genexus/ftps/FtpsClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public boolean connect(FtpsOptions options) {
5757
try {
5858
this.client.connect(options.getHost(), options.getPort());
5959
if (options.getForceEncryption()) {
60+
client.execPBSZ(0);
6061
client.execPROT("P");
6162
}
6263
if (!FTPReply.isPositiveCompletion(this.client.getReplyCode())) {
@@ -279,7 +280,7 @@ private void setEncoding(FtpsOptions options) throws IOException {
279280
this.client.setFileType(FTP.BINARY_FILE_TYPE);
280281
break;
281282
case ASCII:
282-
this.client.sendCommand(FTP.ASCII_FILE_TYPE);
283+
this.client.setFileType(FTP.ASCII_FILE_TYPE);
283284
break;
284285
default:
285286
this.client.setFileType(FTP.BINARY_FILE_TYPE);

0 commit comments

Comments
 (0)