File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tests/ModelContextProtocol.AspNetCore.Tests Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 22using Microsoft . Extensions . DependencyInjection ;
33using Microsoft . Extensions . Primitives ;
44using ModelContextProtocol . Client ;
5+ using System . Collections . Concurrent ;
56
67namespace ModelContextProtocol . AspNetCore . Tests ;
78
@@ -148,7 +149,7 @@ public async Task SseMode_Works_WithSseEndpoint()
148149 [ Fact ]
149150 public async Task StreamableHttpClient_SendsMcpProtocolVersionHeader_AfterInitialization ( )
150151 {
151- var protocolVersionHeaderValues = new List < string ? > ( ) ;
152+ var protocolVersionHeaderValues = new ConcurrentQueue < string ? > ( ) ;
152153
153154 Builder . Services . AddMcpServer ( ) . WithHttpTransport ( ConfigureStateless ) . WithTools < EchoHttpContextUserTools > ( ) ;
154155
@@ -160,7 +161,7 @@ public async Task StreamableHttpClient_SendsMcpProtocolVersionHeader_AfterInitia
160161 {
161162 if ( ! StringValues . IsNullOrEmpty ( context . Request . Headers [ "mcp-protocol-version" ] ) )
162163 {
163- protocolVersionHeaderValues . Add ( context . Request . Headers [ "mcp-protocol-version" ] ) ;
164+ protocolVersionHeaderValues . Enqueue ( context . Request . Headers [ "mcp-protocol-version" ] ) ;
164165 }
165166
166167 await next ( context ) ;
You can’t perform that action at this time.
0 commit comments