Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.1.0
-
None
Description
According to version 4:
Packets are sent and received on stdout and stdin. Data sent on
stderr by the server SHOULD be considered debug or supplemental error
information, and MAY be displayed to the user.For example, during initialization, there is no client request
active, so errors or warning information cannot be sent to the client
as part of the SFTP protocol at this early stage. However, the
errors or warnings MAY be sent as stderr text.
We currently initialize the STDERR stream, but make no use of it. We should provide a configurable way of using this stream - provided we find a use-case for it and maybe some client/server(s) that make use of it. Note: by default, the ChannelSession (that we use to consume SFTP data) does not accept STDERR data:
@Override protected void doWriteExtendedData(byte[] data, int off, long len) throws IOException { throw new UnsupportedOperationException("Server channel does not support extended data"); }
so we need to consider very carefully what such a feature would require.