- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 167 for wroteHeader (0.24 sec)
-
staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go
// Timeout error with retry supplied w.WriteHeader(http.StatusGatewayTimeout) json.NewEncoder(w).Encode(apierrors.NewServerTimeout(gr, "get", 2)) case 2: // Internal server error w.WriteHeader(http.StatusInternalServerError) json.NewEncoder(w).Encode(apierrors.NewInternalError(fmt.Errorf("nope"))) case 3: // HTTP error that is not retryable w.WriteHeader(http.StatusNotAcceptable)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 25.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go
http.Error(w, errorMsg, http.StatusInternalServerError) return nil } w.Header().Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade) w.Header().Add(httpstream.HeaderUpgrade, HeaderSpdy31) w.WriteHeader(http.StatusSwitchingProtocols) conn, bufrw, err := hijacker.Hijack() if err != nil { runtime.HandleError(fmt.Errorf("unable to upgrade: error hijacking response: %v", err)) return nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 28 08:02:09 UTC 2022 - 4K bytes - Viewed (0) -
pkg/ctrlz/topics/scopes.go
if ok { s.SetOutputLevel(level) } level, ok = stringToLevel[info.StackTraceLevel] if ok { s.SetStackTraceLevel(level) } s.SetLogCallers(info.LogCallers) w.WriteHeader(http.StatusAccepted) return } fw.RenderError(w, http.StatusBadRequest, fmt.Errorf("unknown scope name: %s", name))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/watch_termination_test.go
handlerInvokedGot++ if signal := apirequest.ServerShutdownSignalFrom(req.Context()); signal != nil { signalGot, _ = signal.(*fakeServerShutdownSignal) } w.WriteHeader(http.StatusOK) }) handler := WithWatchTerminationDuringShutdown(delegate, test.signal, test.wg) req, err := http.NewRequest(http.MethodGet, "/apis/groups.k8s.io/v1/namespaces", nil) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 27 15:49:49 UTC 2023 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/cors.go
w.Header().Set("Access-Control-Allow-Credentials", allowCredentials) // Stop here if its a preflight OPTIONS request if req.Method == "OPTIONS" { w.WriteHeader(http.StatusNoContent) return } // Dispatch to the next handler handler.ServeHTTP(w, req) }) } // isOriginAllowed returns true if the given origin header in the // request is allowed CORS.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 15 13:59:10 UTC 2022 - 4.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/httpstream/httpstream_test.go
func newResponseWriter() *responseWriter { return &responseWriter{ header: make(http.Header), } } func (r *responseWriter) Header() http.Header { return r.header } func (r *responseWriter) WriteHeader(code int) { r.statusCode = &code } func (r *responseWriter) Write([]byte) (int, error) { return 0, nil } func TestHandshake(t *testing.T) { tests := map[string]struct { clientProtocols []string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 23 22:33:38 UTC 2023 - 4.5K bytes - Viewed (0) -
internal/s3select/select_benchmark_test.go
func (w *nullResponseWriter) Header() http.Header { return nil } func (w *nullResponseWriter) Write(p []byte) (int, error) { return len(p), nil } func (w *nullResponseWriter) WriteHeader(statusCode int) { } func (w *nullResponseWriter) Flush() { } func benchmarkSelect(b *testing.B, count int, query string) { requestXML := []byte(` <?xml version="1.0" encoding="UTF-8"?>
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Apr 14 13:54:47 UTC 2022 - 5K bytes - Viewed (0) -
src/cmd/distpack/pack.go
Mode: dirMode, } h := check(tar.FileInfoHeader(df.Info(), "")) h.Name = dir + "/" if err := tw.WriteHeader(h); err != nil { panic(err) } } for _, f = range a.Files { h := check(tar.FileInfoHeader(f.Info(), "")) mkdirAll(path.Dir(f.Name)) h.Name = f.Name if err := tw.WriteHeader(h); err != nil { panic(err) } r := check(os.Open(f.Src)) check(io.Copy(tw, r))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 10.9K bytes - Viewed (0) -
pkg/istio-agent/xds_proxy.go
} response, err := p.tapRequest(&dr, 5*time.Second) if err != nil { w.WriteHeader(http.StatusServiceUnavailable) fmt.Fprintf(w, "%v\n", err) return } if response == nil { log.Infof("timed out waiting for Istiod to respond to %q", typeURL) w.WriteHeader(http.StatusGatewayTimeout) return }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 22:12:28 UTC 2024 - 27.9K bytes - Viewed (0) -
src/net/http/responsecontroller_test.go
errc := make(chan error, 1) startwritec := make(chan struct{}) cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { ctl := NewResponseController(w) w.WriteHeader(200) if err := ctl.Flush(); err != nil { t.Errorf("ctl.Flush() = %v, want nil", err) } <-startwritec // don't set the deadline until the client reads response headers
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 19:20:31 UTC 2024 - 10.2K bytes - Viewed (0)