From 8753dd15defd4dacc1a404c291caec473670c066 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 8 Jan 2018 04:18:15 +0900 Subject: [PATCH] Remove BOM from IPN --- BTCPayServer/HostedServices/InvoiceNotificationManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/HostedServices/InvoiceNotificationManager.cs b/BTCPayServer/HostedServices/InvoiceNotificationManager.cs index 1ad9112ec..8a307afb2 100644 --- a/BTCPayServer/HostedServices/InvoiceNotificationManager.cs +++ b/BTCPayServer/HostedServices/InvoiceNotificationManager.cs @@ -115,6 +115,7 @@ namespace BTCPayServer.HostedServices } } + Encoding UTF8 = new UTF8Encoding(false); private async Task SendNotification(InvoiceEntity invoice, CancellationToken cancellation) { var request = new HttpRequestMessage(); @@ -149,7 +150,7 @@ namespace BTCPayServer.HostedServices #pragma warning restore CS0618 } request.RequestUri = new Uri(invoice.NotificationURL, UriKind.Absolute); - request.Content = new StringContent(JsonConvert.SerializeObject(notification), Encoding.UTF8, "application/json"); + request.Content = new StringContent(JsonConvert.SerializeObject(notification), UTF8, "application/json"); var response = await _Client.SendAsync(request, cancellation); return response; }