The Free Software Media System - Server Backend & API
Single line comments should start with a space
Bond-009ebae7229c1db
diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.csindex a8ba4cdb59..af8fe96167 100644--- a/Jellyfin.Server/SocketSharp/RequestMono.cs+++ b/Jellyfin.Server/SocketSharp/RequestMono.cs@@ -570,10 +570,10 @@ namespace Jellyfin.Server.SocketSharppublic HttpMultipart(Stream data, string b, Encoding encoding){this.data = data;- //DB: 30/01/11: cannot set or read the Position in HttpListener in Win.NET- //var ms = new MemoryStream(32 * 1024);- //data.CopyTo(ms);- //this.data = ms;+ // DB: 30/01/11: cannot set or read the Position in HttpListener in Win.NET+ // var ms = new MemoryStream(32 * 1024);+ // data.CopyTo(ms);+ // this.data = ms;boundary = b;boundary_bytes = encoding.GetBytes(b);diff --git a/Jellyfin.Server/SocketSharp/SharpWebSocket.cs b/Jellyfin.Server/SocketSharp/SharpWebSocket.csindex f371cb25a5..e7e36e31be 100644--- a/Jellyfin.Server/SocketSharp/SharpWebSocket.cs+++ b/Jellyfin.Server/SocketSharp/SharpWebSocket.cs@@ -55,7 +55,7 @@ namespace Jellyfin.Server.SocketSharpvoid socket_OnError(object sender, SocketHttpListener.ErrorEventArgs e){_logger.LogError("Error in SharpWebSocket: {Message}", e.Message ?? string.Empty);- //Closed?.Invoke(this, EventArgs.Empty);+ // Closed?.Invoke(this, EventArgs.Empty);}void socket_OnClose(object sender, SocketHttpListener.CloseEventArgs e)@@ -67,14 +67,6 @@ namespace Jellyfin.Server.SocketSharpvoid socket_OnMessage(object sender, SocketHttpListener.MessageEventArgs e){- //if (!string.IsNullOrEmpty(e.Data))- //{- // if (OnReceive != null)- // {- // OnReceive(e.Data);- // }- // return;- //}if (OnReceiveBytes != null){OnReceiveBytes(e.RawData);@@ -142,11 +134,5 @@ namespace Jellyfin.Server.SocketSharp/// </summary>/// <value>The receive action.</value>public Action<byte[]> OnReceiveBytes { get; set; }-- /// <summary>- /// Gets or sets the on receive.- /// </summary>- /// <value>The on receive.</value>- public Action<string> OnReceive { get; set; }}}diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.csindex a0ffd1ccf4..4b6649217b 100644--- a/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs@@ -201,7 +201,7 @@ namespace Jellyfin.Server.SocketSharp}catch (ObjectDisposedException){- //TODO Investigate and properly fix.+ // TODO: Investigate and properly fix.}catch (Exception ex){@@ -252,7 +252,7 @@ namespace Jellyfin.Server.SocketSharpStop();}- //release unmanaged resources here...+ // release unmanaged resources here..._disposed = true;}}diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.csindex ebeb18ea06..37fc6fe12d 100644--- a/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpRequest.cs@@ -24,7 +24,7 @@ namespace Jellyfin.Server.SocketSharpthis.request = httpContext.Request;this.response = new WebSocketSharpResponse(logger, httpContext.Response, this);- //HandlerFactoryPath = GetHandlerPathIfAny(UrlPrefixes[0]);+ // HandlerFactoryPath = GetHandlerPathIfAny(UrlPrefixes[0]);}private static string GetHandlerPathIfAny(string listenerUrl)diff --git a/Jellyfin.Server/SocketSharp/WebSocketSharpResponse.cs b/Jellyfin.Server/SocketSharp/WebSocketSharpResponse.csindex cabc96b237..68995a819e 100644--- a/Jellyfin.Server/SocketSharp/WebSocketSharpResponse.cs+++ b/Jellyfin.Server/SocketSharp/WebSocketSharpResponse.cs@@ -51,7 +51,7 @@ namespace Jellyfin.Server.SocketSharpset => _response.ContentType = value;}- //public ICookies Cookies { get; set; }+ // public ICookies Cookies { get; set; }public void AddHeader(string name, string value){@@ -114,9 +114,9 @@ namespace Jellyfin.Server.SocketSharppublic void SetContentLength(long contentLength){- //you can happily set the Content-Length header in Asp.Net- //but HttpListener will complain if you do - you have to set ContentLength64 on the response.- //workaround: HttpListener throws "The parameter is incorrect" exceptions when we try to set the Content-Length header+ // you can happily set the Content-Length header in Asp.Net+ // but HttpListener will complain if you do - you have to set ContentLength64 on the response.+ // workaround: HttpListener throws "The parameter is incorrect" exceptions when we try to set the Content-Length header_response.ContentLength64 = contentLength;}@@ -147,10 +147,6 @@ namespace Jellyfin.Server.SocketSharp{sb.Append($";domain={cookie.Domain}");}- //else if (restrictAllCookiesToDomain != null)- //{- // sb.Append($";domain={restrictAllCookiesToDomain}");- //}if (cookie.Secure){