Lines Matching defs:scheme
96 altProto atomic.Value // of nil or map[string]RoundTripper, key is URI scheme
102 // The proxy type is determined by the URL scheme. "http"
103 // and "socks5" are supported. If the scheme is empty,
266 // "host[:port]", in which case the "http" scheme is assumed.
277 if req.URL.Scheme == "https" {
294 (proxyURL.Scheme != "http" &&
295 proxyURL.Scheme != "https" &&
296 proxyURL.Scheme != "socks5") {
363 scheme := req.URL.Scheme
364 isHTTP := scheme == "http" || scheme == "https"
379 if altRT := altProto[scheme]; altRT != nil {
386 return nil, &badStringError{"unsupported protocol scheme", scheme}
504 // RegisterProtocol registers a new protocol with scheme.
505 // The Transport will pass requests using the given scheme to rt.
514 func (t *Transport) RegisterProtocol(scheme string, rt RoundTripper) {
518 if _, exists := oldMap[scheme]; exists {
519 panic("protocol " + scheme + " already registered")
525 newMap[scheme] = rt
622 cm.targetScheme = treq.URL.Scheme
1114 if cm.scheme() == "https" && t.DialTLS != nil {
1148 if cm.scheme() == "https" {
1163 case cm.proxyURL.Scheme == "socks5":
1345 if (cm.proxyURL.Scheme == "http" || cm.proxyURL.Scheme == "https") && cm.targetScheme == "http" {
1351 scheme: cm.targetScheme,
1356 // scheme returns the first hop scheme: http, https, or socks5
1357 func (cm *connectMethod) scheme() string {
1359 return cm.proxyURL.Scheme
1386 proxy, scheme, addr string
1391 return fmt.Sprintf("%s|%s|%s", k.proxy, k.scheme, k.addr)
2149 port = portMap[url.Scheme]