We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fd9833 commit c1bdb8dCopy full SHA for c1bdb8d
UnisaveWorker/OwinExtensions.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.IO;
3
using System.Json;
4
+using System.Text;
5
using System.Threading.Tasks;
6
using Microsoft.Owin;
7
using Owin;
@@ -73,13 +74,16 @@ public static async Task SendResponse(
73
74
return;
75
}
76
77
+ // string to bytes
78
+ byte[] binaryBody = Encoding.UTF8.GetBytes(body);
79
+
80
// send response with body
81
context.Response.Headers["Content-Length"]
- = body.Length.ToString();
82
+ = binaryBody.Length.ToString();
83
84
try
85
{
- await context.Response.WriteAsync(body);
86
+ await context.Response.WriteAsync(binaryBody);
87
88
catch (IOException e)
89
0 commit comments