diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-01 14:54:49 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-01 14:54:49 -0500 |
| commit | 96120099cb2a1d23e46fc32b2985cabd1fa2a84a (patch) | |
| tree | 9b7719a304a0104d7c946f140c99184825dd6aac /MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 4d7c01622451b0a65d02e734e097c0083bb798e7 (diff) | |
add message for db upgrade
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 038116703..78d7a480e 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -268,13 +268,18 @@ namespace MediaBrowser.Server.Implementations.HttpServer private bool EnableLogging(string url) { - var parts = url.Split(new[] { '?' }, 2); - - var extension = Path.GetExtension(parts[0]); + var extension = GetExtension(url); return string.IsNullOrWhiteSpace(extension) || !_skipLogExtensions.ContainsKey(extension); } + private string GetExtension(string url) + { + var parts = url.Split(new[] { '?' }, 2); + + return Path.GetExtension(parts[0]); + } + /// <summary> /// Overridable method that can be used to implement a custom hnandler /// </summary> @@ -339,6 +344,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer { httpRes.Write(GlobalResponse); httpRes.ContentType = "text/plain"; + + if (!string.Equals(GetExtension(urlString), "html", StringComparison.OrdinalIgnoreCase)) + { + httpRes.StatusCode = 503; + } + return Task.FromResult(true); } |
