diff options
| author | Vasily <just.one.man@yandex.ru> | 2020-04-12 23:26:45 +0300 |
|---|---|---|
| committer | Vasily <just.one.man@yandex.ru> | 2020-04-12 23:26:45 +0300 |
| commit | 61d9c9df5b4ad4b79679cccbb2a624447c824b67 (patch) | |
| tree | 3885a8dc259b8810a948a75b70d25a9f81a62ae6 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 71d8e66d9fbca1d448d8d4ec7c1fe9be55134076 (diff) | |
Addressing review feedback
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index c12862145..dd60e7a18 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -242,9 +242,7 @@ namespace Emby.Server.Implementations.HttpServer private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace, string urlToLog) { - string urlSuffix = string.IsNullOrWhiteSpace(urlToLog) - ? string.Format(CultureInfo.InvariantCulture, "; URL being processed: {0}", urlToLog) - : ""; + string urlSuffix = string.Format(CultureInfo.InvariantCulture, "; URL being processed: {0}", urlToLog); try { ex = GetActualException(ex); @@ -460,7 +458,7 @@ namespace Emby.Server.Implementations.HttpServer var stopWatch = new Stopwatch(); stopWatch.Start(); var httpRes = httpReq.Response; - string urlToLog = null; + string urlToLog = GetUrlToLog(urlString); string remoteIp = httpReq.RemoteIp; try @@ -506,8 +504,6 @@ namespace Emby.Server.Implementations.HttpServer return; } - urlToLog = GetUrlToLog(urlString); - if (string.Equals(localPath, _baseUrlPrefix + "/", StringComparison.OrdinalIgnoreCase) || string.Equals(localPath, _baseUrlPrefix, StringComparison.OrdinalIgnoreCase) || string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase) |
