Skip to content
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

Fix Transmit client treating a successful PASV response as failure #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aioftp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,9 +1374,9 @@ async def handler(reader, writer):
except errors.NoAvailablePort:
connection.response("421", ["no free ports"])
return False
code, info = "227", ["listen socket created"]
code, message = "227", "listen socket created"
else:
code, info = "227", ["listen socket already exists"]
code, message = "227", "listen socket already exists"

for sock in connection.passive_server.sockets:
if sock.family == socket.AF_INET:
Expand All @@ -1387,7 +1387,7 @@ async def handler(reader, writer):
return False

nums = tuple(map(int, host.split("."))) + (port >> 8, port & 0xff)
info.append("({})".format(",".join(map(str, nums))))
info = "{} ({})".format(message, ",".join(map(str, nums)))
if connection.future.data_connection.done():
connection.data_connection.close()
del connection.data_connection
Expand Down