mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
Fix encoding support and send command always encoded as UTF-8
This commit is contained in:
@@ -359,8 +359,9 @@ namespace Renci.SshNet.Common
|
||||
if (data == null)
|
||||
throw new ArgumentNullException("data");
|
||||
|
||||
this.Write((uint)data.Length);
|
||||
this.Write(encoding.GetBytes(data));
|
||||
var bytes = encoding.GetBytes(data);
|
||||
this.Write((uint)bytes.Length);
|
||||
this.Write(bytes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Renci.SshNet.Messages.Connection
|
||||
using System.Text;
|
||||
|
||||
namespace Renci.SshNet.Messages.Connection
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents "exec" type channel request information
|
||||
@@ -61,7 +63,7 @@
|
||||
{
|
||||
base.SaveData();
|
||||
|
||||
this.Write(this.Command);
|
||||
this.Write(this.Command, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user