private void SendHttp(Utf8TcpPeer peer, string responseCode, string contentType, byte[] data, params string[] extraHeaders) { peer.Send("HTTP/1.0 {0}", responseCode); peer.Send("Server: moonsharp-remote-debugger/{0}", VERSION); peer.Send("Content-Type: {0}", contentType); peer.Send("Content-Length: {0}", data.Length); peer.Send("Connection: close"); peer.Send("Cache-Control: max-age=0, no-cache"); foreach (string h in extraHeaders) { peer.Send(h); } peer.Send(""); peer.SendBinary(data); }
private void SendHttp(Utf8TcpPeer peer, string responseCode, string contentType, byte[] data, params string[] extraHeaders) { peer.Send("HTTP/1.0 {0}", responseCode); peer.Send("Server: moonsharp-remote-debugger/{0}", VERSION); peer.Send("Content-Type: {0}", contentType); peer.Send("Content-Length: {0}", data.Length); peer.Send("Connection: close"); peer.Send("Cache-Control: max-age=0, no-cache"); foreach (string h in extraHeaders) peer.Send(h); peer.Send(""); peer.SendBinary(data); }