MCPcopy
hub / github.com/perkeep/perkeep / useHTTP2

Method useHTTP2

pkg/client/client.go:251–265  ·  view source on GitHub ↗
(tc *TransportConfig)

Source from the content-addressed store, hash-verified

249}
250
251func (c *Client) useHTTP2(tc *TransportConfig) bool {
252 if !c.useTLS() {
253 return false
254 }
255 if android.IsChild() {
256 // No particular reason; just untested so far.
257 return false
258 }
259 if os.Getenv("HTTPS_PROXY") != "" || os.Getenv("https_proxy") != "" ||
260 (tc != nil && tc.Proxy != nil) {
261 // Also just untested. Which proxies support h2 anyway?
262 return false
263 }
264 return true
265}
266
267// transportForConfig returns a transport for the client, setting the correct
268// Proxy, Dial, and TLSClientConfig if needed. It does not mutate c.

Callers 1

transportForConfigMethod · 0.95

Calls 2

useTLSMethod · 0.95
IsChildFunction · 0.92

Tested by

no test coverage detected