- Sort Score
- Result 10 results
- Languages All
Results 31 - 36 of 36 for wroteHeader (0.17 sec)
-
pkg/log/uds_test.go
var body []byte if r.Body != nil { if data, err := io.ReadAll(r.Body); err == nil { body = data } } messages := []string{} if err := json.Unmarshal(body, &messages); err != nil { w.WriteHeader(http.StatusBadRequest) } us.messages = append(us.messages, messages...) } func TestUDSLog(t *testing.T) { srv := udsServer{messages: make([]string, 0)} udsDir := t.TempDir()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Nov 29 01:05:12 UTC 2023 - 3.2K bytes - Viewed (0) -
pilot/pkg/model/test/mockopenidserver.go
w.WriteHeader(http.StatusForbidden) fmt.Fprintf(w, "Mock server configured to return error after %d hits", ms.ReturnErrorAfterFirstNumHits) return } if atomic.LoadUint64(&ms.PubKeyHitNum) <= ms.ReturnErrorForFirstNumHits { w.WriteHeader(http.StatusForbidden)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Feb 23 09:47:21 UTC 2024 - 9.4K 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) -
cmd/generic-handlers_test.go
func TestSSETLSHandler(t *testing.T) { defer func(isSSL bool) { globalIsTLS = isSSL }(globalIsTLS) // reset globalIsTLS after test var okHandler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } for i, test := range sseTLSHandlerTests { globalIsTLS = test.IsTLS w := httptest.NewRecorder() r := new(http.Request) r.Header = test.Header r.URL = test.URL
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 5.4K bytes - Viewed (0) -
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)