From 182c48f0b0681d479a5cbf7b4faa8012697305a3 Mon Sep 17 00:00:00 2001 From: Brennan Conroy Date: Fri, 12 Apr 2019 17:40:48 +0000 Subject: [PATCH] Merged PR 891: Update MessagePack dependency Update MessagePack dependency Related work items: #142 --- build/dependencies.props | 2 +- build/sources.props | 2 +- eng/Dependencies.props | 1 + eng/PatchConfig.props | 2 ++ .../src/Protocol/MessagePackHubProtocol.cs | 5 ++--- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index b5f3763217..d120513bd4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -108,7 +108,7 @@ 4.2.1 3.1.0 1.10.0 - 1.7.3.4 + 1.7.3.7 2.1.1 2.2.1 5.2.6 diff --git a/build/sources.props b/build/sources.props index 5b458ddf09..7648381d3b 100644 --- a/build/sources.props +++ b/build/sources.props @@ -19,7 +19,7 @@ https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; https://dotnet.myget.org/F/roslyn/api/v3/index.json; https://vside.myget.org/F/vssdk/api/v3/index.json; - https://vside.myget.org/F/vsmac/api/v3/index.json + https://vside.myget.org/F/vsmac/api/v3/index.json; diff --git a/eng/Dependencies.props b/eng/Dependencies.props index e98d42be14..2f7b478d68 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -98,6 +98,7 @@ and are generated based on the last package release. + diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 29e74d4f85..c25500cb91 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -28,6 +28,8 @@ Later on, this will be checked using this condition: + Microsoft.AspNetCore.SignalR.Protocols.MessagePack; + Microsoft.AspNetCore.SignalR.Redis; diff --git a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs index 0b693605bf..36e4886e42 100644 --- a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs +++ b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs @@ -245,14 +245,13 @@ namespace Microsoft.AspNetCore.SignalR.Protocol var headerCount = ReadMapLength(input, ref offset, "headers"); if (headerCount > 0) { - // If headerCount is larger than int.MaxValue, things are going to go horribly wrong anyway :) - var headers = new Dictionary((int)headerCount, StringComparer.Ordinal); + var headers = new Dictionary(StringComparer.Ordinal); for (var i = 0; i < headerCount; i++) { var key = ReadString(input, ref offset, $"headers[{i}].Key"); var value = ReadString(input, ref offset, $"headers[{i}].Value"); - headers[key] = value; + headers.Add(key, value); } return headers; }