1
0
mirror of synced 2024-11-12 00:40:51 +01:00

Update to use fixed UTF8 with no bom

This commit is contained in:
Yuchen Ji 2022-04-08 03:41:51 +08:00
parent 1d211d5f15
commit 219a90c640
7 changed files with 12 additions and 12 deletions

View File

@ -14,7 +14,7 @@ public class AliveController : WebApiController
public string Check()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Html;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "REMOTE ADDRESS: 127.0.0.1\n" +
@ -28,7 +28,7 @@ public class AliveController : WebApiController
{
HttpContext.Response.SetEmptyResponse((int)HttpStatusCode.OK);
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
}
}

View File

@ -30,7 +30,7 @@ public class CardServiceController : WebApiController
[FormField("card_no")] long cardId, [FormField("data")] string xmlData)
{
HttpContext.Response.ContentType = MediaTypeNames.Application.Octet;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
/*if (gid != Configs.GC4_EX_GID)

View File

@ -13,7 +13,7 @@ public class IncomServiceController : WebApiController
public string IncomService()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "1+1";
@ -24,7 +24,7 @@ public class IncomServiceController : WebApiController
public string IncomAllService()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "1+1";

View File

@ -19,7 +19,7 @@ public class RankController : WebApiController
public string Rank([QueryField("cmd_type")] int type)
{
HttpContext.Response.ContentType = MediaTypeNames.Application.Octet;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
if (!Enum.IsDefined(typeof(RankType), type))

View File

@ -13,7 +13,7 @@ public class ResponeServiceController : WebApiController
public string ResponeService()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "1";

View File

@ -19,7 +19,7 @@ public class ServerController : WebApiController
public string Certify([QueryData] NameValueCollection parameters)
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
var gid = parameters["gid"];
@ -80,7 +80,7 @@ public class ServerController : WebApiController
public string Cursel()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "1\n";
@ -90,7 +90,7 @@ public class ServerController : WebApiController
public string Data()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "count=1\n" +
@ -101,7 +101,7 @@ public class ServerController : WebApiController
public string GameInfo()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "0\n" +

View File

@ -13,7 +13,7 @@ public class UploadServiceController : WebApiController
public string UploadService()
{
HttpContext.Response.ContentType = MediaTypeNames.Text.Plain;
HttpContext.Response.ContentEncoding = Encoding.Default;
HttpContext.Response.ContentEncoding = new UTF8Encoding(false);
HttpContext.Response.KeepAlive = true;
return "1\n" +