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

Check window sizes in HTTP/2 #88

Closed
ericmj opened this issue Sep 29, 2020 · 2 comments · Fixed by #158
Closed

Check window sizes in HTTP/2 #88

ericmj opened this issue Sep 29, 2020 · 2 comments · Fixed by #158
Assignees

Comments

@ericmj
Copy link
Contributor

ericmj commented Sep 29, 2020

If you do not check the window sizes you can get errors if the client is sending faster than the server can receive:

Mint.HTTPError: the given data exceeds the connection window size, which is 65535.
The server will refill the window size of the connection when ready.
This will be handled transparently by stream/2.

Use the function Mint.HTTP2.get_window_size/2 https://hexdocs.pm/mint/Mint.HTTP2.html#get_window_size/2 to get the window sizes for the connection and request.

@ericmj
Copy link
Contributor Author

ericmj commented Sep 29, 2020

I see that you are using Mint.HTTP2.request/5 to send the full request body. We recently added a note that we do not recommend doing that: https://hexdocs.pm/mint/Mint.HTTP2.html#request/5-request-body-size and that you should instead use Mint.HTTP2.stream_request_body/3 to send the body.

@keathley keathley self-assigned this Sep 29, 2020
@keathley
Copy link
Collaborator

Thanks @ericmj. I'll take a look at both of these issues.

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