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

Default server configuration prevents the use of server pushes #755

Open
thalesfragoso opened this issue Mar 1, 2024 · 3 comments
Open

Comments

@thalesfragoso
Copy link

h2/src/server.rs

Lines 1378 to 1379 in a8af235

// Server does not need to locally initiate any streams
initial_max_send_streams: 0,

This is arguably a bad default, given that it will block any server pushes unless the client explicitly sends a non-zero MAX_CONCURRENT_STREAMS setting.

I don't think we should limit the server that way unless the client explicitly requests that.

@seanmonstar
Copy link
Member

Interesting find. I see how that'd be a problem, yea. A PR to change that is welcome.

@thalesfragoso
Copy link
Author

Interesting find.

There was some head scratching involved when I couldn't get server push working between a h2 client and server. The workaround is to have the client always send a MAX_CONCURRENT_STREAMS setting, obliviously.

A PR to change that is welcome.

Will do soon. Any opinions on a default value ? I will also add a method to the server Builder, like the one that already exists in the client's.

@seanmonstar
Copy link
Member

Unless there's prior art we can copy, an educated guess makes sense.

  • On the one hand, how painful is it if the client rejects a bunch of eager push promises?
  • On the other, how often do clients even send that setting at all?

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

No branches or pull requests

2 participants