aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-01 22:54:33 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-01 22:54:33 -0400
commitc7c72dd1a89217f48cb48db93d9ee1fa5ee6171d (patch)
tree71c47742119e3f546f2a34f01777b2288fa83979 /MediaBrowser.Server.Implementations/HttpServer
parentc741082dfd709e20e9b762028a684d39755ecd28 (diff)
web client re-org
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
index 009e4716d..cfe5ef4f0 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -1,4 +1,5 @@
using System.Net.Sockets;
+using System.Runtime.Serialization;
using Funq;
using MediaBrowser.Common;
using MediaBrowser.Common.Extensions;
@@ -246,8 +247,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
_autoResetEvents[index].Set();
}
- if (context == null) return;
-
var date = DateTime.Now;
Task.Factory.StartNew(async () =>
@@ -375,7 +374,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
};
var operationName = context.Request.GetOperationName();
- var httpReq = context.ToRequest(operationName);
+ var httpReq = GetRequest(context, operationName);
var httpRes = httpReq.Response;
var contentType = httpReq.ResponseContentType;
@@ -409,6 +408,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
}
}
+ private static ListenerRequest GetRequest(HttpListenerContext httpContext, string operationName)
+ {
+ var req = new ListenerRequest(httpContext, operationName, RequestAttributes.None);
+ req.RequestAttributes = req.GetAttributes();
+ return req;
+ }
+
/// <summary>
/// Shut down the Web Service
/// </summary>
@@ -436,7 +442,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
var operationName = context.Request.GetOperationName();
- var httpReq = context.ToRequest(operationName);
+ var httpReq = GetRequest(context, operationName);
var httpRes = httpReq.Response;
var handler = HttpHandlerFactory.GetHandler(httpReq);