Some servers seem to send a blank line at the end of an MLST response.
MLST Download
250-
Size=53248;Modify=20230327134339.000;Type=dir; Download
250 Requested file action okay, completed.
Before this change this would cause the GetEntry method to return this
error.
unsupported LIST line
This patch ignores blank lines in the MLST response.
This commit is contained in:
@@ -193,7 +193,7 @@ func (mock *ftpMock) listen() {
|
||||
if cmdParts[1] == "multiline-dir" {
|
||||
mock.printfLine("250-File data\r\n Type=dir;Size=0; multiline-dir\r\n Modify=20201213202400; multiline-dir\r\n250 End")
|
||||
} else {
|
||||
mock.printfLine("250-File data\r\n Type=file;Size=42;Modify=20201213202400; magic-file\r\n250 End")
|
||||
mock.printfLine("250-File data\r\n Type=file;Size=42;Modify=20201213202400; magic-file\r\n \r\n250 End")
|
||||
}
|
||||
case "NLST":
|
||||
if mock.dataConn == nil {
|
||||
|
||||
Reference in New Issue
Block a user