Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/3: Return H3_FRAME_UNEXPECTED protocol error for unexpected frames #29617

Closed
JamesNK opened this issue Jan 26, 2021 · 4 comments
Closed
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions HTTP3
Milestone

Comments

@JamesNK
Copy link
Member

JamesNK commented Jan 26, 2021

Spec says that Kestrel should return H3_FRAME_UNEXPECTED protocol error for unexpected frames

https://tools.ietf.org/html/draft-ietf-quic-http-33#section-4.1

Currently doing:

private Task ProcessHttp3Stream<TContext>(IHttpApplication<TContext> application, in ReadOnlySequence<byte> payload) where TContext : notnull
{
switch (_incomingFrame.Type)
{
case Http3FrameType.Data:
return ProcessDataFrameAsync(payload);
case Http3FrameType.Headers:
return ProcessHeadersFrameAsync(application, payload);
// need to be on control stream
case Http3FrameType.DuplicatePush:
case Http3FrameType.PushPromise:
case Http3FrameType.Settings:
case Http3FrameType.GoAway:
case Http3FrameType.CancelPush:
case Http3FrameType.MaxPushId:
throw new Http3ConnectionException("HTTP_FRAME_UNEXPECTED");
default:
return ProcessUnknownFrameAsync();
}
}

Also check other places where Kestrel processes frame types.

@ghost
Copy link

ghost commented Jan 27, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@BrennanConroy
Copy link
Member

@wtgodbe Would you be interested in taking this on for preview3?

@wtgodbe
Copy link
Member

wtgodbe commented Feb 24, 2021

@wtgodbe Would you be interested in taking this on for preview3?

Yup!

@JamesNK JamesNK assigned JamesNK and unassigned wtgodbe Mar 22, 2021
@JamesNK
Copy link
Member Author

JamesNK commented Mar 22, 2021

Fixed by #29665

@JamesNK JamesNK closed this as completed Mar 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 21, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions HTTP3
Projects
None yet
Development

No branches or pull requests

4 participants