Skip to content

Commit

Permalink
Changed encoding to UTF-8
Browse files Browse the repository at this point in the history
and content type to application/json
  • Loading branch information
AzelyFox committed Jul 2, 2020
1 parent 850684e commit 8eb9cc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ServerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ public void Run()
}

var rstr = _responderMethod(ctx.Request);
var buf = Encoding.Default.GetBytes(rstr);
var buf = Encoding.UTF8.GetBytes(rstr);
ctx.Response.Headers["Access-Control-Allow-Origin"] = "*";
ctx.Response.Headers["Access-Control-Allow-Headers"] = "Content-Type";
ctx.Response.Headers["Access-Control-Allow-Methods"] = "GET,POST,PUT,DELETE,OPTIONS";
ctx.Response.Headers["Access-Control-Allow-Credentials"] = "true";
ctx.Response.Headers["Content-Type"] = "application/json; charset=utf-8";
ctx.Response.ContentLength64 = buf.Length;
ctx.Response.OutputStream.Write(buf, 0, buf.Length);
ctx.Response.ContentEncoding = Encoding.UTF8;
Expand Down
2 changes: 1 addition & 1 deletion Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
</controls:HamburgerMenu>

<StatusBar Grid.Row="1">
<StatusBarItem HorizontalAlignment="Right">PAYMAP VERSION 200701A</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">PAYMAP VERSION 200702A</StatusBarItem>
</StatusBar>

</Grid>
Expand Down

0 comments on commit 8eb9cc9

Please sign in to comment.