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

Change API of Http3RequestStreamInboundHandler to better handle FIN #240

Merged
merged 1 commit into from Aug 31, 2023

Conversation

normanmaurer
Copy link
Member

Motivation:

5740c52 introduced a workaround for correctly handle FIN when multiple http3 frames are contained in one QUIC frame. While this worked it was kind of hacky and we should better adjust the API.

Modifications:

  • Change Http3RequestStreamInboundHandler API for handling frames and FIN
  • Adjust tests.

Result:

Better fix for handling multiple frames

Motivation:

5740c52 introduced a workaround for correctly handle FIN when multiple http3 frames are contained in one QUIC frame. While this worked it was kind of hacky and we should better adjust the API.

Modifications:

- Change Http3RequestStreamInboundHandler API for handling frames and FIN
- Adjust tests.

Result:

Better fix for handling multiple frames
@normanmaurer
Copy link
Member Author

@yawkat WDYT ?

Copy link
Contributor

@yawkat yawkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bit annoying that we cant coalesce FullHttpRequest anymore but i guess that's not doable without buffering

} else {
ctx.fireChannelRead(new DefaultHttpContent(frame.content()));
protected void channelRead(ChannelHandlerContext ctx, Http3DataFrame frame) throws Exception {
inboundTranslationInProgress = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be hit without a Http3HeadersFrame that already set this flag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should never happen as a header frame must be sent first (which is validated by the frame decoder etc)

@normanmaurer
Copy link
Member Author

it's a bit annoying that we cant coalesce FullHttpRequest anymore but i guess that's not doable without buffering

yeah... that said I think its most likely not a big deal and the API / implementation seems a bit better this way.

@normanmaurer
Copy link
Member Author

@yawkat btw I am happy if you have any better idea :)

@yawkat
Copy link
Contributor

yawkat commented Aug 30, 2023

i don't :)

@normanmaurer normanmaurer merged commit 01a15ab into main Aug 31, 2023
5 checks passed
@normanmaurer normanmaurer deleted the fin branch August 31, 2023 07:34
@normanmaurer normanmaurer added this to the 0.0.21.Final milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants