Skip to content

Commit

Permalink
Optimize the RecyclableMemoryStream usage. (#17030)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamradocz authored Nov 18, 2024
1 parent 0917712 commit d03b3b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task<IActionResult> ServiceEndpoint([ModelBinder(BinderType = typeo
result.Save(w);
}

var content = Encoding.UTF8.GetString(stream.GetBuffer(), 0, (int)stream.Length);
var content = Encoding.UTF8.GetString(stream.GetReadOnlySequence());

return Content(content, "text/xml");
}
Expand Down

0 comments on commit d03b3b4

Please sign in to comment.