This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ftplib __init__ function can't handle 120 or 4xy reply when connect to the server
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: H-ZeX, Jeffrey.Kintscher, giampaolo.rodola
Priority: normal Keywords:

Created on 2018-08-10 04:57 by H-ZeX, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg323354 - (view) Author: H-ZeX (H-ZeX) Date: 2018-08-10 05:01
in the __init__ function, call getresp,

however, the getresp don't handle the 120 reply which indicate the request should be delay or 421 reply

in the rfc 959 page 50, there are all reply that may return

Connection Establishment
120
220
220
421
msg344052 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2019-05-31 09:46
From RFC-959:

      If the server is unable to accept input right away, a
      120 "expected delay" reply should be sent immediately and a 220
      reply when ready.  The user will then know not to hang up if there
      is a delay.

Seems to make sense. Willing to provide a patch?
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78549
2019-05-31 09:46:49giampaolo.rodolasetmessages: + msg344052
2019-05-31 09:00:25Jeffrey.Kintschersetnosy: + Jeffrey.Kintscher
2019-05-06 20:23:42anthonypjshawsetnosy: + giampaolo.rodola
2018-08-10 05:01:02H-ZeXsetmessages: + msg323354
2018-08-10 04:57:59H-ZeXsetcomponents: + Library (Lib), - XML
2018-08-10 04:57:34H-ZeXcreate