- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 73 for wroteHeader (0.15 sec)
-
cni/pkg/nodeagent/healthServer.go
func healthz(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) } func readyz(installReady, watchReady *atomic.Value) http.HandlerFunc { return func(w http.ResponseWriter, _ *http.Request) { if !installReady.Load().(bool) || !watchReady.Load().(bool) { http.Error(w, http.StatusText(http.StatusServiceUnavailable), http.StatusServiceUnavailable) return } w.WriteHeader(http.StatusOK) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 1.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit.go
} func (a *auditResponseWriter) Write(bs []byte) (int, error) { // the Go library calls WriteHeader internally if no code was written yet. But this will go unnoticed for us a.processCode(http.StatusOK) return a.ResponseWriter.Write(bs) } func (a *auditResponseWriter) WriteHeader(code int) { a.processCode(code) a.ResponseWriter.WriteHeader(code) } func (a *auditResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 8.6K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient_test.go
// Fake out a test HTTP server and use that instead of a real HTTP server over gRPC to validate req/resp flows testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { res.WriteHeader(http.StatusOK) res.Write([]byte("server happy")) })) defer func() { testServer.Close() }() cniC := fakeCNIEventClient(testServer.URL)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 4.2K bytes - Viewed (0) -
pkg/ctrlz/home.go
w.Header().Set("Content-Type", mime) } _, _ = w.Write(a) } else { // 'not found' page w.WriteHeader(http.StatusNotFound) fw.RenderHTML(w, errorTmpl, nil) } }) _ = router.NewRoute().Methods("PUT").Path("/homej/exit").HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusAccepted) time.AfterFunc(1*time.Second, func() { os.Exit(0) }) })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 14:06:41 UTC 2023 - 2.5K bytes - Viewed (0) -
docs/auditlog/auditlog-echo.go
defer r.Body.Close() if err != nil { log.Printf("Error reading request body: %v", err) w.WriteHeader(http.StatusBadRequest) return } log.Printf(">>> %s %s\n", r.Method, r.URL.Path) var out bytes.Buffer json.Indent(&out, body, "", " ") log.Printf("%s\n", out.String()) w.WriteHeader(http.StatusOK) } func main() { flag.Parse() http.HandleFunc("/", mainHandler)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 1.5K bytes - Viewed (0) -
pkg/proxy/healthcheck/proxier_health.go
resp.Header().Set("X-Content-Type-Options", "nosniff") if !healthy { metrics.ProxyHealthzTotal.WithLabelValues("503").Inc() resp.WriteHeader(http.StatusServiceUnavailable) } else { metrics.ProxyHealthzTotal.WithLabelValues("200").Inc() resp.WriteHeader(http.StatusOK) // In older releases, the returned "lastUpdated" time indicated the last // time the proxier sync loop ran, even if nothing had changed. To
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 16 10:41:18 UTC 2023 - 8K bytes - Viewed (0) -
pkg/wasm/httpfetcher_test.go
if num <= 2 { w.WriteHeader(http.StatusInternalServerError) } else { fmt.Fprintln(w, "wasm") } }, timeout: 5 * time.Second, wantNumRequest: 4, }, { name: "download max retry", handler: func(w http.ResponseWriter, r *http.Request, num int) { w.WriteHeader(http.StatusInternalServerError) }, timeout: 5 * time.Second,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 24 15:56:41 UTC 2023 - 7.5K bytes - Viewed (0) -
src/archive/tar/fuzz_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 2.2K bytes - Viewed (0) -
samples/jwt-server/src/main.go
if err != nil { // Handle invalid delay parameter response.WriteHeader(http.StatusBadRequest) response.Write([]byte("Invalid delay parameter")) return } // If delay parameter is provided and valid, add delay if delayDuration > 0 { time.Sleep(delayDuration) } } response.WriteHeader(http.StatusOK) response.Write([]byte(string(jwtKey))) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 16 23:56:50 UTC 2024 - 4.4K bytes - Viewed (0) -
pkg/test/fakes/imageregistry/main.go
if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } h.tagMap = m w.WriteHeader(http.StatusOK) case http.MethodGet: if jsEncodedMap, err := json.Marshal(h.tagMap); err == nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) fmt.Fprintf(w, "%s", jsEncodedMap) } else { http.Error(w, err.Error(), http.StatusInternalServerError)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 6.2K bytes - Viewed (0)