code: func getH2HeaderBytes(r *http.Request, maxHeaderTableSize uint32) ([]byte, error) {
  	headerBytes := bytes.NewBuffer(nil)
  	hpackEnc := hpack.NewEncoder(headerBytes)
  	hpackEnc.SetMaxDynamicTableSize(maxHeaderTableSize)
  
  	// Section 8.1.2.3
  	err := hpackEnc.WriteField(hpack.HeaderField{
  		Name:  ":method",
  		Value: r.Method,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	err = hpackEnc.WriteField(hpack.HeaderField{
  		Name:  ":scheme",
  		Value: "http",
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	err = hpackEnc.WriteField(hpack.HeaderField{
  		Name:  ":authority",
  		Value: r.Host,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	path := r.URL.Path
  	if r.URL.RawQuery != "" {
  		path = strings.Join([]string{path, r.URL.RawQuery}, "?")
  	}
  	err = hpackEnc.WriteField(hpack.HeaderField{
  		Name:  ":path",
  		Value: path,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	// TODO Implement Section 8.3
  
  	for header, values := range r.Header {
  		// Skip non h2 headers
  		if isNonH2Header(header) {
  			continue
  		}
  		for _, v := range values {
  			err := hpackEnc.WriteField(hpack.HeaderField{
  				Name:  strings.ToLower(header),
  				Value: v,
  			})
  			if err != nil {
  				return nil, err
  			}
  		}
  	}
  	return headerBytes.Bytes(), nil
  }
docs: // getH2HeaderBytes return the headers in r a []bytes encoded by HPACK.