Golang http2 split a request into more than one packets

Hi,

We’re using http2 client send a request, but we found even the package is not big, a request will be split in 1 packet of header and 2 packets of data.

As we’re in a very high load test, we hope to assemble one packet including both header and body.

Is there any way to achieve this?
Many Thanks in advance.

Code for testing:

//begin
tr := &http2.Transport{
AllowHTTP: true,
DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) {
return net.Dial(netw, addr)
},
}

client := http.Client{
Transport: tr,
}

req, _ := http.NewRequest("POST", "http://127.0.0.1:8443", strings.NewReader("aaa"))
resp, _ := client.Do(req)

//ends

BRs,
Ray

already found it in http2/transport.go, Golang will send header and body separately.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.