pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.5k stars 379 forks source link

More context for EOF during client setup #513

Closed puellanivis closed 2 years ago

puellanivis commented 2 years ago

Addresses concerns raised from #506 where a bare EOF was being returned, and thus being quite unclear about where the EOF happened.

This adds more context to the returned errors, and replaces EOF with UnexpectedEOF since we definitely aren’t expecting one.

However, I’m thinking a better message should be returned than even unexpected EOF. I’ll be digging through documentation to see what the best option here is.

puellanivis commented 2 years ago

The secsh-filexfer-02 document is silent about what to do in this case. I think however the error "server unexpectedly closed connection" might be even more clear than an unexpected EOF.

drakkan commented 2 years ago

The secsh-filexfer-02 document is silent about what to do in this case. I think however the error "server unexpectedly closed connection" might be even more clear than an unexpected EOF.

I agree

puellanivis commented 2 years ago

Alright, I think we’re good now. 👍

drakkan commented 2 years ago

Thanks!