diff --git a/websocket-sharp/AssemblyInfo.cs b/websocket-sharp/AssemblyInfo.cs index c85deaa45..15bf9a8af 100644 --- a/websocket-sharp/AssemblyInfo.cs +++ b/websocket-sharp/AssemblyInfo.cs @@ -7,7 +7,7 @@ [assembly: AssemblyTitle("websocket-sharp")] [assembly: AssemblyDescription("A C# implementation of the WebSocket protocol client and server")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("sta.blockhead")] [assembly: AssemblyProduct("websocket-sharp.dll")] [assembly: AssemblyCopyright("sta.blockhead")] [assembly: AssemblyTrademark("")] @@ -17,7 +17,9 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.0.2.*")] +[assembly: AssemblyVersion("1.0.3.0")] +[assembly: AssemblyFileVersion("1.0.3.0")] +[assembly: AssemblyInformationalVersion("1.0.3-alpha")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/websocket-sharp/Server/WebSocketServiceManager.cs b/websocket-sharp/Server/WebSocketServiceManager.cs index 8ed76b335..7fa51bc80 100644 --- a/websocket-sharp/Server/WebSocketServiceManager.cs +++ b/websocket-sharp/Server/WebSocketServiceManager.cs @@ -33,6 +33,8 @@ using System.Text; using System.Threading; using WebSocketSharp.Net; +using System.Linq; +using System.Text.RegularExpressions; namespace WebSocketSharp.Server { @@ -315,7 +317,12 @@ internal bool InternalTryGetServiceHost (string path, out WebSocketServiceHost h bool ret; lock (_sync) { path = HttpUtility.UrlDecode (path).TrimEndSlash (); - ret = _hosts.TryGetValue (path, out host); + + var results = from result in _hosts + where Regex.Match(path, result.Key, RegexOptions.Singleline).Success + select result; + ret = results.Count() != 0; + host = results.FirstOrDefault().Value; } if (!ret) diff --git a/websocket-sharp/WebSocketFrame.cs b/websocket-sharp/WebSocketFrame.cs index 219242c1d..859e87dbb 100644 --- a/websocket-sharp/WebSocketFrame.cs +++ b/websocket-sharp/WebSocketFrame.cs @@ -104,12 +104,12 @@ internal WebSocketFrame ( Fin fin, Opcode opcode, PayloadData payloadData, bool compressed, bool mask) { _fin = fin; - _rsv1 = opcode.IsData () && compressed ? Rsv.On : Rsv.Off; + var len = payloadData.Length; + _rsv1 = opcode.IsData () && compressed && len > 0 ? Rsv.On : Rsv.Off; _rsv2 = Rsv.Off; _rsv3 = Rsv.Off; _opcode = opcode; - var len = payloadData.Length; if (len < 126) { _payloadLength = (byte) len; _extPayloadLength = WebSocket.EmptyBytes; diff --git a/websocket-sharp/websocket-sharp.csproj b/websocket-sharp/websocket-sharp.csproj index 087679547..63b4876ae 100644 --- a/websocket-sharp/websocket-sharp.csproj +++ b/websocket-sharp/websocket-sharp.csproj @@ -1,5 +1,5 @@ - - + + Debug AnyCPU @@ -12,6 +12,11 @@ v3.5 true websocket-sharp.snk + + + + + 3.5 true diff --git a/websocket-sharp/websocket-sharp.nuspec b/websocket-sharp/websocket-sharp.nuspec new file mode 100644 index 000000000..3cb131ad5 --- /dev/null +++ b/websocket-sharp/websocket-sharp.nuspec @@ -0,0 +1,16 @@ + + + + $id$ + $version$ + $title$ + $author$ + $author$ + false + $description$ + http://teamcity.loccioni.com/repository/download/Aulos_LoccioniAulosCSharp_Develop/1209:id/html/index.html + Copyright 2015 + https://trello-attachments.s3.amazonaws.com/55d5dbd19330afb229c8307e/128x128/053650646840a5f2193be3d047079bac/logo_nuget.png + https://git.loccioni.com/aulos/Loccioni-Aulos-CSharp + + \ No newline at end of file