Skip to content

[HTTP3] Loopback server WaitForCancellationAsync logic is wrong #58234

@geoffkizer

Description

@geoffkizer

See here:

public async Task WaitForCancellationAsync(bool ignoreIncomingData = true)

All we are doing here is reading to the end of the read stream.

What we should be doing is validating that the client cancels the request, by aborting read and write with H3_REQUEST_CANCELLED. For reference, see the HTTP2 loopback implementation, which is waiting to receive a RST_STREAM.

Perhaps ironically, we need to implement #58229 in order to do be able to do this.

This means that any test that uses WaitForCancellationAsync is not actually validating cancellation properly. For better or worse, most of our cancellation tests don't actually use WaitForCancellationAsync anyway -- though they probably should. I will file a separate issue on that.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions