aboutsummaryrefslogtreecommitdiff
path: root/ServiceStack/HttpHandlerFactory.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-12-04 17:02:21 -0500
committerGitHub <noreply@github.com>2016-12-04 17:02:21 -0500
commit06a8b8af88bad549f3722c6dd13b38df24a57583 (patch)
tree4a99e9bd84d093af9b87c5277346136396a670c9 /ServiceStack/HttpHandlerFactory.cs
parentf04b7339964ccc574a756207a7af33e21505b3c6 (diff)
parent8c8f2aaba5e4bf573efe2730b5450a8c07abe1b3 (diff)
Merge pull request #2329 from MediaBrowser/dev
Dev
Diffstat (limited to 'ServiceStack/HttpHandlerFactory.cs')
-rw-r--r--ServiceStack/HttpHandlerFactory.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/ServiceStack/HttpHandlerFactory.cs b/ServiceStack/HttpHandlerFactory.cs
index d48bfeb5f..5f4892d51 100644
--- a/ServiceStack/HttpHandlerFactory.cs
+++ b/ServiceStack/HttpHandlerFactory.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Services;
using ServiceStack.Host;
@@ -9,12 +10,16 @@ namespace ServiceStack
public class HttpHandlerFactory
{
// Entry point for HttpListener
- public static RestHandler GetHandler(IHttpRequest httpReq)
+ public static RestHandler GetHandler(IHttpRequest httpReq, ILogger logger)
{
var pathInfo = httpReq.PathInfo;
var pathParts = pathInfo.TrimStart('/').Split('/');
- if (pathParts.Length == 0) return null;
+ if (pathParts.Length == 0)
+ {
+ logger.Error("Path parts empty for PathInfo: {0}, Url: {1}", pathInfo, httpReq.RawUrl);
+ return null;
+ }
string contentType;
var restPath = RestHandler.FindMatchingRestPath(httpReq.HttpMethod, pathInfo, out contentType);