From 0cc33ecfbe07210259e9ccdadae9d42d5c584b69 Mon Sep 17 00:00:00 2001 From: Alle Veenstra Date: Wed, 29 Jul 2020 11:34:03 +0200 Subject: [PATCH] Replaced the PASV response "227 Entering passive mode" with "227 Entering Passive Mode" (uppercased first letters). This fixes a problem where some FTP clients would not send data, because they expected the casing to match. --- pyftpdlib/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyftpdlib/handlers.py b/pyftpdlib/handlers.py index b5613a43..446ad2d1 100644 --- a/pyftpdlib/handlers.py +++ b/pyftpdlib/handlers.py @@ -367,7 +367,7 @@ def __init__(self, cmd_channel, extmode=False): ip = ip[7:] # The format of 227 response in not standardized. # This is the most expected: - resp = '227 Entering passive mode (%s,%d,%d).' % ( + resp = '227 Entering Passive Mode (%s,%d,%d).' % ( ip.replace('.', ','), port // 256, port % 256) self.cmd_channel.respond(resp) else: