diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-03-07 15:54:30 +0100 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-03-07 21:13:13 +0100 |
| commit | c5fce647defd2eace2d2431ccc52ffe1d027c184 (patch) | |
| tree | cafd17e6a1217c4283ce7c1b2bee3ac7e77850ab /Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs | |
| parent | 10a0d6bdba821449abfb1d48e9708ba6f3fc6a62 (diff) | |
Cleanup/simplification
* Removed useless copies/allocations
* Reduced unneeded complexity
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs')
| -rw-r--r-- | Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs b/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs index bc002dc4c..10b7c4514 100644 --- a/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs +++ b/Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs @@ -4,7 +4,6 @@ using System.Globalization; using System.IO; using System.Net; using System.Text; -using Emby.Server.Implementations.HttpServer; using MediaBrowser.Model.Services; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; @@ -405,8 +404,7 @@ namespace Emby.Server.Implementations.SocketSharp return null; } - var path = sbPathInfo.ToString(); - return path.Length > 1 ? path.TrimEnd('/') : "/"; + return sbPathInfo.Length > 1 ? sbPathInfo.ToString().TrimEnd('/') : "/"; } public string UserAgent => request.Headers[HeaderNames.UserAgent]; |
