4 ms·
Yes this is the reason, but the message-based part is irrelevant. They need to use an existing http connection where both sides agree on the upgrade to prevent
by aidenn0 10y ago
Yes this is the reason, but the message-based part is irrelevant. They need to use an existing http connection where both sides agree on the upgrade to prevent lots of possible security holes.
If you aren't aware, the FTP protocol lets one specify a port and address to connect to; it was not that long ago that servers would not check if the address for the data connection was the same as the address for the control connection, and so one could send data to any port on the internet from an anonymous FTP server. This caused all sorts of headaches.
- yokohummer7 10y agoYeah, but both parties can leverage the existing connection without resorting to a message-based protocol, can't they? They could just assume they're now sending and receiving bytes after the upgrade. What I meant when I said "utilizing the legacy TCP sever" was creating some plugin that is attached to the server, effectively acting as a lightweight HTTP server that just does the upgrade process (within the same connection). In this way the remaining communication doesn't have to involve message encapsulation/decapsulation each time a message is transferred.
- aidenn0 10y agoI think the message encapsulation was chose because it's more work to implement a message-passing system on top of a stream than to do the opposite.
- fulafel 10y agoThis is still a supported feature of some FTP implementations. It enables the client to initiate a file transfer between 2 FTP servers. See eg https://support.microsoft.com/en-us/help/247132/how-to-perform-a-server-to-server-ftp-transfer-by-using-iis https://support.microsoft.com/en-us/help/247132/how-to-perfo...