Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Commit

Permalink
Fix for RPC client
Browse files Browse the repository at this point in the history
  • Loading branch information
fenix2222 committed Mar 27, 2019
1 parent 946287b commit 1c178b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Stratis.Bitcoin.Features.RPC/RPCClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ private async Task SendBatchAsyncCoreAsync(List<(RPCRequest request, TaskComplet
try
{
webResponse = await webRequest.GetResponseAsync().ConfigureAwait(false);
webResponse.ContentType = "application/json; charset=utf-8";
if (string.IsNullOrEmpty(webResponse.ContentType))
webResponse.ContentType = "application/json; charset=utf-8";

response = JArray.Load(new JsonTextReader(
new StreamReader(
await ToMemoryStreamAsync(webResponse.GetResponseStream()).ConfigureAwait(false), Encoding.UTF8)));
Expand Down

0 comments on commit 1c178b7

Please sign in to comment.