Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@

using System.Buffers;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Http.Connections;

namespace FunctionalTests;

public class EchoConnectionHandler : ConnectionHandler
{
public override async Task OnConnectedAsync(ConnectionContext connection)
{
var context = connection.GetHttpContext();
// The 'withCredentials' tests wont send a cookie for cross-site requests
if (!context.WebSockets.IsWebSocketRequest && !context.Request.Cookies.ContainsKey("testCookie"))
{
return;
}

while (true)
{
var result = await connection.Transport.Input.ReadAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ describe("connection", () => {

await connection.start(TransferFormat.Text);

await connection.stop();

await closePromise;
});
}
Expand Down
Loading