Standarize IPC response, #586

This commit is contained in:
JustArchi
2017-08-05 17:14:31 +02:00
parent 021e8d2ad9
commit 6a035f4832

View File

@@ -168,11 +168,11 @@ namespace ArchiSteamFarm {
}
Encoding encoding = Encoding.UTF8;
response.ContentEncoding = encoding;
response.ContentType = "text/plain; charset=" + encoding.WebName;
string html = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><p>" + message + "</p></body></html>";
byte[] buffer = encoding.GetBytes(html);
byte[] buffer = encoding.GetBytes(message + Environment.NewLine);
response.ContentLength64 = buffer.Length;
await response.OutputStream.WriteAsync(buffer, 0, buffer.Length).ConfigureAwait(false);