- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 73 for wroteHeader (0.24 sec)
-
docs/iam/identity-manager-plugin.go
if token == "" { writeErrorResponse(w, errors.New("token parameter not given")) return } rsp, ok := tokens[token] if !ok { w.WriteHeader(http.StatusForbidden) return } fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User) w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(rsp) return } func main() { http.HandleFunc("/", mainHandler) log.Print("Listening on :8081")
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 2.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/net/testing/http.go
rw.WriteHeader(http.StatusInternalServerError) return } defer sconn.Close() hj, ok := rw.(http.Hijacker) if !ok { h.t.Logf("Can't switch protocols using non-Hijacker ResponseWriter: type=%T, host=%s", rw, req.Host) rw.WriteHeader(http.StatusInternalServerError) return } rw.WriteHeader(http.StatusOK) conn, brw, err := hj.Hijack()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 20 14:58:46 UTC 2023 - 3.8K bytes - Viewed (0) -
pkg/bootstrap/platform/aws_test.go
} } func errorHandler(writer http.ResponseWriter, _ *http.Request) { writer.WriteHeader(http.StatusInternalServerError) } func regionHandler(writer http.ResponseWriter, _ *http.Request) { writer.WriteHeader(http.StatusOK) writer.Write([]byte("us-west-2")) } func zoneHandler(writer http.ResponseWriter, _ *http.Request) { writer.WriteHeader(http.StatusOK) writer.Write([]byte("us-west-2b")) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 18 13:10:06 UTC 2022 - 3.2K bytes - Viewed (0) -
src/cmd/dist/buildruntime.go
) /* * Helpers for building runtime. */ // mkzversion writes zversion.go: // // package sys // // (Nothing right now!) func mkzversion(dir, file string) { var buf strings.Builder writeHeader(&buf) fmt.Fprintf(&buf, "package sys\n") writefile(buf.String(), file, writeSkipSame) } // mkbuildcfg writes internal/buildcfg/zbootstrap.go: // // package buildcfg // // const defaultGOROOT = <goroot>
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 01:33:19 UTC 2024 - 2.5K bytes - Viewed (0) -
internal/http/response-recorder.go
// ... otherwise we return the <BLOB> place holder return blobBody } // WriteHeader - writes http status code func (lrw *ResponseRecorder) WriteHeader(code int) { if !lrw.headersLogged { lrw.StatusCode = code lrw.writeHeaders(&lrw.headers, code, lrw.ResponseWriter.Header()) lrw.headersLogged = true lrw.ResponseWriter.WriteHeader(code) } } // Flush - Calls the underlying Flush.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 02 00:13:19 UTC 2023 - 4.9K bytes - Viewed (0) -
pilot/pkg/request/command_test.go
if err := util.Compare(body, p.States[0].wantBody); err == nil { w.WriteHeader(p.States[0].StatusCode) w.Write([]byte(p.States[0].Response)) } else { w.WriteHeader(http.StatusBadRequest) w.Write([]byte(fmt.Sprintf("wanted body %q got %q", string(p.States[0].wantBody), string(body)))) } } else { w.WriteHeader(http.StatusBadRequest)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:11:01 UTC 2023 - 4.1K bytes - Viewed (0) -
src/internal/trace/version/version.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.7K bytes - Viewed (0) -
src/net/http/httptest/recorder_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 23:17:38 UTC 2022 - 9.7K bytes - Viewed (0) -
pkg/hbone/server.go
defer cancel() dst, err := (&net.Dialer{}).DialContext(ctx, "tcp", r.Host) if err != nil { w.WriteHeader(http.StatusServiceUnavailable) log.Errorf("failed to dial upstream: %v", err) return true } log.Infof("Connected to %v", r.Host) w.WriteHeader(http.StatusOK) wg := sync.WaitGroup{} wg.Add(1) go func() { // downstream (hbone client) <-- upstream (app)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 10 02:05:07 UTC 2022 - 2.4K bytes - Viewed (0) -
pkg/ctrlz/topics/signals.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Feb 07 17:12:24 UTC 2024 - 1.6K bytes - Viewed (0)