aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs17
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs6
2 files changed, 3 insertions, 20 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs
index 669603958..6aea83410 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs
@@ -62,12 +62,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
private IDisposable HttpListener { get; set; }
/// <summary>
- /// Gets or sets the protobuf serializer.
- /// </summary>
- /// <value>The protobuf serializer.</value>
- private IProtobufSerializer ProtobufSerializer { get; set; }
-
- /// <summary>
/// Occurs when [web socket connected].
/// </summary>
public event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
@@ -88,18 +82,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// Initializes a new instance of the <see cref="HttpServer" /> class.
/// </summary>
/// <param name="applicationHost">The application host.</param>
- /// <param name="protobufSerializer">The protobuf serializer.</param>
/// <param name="logger">The logger.</param>
/// <param name="serverName">Name of the server.</param>
/// <param name="defaultRedirectpath">The default redirectpath.</param>
/// <exception cref="System.ArgumentNullException">urlPrefix</exception>
- public HttpServer(IApplicationHost applicationHost, IProtobufSerializer protobufSerializer, ILogger logger, string serverName, string defaultRedirectpath)
+ public HttpServer(IApplicationHost applicationHost, ILogger logger, string serverName, string defaultRedirectpath)
: base()
{
- if (protobufSerializer == null)
- {
- throw new ArgumentNullException("protobufSerializer");
- }
if (logger == null)
{
throw new ArgumentNullException("logger");
@@ -119,7 +108,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
ServerName = serverName;
DefaultRedirectPath = defaultRedirectpath;
- ProtobufSerializer = protobufSerializer;
_logger = logger;
ApplicationHost = applicationHost;
@@ -562,9 +550,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
_logger.Info("Calling EndpointHost.ConfigureHost");
EndpointHost.ConfigureHost(this, ServerName, CreateServiceManager());
- _logger.Info("Registering protobuf as a content type filter");
- ContentTypeFilters.Register(ContentType.ProtoBuf, (reqCtx, res, stream) => ProtobufSerializer.SerializeToStream(res, stream), (type, stream) => ProtobufSerializer.DeserializeFromStream(stream, type));
-
_logger.Info("Calling ServiceStack AppHost.Init");
Init();
}
diff --git a/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs
index 75e077c38..ce9c376a5 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Common;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Server.Implementations.HttpServer
{
@@ -14,14 +13,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// Creates the server.
/// </summary>
/// <param name="applicationHost">The application host.</param>
- /// <param name="protobufSerializer">The protobuf serializer.</param>
/// <param name="logger">The logger.</param>
/// <param name="serverName">Name of the server.</param>
/// <param name="defaultRedirectpath">The default redirectpath.</param>
/// <returns>IHttpServer.</returns>
- public static IHttpServer CreateServer(IApplicationHost applicationHost, IProtobufSerializer protobufSerializer, ILogger logger, string serverName, string defaultRedirectpath)
+ public static IHttpServer CreateServer(IApplicationHost applicationHost, ILogger logger, string serverName, string defaultRedirectpath)
{
- return new HttpServer(applicationHost, protobufSerializer, logger, serverName, defaultRedirectpath);
+ return new HttpServer(applicationHost, logger, serverName, defaultRedirectpath);
}
}
}