- Sort Score
- Result 10 results
- Languages All
Results 61 - 66 of 66 for wroteHeader (0.42 sec)
-
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)