From 4ad96e4ff5756ddb235a061231469b30c1ff984d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 4 Oct 2015 18:04:56 -0400 Subject: update logging levels --- MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs | 2 +- .../HttpServer/Security/AuthService.cs | 2 +- .../HttpServer/Security/AuthorizationContext.cs | 6 +++++- .../HttpServer/SocketSharp/WebSocketSharpListener.cs | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Server.Implementations/HttpServer') diff --git a/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs b/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs index 5558c24d7..f038591aa 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs @@ -27,7 +27,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer var msg = "HTTP Response " + statusCode + " to " + endPoint + responseTime; - logger.LogMultiline(msg, LogSeverity.Debug, log); + logger.LogMultiline(msg, LogSeverity.Info, log); } } } diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs index b4da40702..f6b14fcab 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs @@ -220,7 +220,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security { if (string.IsNullOrWhiteSpace(token)) { - throw new SecurityException("Access token is invalid or expired."); + throw new SecurityException("Access token is required."); } var info = GetTokenInfo(request); diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index ae5ce796e..509a00ff9 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -62,8 +62,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security auth.TryGetValue("Version", out version); } - var token = httpReq.Headers["X-MediaBrowser-Token"]; + var token = httpReq.Headers["X-Emby-Token"]; + if (string.IsNullOrWhiteSpace(token)) + { + token = httpReq.Headers["X-MediaBrowser-Token"]; + } if (string.IsNullOrWhiteSpace(token)) { token = httpReq.QueryString["api_key"]; diff --git a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs index fdb27d40d..f8178c115 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/SocketSharp/WebSocketSharpListener.cs @@ -191,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp var type = request.IsWebSocketRequest ? "Web Socket" : "HTTP " + request.HttpMethod; - logger.LogMultiline(type + " " + request.Url, LogSeverity.Debug, log); + logger.LogMultiline(type + " " + request.Url, LogSeverity.Info, log); } private void HandleError(Exception ex, HttpListenerContext context) -- cgit v1.2.3