mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
XHTTP client: Add gRPC header to "stream-up" mode by default (#4042)
""Breaking"": Client uses "stream-up" mode by default when using **TLS H2** or REALITY
This commit is contained in:
parent
0a252ac15d
commit
817fa72874
5 changed files with 62 additions and 41 deletions
|
@ -46,6 +46,9 @@ func (c *DefaultDialerClient) OpenUpload(ctx context.Context, baseURL string) io
|
|||
reader, writer := io.Pipe()
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", baseURL, reader)
|
||||
req.Header = c.transportConfig.GetRequestHeader()
|
||||
if !c.transportConfig.NoGRPCHeader {
|
||||
req.Header.Set("Content-Type", "application/grpc")
|
||||
}
|
||||
go c.client.Do(req)
|
||||
return writer
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue