diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-22 17:38:48 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-01-22 17:38:48 -0500 |
| commit | d4adc9799c54b46c99a02cc2e74e62ea20f809e3 (patch) | |
| tree | 65f6a4b603c603cb4179c11876e1ccba11f49b81 /MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | ac80f22686446c10b87c063014fc0db55fd53186 (diff) | |
reduce size of logging messages
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 54fb345eb..b4c442ec8 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -253,13 +253,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer { try { - LogHttpRequest(context, index); - var request = context.Request; + LogHttpRequest(request, index); + if (request.IsWebSocketRequest) { - ProcessWebSocketRequest(context); + await ProcessWebSocketRequest(context).ConfigureAwait(false); return; } @@ -299,7 +299,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (EnableHttpRequestLogging) { - LoggerUtils.LogResponse(_logger, context, url, endPoint, duration); + LoggerUtils.LogResponse(_logger, context.Response, url, endPoint, duration); } } catch (Exception ex) @@ -315,10 +315,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer /// <summary> /// Logs the HTTP request. /// </summary> - /// <param name="ctx">The CTX.</param> - private void LogHttpRequest(HttpListenerContext ctx, int index) + /// <param name="request">The request.</param> + /// <param name="index">The index.</param> + private void LogHttpRequest(HttpListenerRequest request, int index) { - var endpoint = ctx.Request.LocalEndPoint; + var endpoint = request.LocalEndPoint; if (endpoint != null) { @@ -329,7 +330,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (EnableHttpRequestLogging) { - LoggerUtils.LogRequest(_logger, ctx, index); + LoggerUtils.LogRequest(_logger, request, index); } } |
