-
Notifications
You must be signed in to change notification settings - Fork 99
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
no password #2
Comments
Yes, anonymous login does not work because by default the library tries to send the password even though login was successful with username only. Can you try the modifications I did with the pull request, or try it from my repository (souravdatta/goftp) and see if it still fails? |
Could you retry it with the latest version? I've merged the pull request from @souravdatta. |
Thanks for the quick response! I deleted the /usr/local/bin/pkg/darwin_amd64 folder and got goftp again, but it seems like I'm getting the same error. You can test with ftp.musicbrainz.org:21 Thanks again! |
I tested with the latest merged copy of the code and found no problem in Connect. But Login() fails because of the long info message that comes as part of the Connect() call. The code handles this type of banners when it appears after the Login() (which is usually the case in sites like ftp.gnu.org). Does your panic message show lines like this? panic: 220- F T P . O S U O S L . O R G If so, then I can reproduce it at my end. I think we need to modify the code to properly avoid such banner messages while checking for return status from connection. |
That's exactly what's happening. Good call. Thanks! 2015/05/19 09:06:10 > USER anonymous goroutine 1 [running]: goroutine 17 [syscall, locked to thread]: |
It's strange.
But I can't get the same procedure working with the code!
My test server is ftp.musicbrainz.org |
Ok, I wrote a workaround. |
replace status codes with const
I can't seem to get this to work with anonymous as the username and an empty password.
if err = ftp.Login("anonymous", ""); err != nil {
panic(err)
}
it dies on ftp.Login
goroutine 1 [running]:
main.downloadDatabase()
ftp.go:30 +0x160
main.main()
init.go:7 +0x1b
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2232 +0x1
exit status 2
The text was updated successfully, but these errors were encountered: