core: test for cleanse log message (#15616)

This commit is contained in:
Bogdan
2024-09-30 11:26:57 +03:00
committed by GitHub
parent 00a9c9cbc7
commit f2db8aa0fd
2 changed files with 21 additions and 2 deletions

View File

@@ -174,8 +174,7 @@ namespace Jackett.Common.Utils.Clients
var postData = "";
if (request.Type == RequestType.POST)
{
var lines = request.PostData?.Select(kvp => kvp.Key + "=" + kvp.Value);
lines ??= new List<string>();
var lines = request.PostData?.Select(kvp => kvp.Key + "=" + kvp.Value).ToList() ?? new List<string>();
postData = $" PostData: {{{string.Join(", ", lines)}}} RawBody: {request.RawBody}";
}
logger.Debug($"WebClient({ClientType}).GetResultAsync(Method: {request.Type} Url: {request.Url}{postData})");