pkg/sftp — pull request #14 by minusnine (2014-09-10 16:31:55+00:00)
Title: Remove unneeded field from Mkdir and Open requests

The size field in the attributes struct should only be provided in a request if
the appropriate flag is set.

In particular, the first two fields of the attributes struct is defined as:

uint32 flags
uint64 size present only if flag SSH_FILEXFER_ATTR_SIZE

Since the implementation uses the default flags value of zero, the size field
should not be transmitted. This causes an issue in older versions of the
OpenSSH SFTP server, which manifests as a hang while receiving the response.