简体   繁体   中英

How to configure frame size in net/http for HTTP2

I am trying to set the frame size to 16 MB in HTTP/2 Server using net/http library. Default size is 16 KB.

Tried following:

http2Server = http2.Server{
MaxReadFrameSize: 2 << 24 -1,
}
_ = http2.ConfigureServer(srv, &http2Server)

But still getting the frame size as 16 KB on client side (verified by printing length of response body). Is there any other way to set the Max Frame Size on Client and Server side ?

2<<24是〜32MB,您可能想要1<<24-1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM