(tc *TransportConfig)
| 249 | } |
| 250 | |
| 251 | func (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. |
no test coverage detected