Comments (2)
I didn't know this command existed. You're becoming quite the FTP expert!
This adds only more madness to the FTP protocol. I find it very strange to interrupt the synchronous flow of commands with asynchronous ones. This means that if a few commands are passed synchronously. Do you know any server that supports this command? I'd like to see how they handle the queuing of synchronous commands.
My goal is to make this library the most featured one, so we might as well support it.
How do you see this?
It seems like the cleanest implementation would be to properly use Context
throughout the API but at the same time as the afero.Fs
API doesn't support it so he actual use-cases of having something to interrupt are pretty limited.
The way I see it is that we could:
- Mark a few commands as being "abortable"
- Once any of these commands are run, a context is initialized on the current connection and the command is run on another goroutine
- We continue to read commands. If we receive an
ABOR
, we cancel the context and that shall close the current connection on the current command execution. If we receive something else thanABOR
, we can put it in a queue of commands and parse each of them at the end of the main command execution.
from ftpserverlib.
Hi,
I think ABOR
is supported by many, if not all, FTP servers.
For what I understand from reading the specs FTP commands are generally sequential. But there are some command that require "special actions". These commands are ABOR
, STAT
, QUIT
.
pyftpdlib code should be easier to follow than ProFTPD or Pure-FTPd.
Regarding ABOR
handling this is an extract from the specs
This command tells the server to abort the previous FTP
service command and any associated transfer of data. The
abort command may require "special action", as discussed in
the Section on FTP Commands, to force recognition by the
server. No action is to be taken if the previous command
has been completed (including data transfer). The control
connection is not to be closed by the server, but the data
connection must be closed.
There are two cases for the server upon receipt of this
command: (1) the FTP service command was already completed,
or (2) the FTP service command is still in progress.
In the first case, the server closes the data connection
(if it is open) and responds with a 226 reply, indicating
that the abort command was successfully processed.
In the second case, the server aborts the FTP service in
progress and closes the data connection, returning a 426
reply to indicate that the service request terminated
abnormally. The server then sends a 226 reply,
indicating that the abort command was successfully
processed.
I'll try to implement this feature, but I'm quite busy in this period, it could require some time
from ftpserverlib.
Related Issues (20)
- EPRT support
- Data race caused by ABOR HOT 1
- do not quit serve loop on temporary accept errors? HOT 1
- Add some badges HOT 1
- Action Required: Fix Renovate Configuration
- Allow users to extend/change handlers HOT 2
- Fix gocover.io HOT 1
- Configurable FTP client authentication method HOT 2
- PASV command crash
- FR: customize error codes HOT 6
- LIST command doesn't work for file HOT 1
- Dependency Dashboard
- Add support for wildcards in LIST HOT 2
- Restore IPv6 support HOT 1
- MLSD Response: 550 Could not list: Not supported HOT 1
- MLST gives incorrect response HOT 6
- Unable to catch abort transfer from client HOT 1
- protocol not available, Unable to open transfer HOT 3
- Could not list the contents of the bucket , throws 550 error (afero-s3) HOT 1
- APPE should create a file if it does not yet exist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ftpserverlib.