Skip to content

Ignore 1xx frames #515

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

Closed
inikulin opened this issue Feb 5, 2021 · 2 comments · Fixed by #521
Closed

Ignore 1xx frames #515

inikulin opened this issue Feb 5, 2021 · 2 comments · Fixed by #521
Assignees

Comments

@inikulin
Copy link

inikulin commented Feb 5, 2021

Currently when hyper encounters such frames it resets the stream with an error. The plan for now is to just ignore these informational frames. With the next step being an implementation of API to handle them in h2 and hyper (tracked in #167).

@inikulin
Copy link
Author

inikulin commented Feb 5, 2021

@seanmonstar any pointers for where to start in the code? Also, do you have any ideas how we can test it, considering that we don't have a server capable of sending such frames yet?

@seanmonstar
Copy link
Member

You'd probably be able to add a check before calling recv.recv_headers, where if the Peer is client, and there is a 1xx status, the headers frame could be ignored instead of triggering the stream to enter the streaming state.

Or possibly it should happen inside recv.recv_headers, before calling open, I haven't though about which makes more sense.

For tests, you can add to tests/h2-tests/tests/client_request.rs. In there you can see it's possible to make a mock server with a recipe of h2 frames that would be received and sent, so you can send a headers from with 103, and then a headers frame with 200. It may be worth adding tests for a few combination of behaviors that could happen (you decide).

kornelski added a commit to kornelski/h2 that referenced this issue Feb 18, 2021
kornelski added a commit to kornelski/h2 that referenced this issue Feb 24, 2021
kornelski added a commit to kornelski/h2 that referenced this issue Feb 25, 2021
seanmonstar pushed a commit that referenced this issue Feb 25, 2021
BenxiangGe pushed a commit to BenxiangGe/h2 that referenced this issue Jul 26, 2021
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 a pull request may close this issue.

2 participants