-
Notifications
You must be signed in to change notification settings - Fork 379
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
Provide a net/http-like API for the Server type #84
Comments
I don't understand how this would work. (http is stateless, SFTP is not. I think there should be a shared "session" object, at least ... But I don't see how to name it/what it could hold) |
@punkeel - The SFTP server implements version 3 of the spec which allows for stateless servers (other versions may as well). For how this works read the intro to section 6 in the RFC. https://tools.ietf.org/html/draft-ietf-secsh-filexfer-02#section-6 |
#130 isn't exactly this, but I think it covers some of the same ground. What do you think? |
I'm going to say this is done enough as #130 addresses most of it and what it doesn't aren't as useful in the context of SFTP. |
This will be an issue to track progress for providing a
net/http
-like API for the Server type.TODO list:
sftp.Handler
interfacesftp.Request
type with request informationsftp.Responder
interface to respond to clientssftp.FileServer
type which can serve files from the local filesystem, as is done now.chroot
-like functionality this wayIdeas:
sftp.ServeMux
type for using different handlers for different requests, e.g. create, open, read, write: https://golang.org/pkg/net/http/#ServeMuxHere's a couple sketches of what this might look like from previous samples:
cc: @davecheney @marksheahan @xor-gate @punkeel
The text was updated successfully, but these errors were encountered: