Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 174 for roundTrip (0.24 sec)

  1. src/net/http/http_test.go

    	if err != nil {
    		t.Fatalf("go tool nm: %v: %s", err, out)
    	}
    	wantSym := map[string]bool{
    		// Verify these exist: (sanity checking this test)
    		"net/http.(*Client).do":           true,
    		"net/http.(*Transport).RoundTrip": true,
    
    		// Verify these don't exist:
    		"net/http.http2Server":           false,
    		"net/http.(*Server).Serve":       false,
    		"net/http.(*ServeMux).ServeHTTP": false,
    		"net/http.DefaultServeMux":       false,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 18:18:19 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  2. src/net/http/httputil/reverseproxy_test.go

    		}
    		resp.Body.Close()
    	}
    }
    
    type failingRoundTripper struct{}
    
    func (failingRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
    	return nil, errors.New("some error")
    }
    
    type staticResponseRoundTripper struct{ res *http.Response }
    
    func (rt staticResponseRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
    	return rt.res, nil
    }
    
    func TestReverseProxyErrorHandler(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  3. pkg/hbone/dialer.go

    	if err != nil {
    		return fmt.Errorf("new request: %v", err)
    	}
    	r.Host = address
    
    	// Initiate CONNECT.
    	log.Infof("initiate CONNECT to %v via %v", r.Host, url)
    
    	resp, err := d.transport.RoundTrip(r)
    	if err != nil {
    		return fmt.Errorf("round trip: %v", err)
    	}
    	var remoteID string
    	if resp.TLS != nil && len(resp.TLS.PeerCertificates) > 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go

    	Dial(protocols ...string) (Connection, string, error)
    }
    
    // UpgradeRoundTripper is a type of http.RoundTripper that is able to upgrade
    // HTTP requests to support multiplexed bidirectional streams. After RoundTrip()
    // is invoked, if the upgrade is successful, clients may retrieve the upgraded
    // connection by calling UpgradeRoundTripper.Connection().
    type UpgradeRoundTripper interface {
    	http.RoundTripper
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  5. cmd/bucket-lifecycle_test.go

    		}
    		if actual != tc.expectedStatus {
    			t.Fatalf("Test %d: got %v expected %v", i+1, actual, tc.expectedStatus)
    		}
    	}
    }
    
    // TestRestoreObjStatusRoundTrip restoreObjStatus roundtrip
    func TestRestoreObjStatusRoundTrip(t *testing.T) {
    	testCases := []restoreObjStatus{
    		ongoingRestoreObj(),
    		completedRestoreObj(time.Now().UTC()),
    	}
    	for i, tc := range testCases {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 31 09:57:57 UTC 2022
    - 7K bytes
    - Viewed (0)
  6. internal/grid/handlers.go

    }
    
    // RoundTripper provides an interface for type roundtrip serialization.
    type RoundTripper interface {
    	msgp.Unmarshaler
    	msgp.Marshaler
    	msgp.Sizer
    
    	comparable
    }
    
    // SingleHandler is a type safe handler for single roundtrip requests.
    type SingleHandler[Req, Resp RoundTripper] struct {
    	id            HandlerID
    	sharedResp    bool
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  7. src/net/http/clientserver_test.go

    	}))
    
    	// Set ExpectContinueTimeout non-zero so RoundTrip won't try to write it.
    	cst.tr.ExpectContinueTimeout = 10 * time.Second
    
    	req, err := NewRequest("POST", cst.ts.URL, testErrorReader{t})
    	if err != nil {
    		t.Fatal(err)
    	}
    	req.ContentLength = 0 // so transport is tempted to sniff it
    	req.Header.Set("Expect", "100-continue")
    	res, err := cst.tr.RoundTrip(req)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/embedded_test.go

    	}
    	items := []runtime.Object{
    		&runtimetesting.EmbeddedTest{ID: "foo"},
    		&runtimetesting.EmbeddedTest{ID: "bar"},
    		// TODO: until YAML is removed, this JSON must be in ascending key order to ensure consistent roundtrip serialization
    		&runtime.Unknown{
    			Raw:         []byte(`{"apiVersion":"unknown.group/unknown","foo":"bar","kind":"OtherTest"}`),
    			ContentType: runtime.ContentTypeJSON,
    		},
    		&runtimetesting.ObjectTest{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 06 16:07:10 UTC 2020
    - 9.2K bytes
    - Viewed (0)
  9. src/net/http/httputil/reverseproxy.go

    		outreq.Body = nil // Issue 16036: nil Body for http.Transport retries
    	}
    	if outreq.Body != nil {
    		// Reading from the request body after returning from a handler is not
    		// allowed, and the RoundTrip goroutine that reads the Body can outlive
    		// this handler. This can lead to a crash if the handler panics (see
    		// Issue 46866). Although calling Close doesn't guarantee there isn't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go

    	}
    }
    
    type panicOnNonReuseTransport struct {
    	Transport   http.RoundTripper
    	gotConnSeen bool
    }
    
    func (t *panicOnNonReuseTransport) RoundTrip(req *http.Request) (*http.Response, error) {
    	return t.Transport.RoundTrip(req)
    }
    
    func (t *panicOnNonReuseTransport) GotConn(info httptrace.GotConnInfo) {
    	if !t.gotConnSeen {
    		t.gotConnSeen = true
    		return
    	}
    	if !info.Reused {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 18.4K bytes
    - Viewed (0)
Back to top