Skip to content

Commit

Permalink
修正 request.Body 被错误 Dispose 问题 closed #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Roc committed Dec 18, 2020
1 parent f4c1e9e commit 3b76da9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public WeChatPayNotifyClient()
}

request.Body.Seek(0, SeekOrigin.Begin);
using (var reader = new StreamReader(request.Body, Encoding.UTF8))
using (var reader = new StreamReader(request.Body, Encoding.UTF8, true, 1024, true))
{
var body = await reader.ReadToEndAsync();
return await ExecuteAsync<T>(body, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public WeChatPayNotifyClient(IWeChatPayClient client, WeChatPayPlatformCertifica

request.Body.Seek(0, SeekOrigin.Begin);
var headers = GetWeChatPayHeadersFromRequest(request);
using (var reader = new StreamReader(request.Body, Encoding.UTF8))
using (var reader = new StreamReader(request.Body, Encoding.UTF8, true, 1024, true))
{
var body = await reader.ReadToEndAsync();
return await ExecuteAsync<T>(headers, body, options);
Expand Down

0 comments on commit 3b76da9

Please sign in to comment.