fix metadata

This commit is contained in:
ginuerzh
2022-04-07 23:03:31 +08:00
parent 1415462d23
commit d011aefefd
10 changed files with 32 additions and 48 deletions

View File

@ -123,13 +123,16 @@ func (d *h2Dialer) Dial(ctx context.Context, address string, opts ...dialer.Dial
req := &http.Request{
Method: http.MethodConnect,
URL: &url.URL{Scheme: "https", Host: host},
Header: make(http.Header),
Header: d.md.header,
ProtoMajor: 2,
ProtoMinor: 0,
Body: pr,
Host: host,
// ContentLength: -1,
}
if req.Header == nil {
req.Header = make(http.Header)
}
if d.md.path != "" {
req.Method = http.MethodGet
req.URL.Path = d.md.path