[PATCH][SFTP] fix mac sshfs sftp support by doubling the max Buffer length
--------------------------------------------------------------------------
Key: SSHD-112
URL: https://issues.apache.org/jira/browse/SSHD-112
Project: MINA SSHD
Issue Type: Bug
Affects Versions: 0.5.0
Reporter: Bobby Powers
Attachments:
0001-Buffer-increase-max-length-to-64-KiB-from-32-and-abs.patch
Not sure why it was 32k, but this causes sshfs on the mac (but not
linux, strangely) to break, as it tried to send 65535 bytes of data at a
time. Since it seems like an arbitrary limit I doubled it. The
relevant (I think) part of the spec is rfc4253 section 6.1:
All implementations MUST be able to process packets with an
uncompressed payload length of 32768 bytes or less and a total packet
size of 35000 bytes or less... Implementations SHOULD support longer
packets, where they might be needed.
Without this we're unable to transfer large files in via sftp from the mac
sshfs file system. sshfs's debug logging shows this:
unique: 0, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.8
flags=0x00000000
max_readahead=0x00100000
failed to detect remote user ID
INIT: 7.8
flags=0x00000000
max_readahead=0x00100000
max_write=0x00010000
I don't know where it gets this max_write from, as far as I can tell max_write
should be set in AbstractChannel.configureWindow to 32 KiB (line 187). I
didn't see any window renegotiation in the logs, but it might have slipped by.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira