IWebClient: log redirect target

This commit is contained in:
kaso17 2016-12-11 05:48:43 +01:00
parent d909d0cb60
commit 4f86272074
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ namespace Jackett.Utils.Clients
{
logger.Debug(string.Format("IWebClient.GetBytes(Url:{0})", request.Url));
var result = await Run(request);
logger.Debug(string.Format("IWebClient: Returning {0} => {1} bytes", result.Status, (result.Content == null ? "<NULL>" : result.Content.Length.ToString())));
logger.Debug(string.Format("IWebClient: Returning {0} => {1} bytes", result.Status, (result.IsRedirect ? result.RedirectingTo + " " : " ") + (result.Content == null ? "<NULL>" : result.Content.Length.ToString())));
return result;
}
@ -75,7 +75,7 @@ namespace Jackett.Utils.Clients
decodedContent = encoding.GetString(result.Content);
stringResult.Content = decodedContent;
logger.Debug(string.Format("IWebClient: Returning {0} => {1}", result.Status, (decodedContent == null ? "<NULL>" : decodedContent)));
logger.Debug(string.Format("IWebClient: Returning {0} => {1}", result.Status, (result.IsRedirect ? result.RedirectingTo + " " : " ") + (decodedContent == null ? "<NULL>" : decodedContent)));
string[] server;
if (stringResult.Headers.TryGetValue("server", out server))