| 
														
															@@ -19,6 +19,7 @@ using System.Linq; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using System.Reflection; 
														 | 
														
														 | 
														
															 using System.Reflection; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using System.Threading; 
														 | 
														
														 | 
														
															 using System.Threading; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using System.Threading.Tasks; 
														 | 
														
														 | 
														
															 using System.Threading.Tasks; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+using MediaBrowser.Common.Security; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 namespace MediaBrowser.Server.Implementations.HttpServer 
														 | 
														
														 | 
														
															 namespace MediaBrowser.Server.Implementations.HttpServer 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 { 
														 | 
														
														 | 
														
															 { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -65,7 +66,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         public HttpListenerHost(IApplicationHost applicationHost, 
														 | 
														
														 | 
														
															         public HttpListenerHost(IApplicationHost applicationHost, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ILogManager logManager,  
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            ILogManager logManager, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             IServerConfigurationManager config, 
														 | 
														
														 | 
														
															             IServerConfigurationManager config, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             string serviceName, 
														 | 
														
														 | 
														
															             string serviceName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             string defaultRedirectPath, params Assembly[] assembliesWithServices) 
														 | 
														
														 | 
														
															             string defaultRedirectPath, params Assembly[] assembliesWithServices) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -80,7 +81,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         public string GlobalResponse { get; set; } 
														 | 
														
														 | 
														
															         public string GlobalResponse { get; set; } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         public override void Configure(Container container) 
														 | 
														
														 | 
														
															         public override void Configure(Container container) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         { 
														 | 
														
														 | 
														
															         { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath; 
														 | 
														
														 | 
														
															             HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -92,7 +93,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 {typeof (FileNotFoundException), 404}, 
														 | 
														
														 | 
														
															                 {typeof (FileNotFoundException), 404}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 {typeof (DirectoryNotFoundException), 404}, 
														 | 
														
														 | 
														
															                 {typeof (DirectoryNotFoundException), 404}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 {typeof (SecurityException), 401}, 
														 | 
														
														 | 
														
															                 {typeof (SecurityException), 401}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                {typeof (UnauthorizedAccessException), 500} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                {typeof (PaymentRequiredException), 402}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                {typeof (UnauthorizedAccessException), 500}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                {typeof (ApplicationException), 500} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             }; 
														 | 
														
														 | 
														
															             }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             HostConfig.Instance.DebugMode = true; 
														 | 
														
														 | 
														
															             HostConfig.Instance.DebugMode = true; 
														 |