网络上将 byte[]转字符串 末尾会有 null 直接使用Trim()去不掉 需要这样 var headerStr = Encoding.UTF8.GetString(header).Trim('\0');