Repository: minio/minio (language: go)

Issue:
release.2025-02-07t23-21-09z: Checksum requires Client with TrailingHeaders enabled
Our tests suddenly exit with `ftp_fput(): error during transfer: Checksum requires Client with TrailingHeaders enabled` since this version.

Using docker compose:

```
    minio:
        image: 'minio/minio:RELEASE.2025-02-03T21-03-04Z'
        restart: unless-stopped
        command:
            - 'server'
            - '--console-address=:9001'
            - '--ftp=address=:8021'
            - '--sftp=address=:8022'
            - '--sftp=ssh-private-key=/root/.ssh/id_rsa'
            - '/data'
```


Discussion / hints:
Dear, me too, with version from 7/2/25, hoping that this version fixes  "x-amz-checksum' header does not match " error.

No file seems created this time on MinIO so no other errors on minio logs.

root@glus-dmznas-k1 ~]# minio -v
minio version RELEASE.2025-02-07T23-21-09Z (commit-id=703f51164d3d0c44af41b0d86075a1f61e4779e7)
Runtime: go1.23.6 linux/amd64
License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
Copyright: 2015-2025 MinIO, Inc.

Test:

226 Closing data connection, sent 2050 bytes
ftp> lcd /tmp
Local directory now /tmp
ftp> put 250210ftp.txt
local: 250210ftp.txt remote: 250210ftp.txt
227 Entering Passive Mode (185,95,9,129,117,71)
150 Data transfer starting
450 error during transfer: Checksum requires Client with TrailingHeaders enabled
5 bytes sent in 5.6e-05 secs (89.29 Kbytes/sec)
ftp>

Also tested with Filezilla client on windows, same error message.
Best regards Cedric


PS same 2 replication setup as before:
mc admin replicate add minio1r minio2r




Fix patch:
diff --git a/cmd/ftp-server-driver.go b/cmd/ftp-server-driver.go
index 617c42230c36d..42dce2be7026e 100644
--- a/cmd/ftp-server-driver.go
+++ b/cmd/ftp-server-driver.go
@@ -367,9 +367,10 @@ func (driver *ftpDriver) getMinIOClient(ctx *ftp.Context) (*minio.Client, error)
 		}
 
 		return minio.New(driver.endpoint, &minio.Options{
-			Creds:     mcreds,
-			Secure:    globalIsTLS,
-			Transport: tr,
+			Creds:           mcreds,
+			Secure:          globalIsTLS,
+			Transport:       tr,
+			TrailingHeaders: true,
 		})
 	}
 
diff --git a/cmd/sftp-server-driver.go b/cmd/sftp-server-driver.go
index 31b0407ea594f..3ce7c0b43adf1 100644
--- a/cmd/sftp-server-driver.go
+++ b/cmd/sftp-server-driver.go
@@ -127,9 +127,10 @@ func (f *sftpDriver) getMinIOClient() (*minio.Client, error) {
 		tr = forwardForTransport{tr: tr, fwd: f.remoteIP}
 	}
 	return minio.New(f.endpoint, &minio.Options{
-		Creds:     mcreds,
-		Secure:    globalIsTLS,
-		Transport: tr,
+		TrailingHeaders: true,
+		Creds:           mcreds,
+		Secure:          globalIsTLS,
+		Transport:       tr,
 	})
 }
 


Test patch: