Closed Bug 1584490 Opened 5 years ago Closed 5 years ago

FTP hangs when receiving 2xx response to LIST without prior 1xx response

Categories

(Core Graveyard :: Networking: FTP, defect)

defect
Not set
normal

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: decoder, Assigned: decoder)

References

Details

Attachments

(1 file)

When the FTP implementation performs a LIST command and receives a 2xx response, handled by this code

https://searchfox.org/mozilla-central/rev/45f30e1d19bde27bf07e47a0a5dd0962dd27ba18/netwerk/protocol/ftp/nsFtpConnectionThread.cpp#1071

without receiving a prior 1xx response triggering this code

https://searchfox.org/mozilla-central/rev/45f30e1d19bde27bf07e47a0a5dd0962dd27ba18/netwerk/protocol/ftp/nsFtpConnectionThread.cpp#1064

then the data connection will be opened but never receive a nsInputStreamReadyEvent because AsyncWait is never called on the connection.

In testing, this leads to a hang where neither OnStartRequest nor OnStopRequest is delivered to the listener passed during asyncOpen.

The solution is to enforce reception of the 1xx code prior to switching to FTP_COMPLETE.

Flags: needinfo?(michal.novotny)
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5591af7fd283 Check for FTP LIST 1xx response before completing command. r=michal
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Flags: needinfo?(michal.novotny)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: