- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 157 for wroteHeader (0.58 sec)
-
src/net/http/transport_dial_test.go
} dt.cst = newClientServerTest(t, mode, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Write response headers when we receive a request. http.NewResponseController(w).EnableFullDuplex() w.WriteHeader(200) http.NewResponseController(w).Flush() // Wait for the client to send the request body, // to synchronize with the rest of the test. io.ReadAll(r.Body) }), func(tr *http.Transport) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 17 21:11:57 UTC 2024 - 6.3K bytes - Viewed (0) -
internal/http/server.go
// To indicate disable keep-alive, server is shutting down. w.Header().Set("Connection", "close") // Add 1 minute retry header, incase-client wants to honor it w.Header().Set(RetryAfter, "60") w.WriteHeader(http.StatusServiceUnavailable) w.Write([]byte(http.ErrServerClosed.Error())) return } atomic.AddInt32(&srv.requestCount, 1) defer atomic.AddInt32(&srv.requestCount, -1)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Feb 09 21:25:16 UTC 2024 - 7.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/genericapiserver_graceful_termination_test.go
// this simulates a watch well enough for our test signals := apirequest.ServerShutdownSignalFrom(req.Context()) if signals == nil { w.WriteHeader(http.StatusInternalServerError) return } <-signals.ShuttingDown() w.WriteHeader(http.StatusOK) }) s.Handler.NonGoRestfulMux.Handle("/apis/watches.group/v1/namespaces/foo/bar", handler) return inflight }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:59:21 UTC 2024 - 38.3K bytes - Viewed (0) -
cmd/admin-handlers-site-replication.go
if time.Since(connectTime) < (globalNetPerfMinDuration - time.Second) { adminLogIf(ctx, err) } } if err != nil { if errors.Is(err, io.EOF) { w.WriteHeader(http.StatusNoContent) } else { w.WriteHeader(http.StatusBadRequest) } break } } } // SiteReplicationNetPerf - everything goes to io.Discard // [POST] /minio/admin/v3/site-replication/netperf
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/stream_test.go
r := NewReader(bytes.NewBuffer([]byte(input)), true, supportedProtocols) s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { err := r.Copy(w, req) if err != nil { w.WriteHeader(503) } })) defer s.Close() config, err := websocket.NewConfig("ws://"+addr, "http://localhost/") if err != nil { t.Error(err) return }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 7.4K bytes - Viewed (0) -
cmd/api-response.go
bugLogIf(context.Background(), fmt.Errorf("invalid WriteHeader code %v", statusCode)) statusCode = http.StatusInternalServerError } setCommonHeaders(w) if mType != mimeNone { w.Header().Set(xhttp.ContentType, string(mType)) } w.Header().Set(xhttp.ContentLength, strconv.Itoa(len(response))) w.WriteHeader(statusCode) if response != nil { w.Write(response) } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:31:51 UTC 2024 - 33.5K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
} _, err = args.UnmarshalMsg(buf) return args, err } type lockServerHandler struct { lsrv *lockServer } func (lh *lockServerHandler) writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusForbidden) w.Write([]byte(err.Error())) } func (lh *lockServerHandler) ForceUnlockHandler(w http.ResponseWriter, r *http.Request) { args, err := getLockArgs(r) if err != nil {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
src/net/http/transport_test.go
ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { addrSeen[r.RemoteAddr]++ if r.URL.Path == "/chunked/" { w.WriteHeader(200) w.(Flusher).Flush() } else { w.Header().Set("Content-Length", strconv.Itoa(len(msg))) w.WriteHeader(200) } w.Write([]byte(msg)) })).ts for pi, path := range []string{"/content-length/", "/chunked/"} { wantLen := []int{len(msg), -1}[pi]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0) -
cmd/kube-scheduler/app/options/options_test.go
if username == "" { username = "none, tls" } w.WriteHeader(200) w.Write([]byte(`ok`)) })) defer server.Close() // http server insecureserver := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { username, _, _ = req.BasicAuth() if username == "" { username = "none, http" } w.WriteHeader(200) w.Write([]byte(`ok`)) })) defer insecureserver.Close()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 13 07:42:19 UTC 2023 - 30.3K bytes - Viewed (0) -
cmd/kubeadm/app/cmd/init_test.go
} } } func TestInitDataClientWithNonDefaultKubeconfig(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodHead { w.WriteHeader(http.StatusMethodNotAllowed) } })) defer ts.Close() kubeconfigPath := filepath.Join(t.TempDir(), "custom.conf")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 19 12:26:20 UTC 2024 - 11.9K bytes - Viewed (0)