h2 icon indicating copy to clipboard operation
h2 copied to clipboard

Default server configuration prevents the use of server pushes

Open thalesfragoso opened this issue 11 months ago • 3 comments

https://github.com/hyperium/h2/blob/a8af2358647cd2a68f851dfe3228cc3116654223/src/server.rs#L1378-L1379

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.

thalesfragoso avatar Mar 01 '24 10:03 thalesfragoso

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

seanmonstar avatar Mar 01 '24 15:03 seanmonstar

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.

thalesfragoso avatar Mar 01 '24 16:03 thalesfragoso

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?

seanmonstar avatar Mar 01 '24 18:03 seanmonstar