- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 167 for wroteHeader (0.22 sec)
-
staging/src/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations_test.go
tlsConfig := &tls.Config{ Certificates: []tls.Certificate{cert}, RootCAs: rootCAs, } tlsServer := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(200) w.Write([]byte("ok")) })) tlsServer.TLS = tlsConfig tlsServer.StartTLS() serverURL, err := url.Parse(tlsServer.URL) if err != nil { tlsServer.Close()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 25.5K bytes - Viewed (0) -
pilot/pkg/bootstrap/server.go
for name, fn := range s.readinessProbes { if ready := fn(); !ready { log.Warnf("%s is not ready", name) w.WriteHeader(http.StatusServiceUnavailable) return } } w.WriteHeader(http.StatusOK) } // initServers initializes http and grpc servers func (s *Server) initServers(args *PilotArgs) { s.initGrpcServer(args.KeepaliveOptions)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 17:48:28 UTC 2024 - 46.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go
var queryPart string if len(req.URL.RawQuery) > 0 { queryPart = "?" + req.URL.RawQuery } w.Header().Set("Location", req.URL.Path+"/"+queryPart) w.WriteHeader(http.StatusMovedPermanently) redirect = true } return redirect } // ServeHTTP handles the proxy request func (h *UpgradeAwareHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 04 19:10:30 UTC 2024 - 19.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go
t.Fatalf("expected connection=upgrade header, got '%s", a) } w.Header().Set(httpstream.HeaderConnection, config.connectionHeader) w.Header().Set(httpstream.HeaderUpgrade, config.upgradeHeader) w.WriteHeader(config.statusCode) return } streamCh := make(chan httpstream.Stream) responseUpgrader := NewResponseUpgrader()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 23 22:33:38 UTC 2023 - 32.7K bytes - Viewed (0) -
src/net/rpc/server.go
func (server *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { if req.Method != "CONNECT" { w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.WriteHeader(http.StatusMethodNotAllowed) io.WriteString(w, "405 must CONNECT\n") return } conn, _, err := w.(http.Hijacker).Hijack() if err != nil { log.Print("rpc hijacking ", req.RemoteAddr, ": ", err.Error())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 21.6K bytes - Viewed (0) -
src/net/http/cookie_test.go
func (ho headerOnlyResponseWriter) Header() Header { return Header(ho) } func (ho headerOnlyResponseWriter) Write([]byte) (int, error) { panic("NOIMPL") } func (ho headerOnlyResponseWriter) WriteHeader(int) { panic("NOIMPL") } func TestSetCookie(t *testing.T) { m := make(Header) SetCookie(headerOnlyResponseWriter(m), &Cookie{Name: "cookie-1", Value: "one", Path: "/restricted/"})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 26.2K bytes - Viewed (0) -
pkg/controller/resourcequota/resource_quota_controller_test.go
if !ok { fakeResponse.statusCode = 200 fakeResponse.content = []byte("{\"kind\": \"List\"}") } response.Header().Set("Content-Type", "application/json") response.WriteHeader(fakeResponse.statusCode) response.Write(fakeResponse.content) }() // This is to allow the fakeActionHandler to simulate a watch being opened if strings.Contains(request.URL.RawQuery, "watch=true") {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 12 16:29:33 UTC 2023 - 42.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/proxy/streamtranslator_test.go
} { // Create upstream fake SPDY server which returns a redirect. spdyServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.Header().Set("Location", "/") w.WriteHeader(statusCode) })) defer spdyServer.Close() spdyLocation, err := url.Parse(spdyServer.URL) if err != nil { t.Fatalf("Unable to parse spdy server URL: %s", spdyServer.URL) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 27 23:21:55 UTC 2024 - 36.4K bytes - Viewed (0) -
pkg/controller/endpoint/endpoints_controller_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 26 06:51:56 UTC 2024 - 87.7K bytes - Viewed (0) -
pkg/kubelet/server/server_test.go
content := string(`<pre><a href="kubelet.log">kubelet.log</a><a href="google.log">google.log</a></pre>`) fw.fakeKubelet.logFunc = func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) w.Header().Add("Content-Type", "text/html") w.Write([]byte(content)) } resp, err := http.Get(fw.testHTTPServer.URL + "/logs/") if err != nil { t.Fatalf("Got error GETing: %v", err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 51.5K bytes - Viewed (0)