diff --git a/src/Microsoft.Owin.Security.OAuth/OAuthAuthorizationServerHandler.cs b/src/Microsoft.Owin.Security.OAuth/OAuthAuthorizationServerHandler.cs index b6c89e5b..3dc696fd 100644 --- a/src/Microsoft.Owin.Security.OAuth/OAuthAuthorizationServerHandler.cs +++ b/src/Microsoft.Owin.Security.OAuth/OAuthAuthorizationServerHandler.cs @@ -476,7 +476,7 @@ private async Task InvokeTokenEndpointAsync() Response.Headers.Set("Cache-Control", "no-cache"); Response.Headers.Set("Pragma", "no-cache"); Response.Headers.Set("Expires", "-1"); - Response.ContentLength = memory.ToArray().Length; + Response.ContentLength = body.Length; await Response.WriteAsync(body, Request.CallCancelled); }