瀏覽代碼

Update WebSocketSharpRequest.cs

Bond-009 5 年之前
父節點
當前提交
0676d1c2f4
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs

+ 2 - 3
Emby.Server.Implementations/SocketSharp/WebSocketSharpRequest.cs

@@ -208,9 +208,8 @@ namespace Emby.Server.Implementations.SocketSharp
 
         private static string GetQueryStringContentType(HttpRequest httpReq)
         {
-            string formatStr = httpReq.Query["format"].ToString();
-            ReadOnlySpan<char> format = formatStr;
-            if (formatStr == null)
+            ReadOnlySpan<char> format = httpReq.Query["format"].ToString();
+            if (formatStr == ReadOnlySpan<char>.Empty)
             {
                 const int FormatMaxLength = 4;
                 ReadOnlySpan<char> pi = httpReq.Path.ToString();