Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 66 for wroteHeader (0.13 sec)

  1. pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go

    	f.lock.Lock()
    	defer f.lock.Unlock()
    
    	f.actions = append(f.actions, fakeAction{method: request.Method, path: request.URL.Path})
    	response.Header().Set("Content-Type", runtime.ContentTypeJSON)
    	response.WriteHeader(f.statusCode)
    	response.Write([]byte("{\"apiVersion\": \"v1\", \"kind\": \"List\",\"items\":null}"))
    }
    
    // testResources returns a mocked up set of resources across different api groups for testing namespace controller.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  2. src/net/http/request_test.go

    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		switch r.URL.Path {
    		case "/":
    			w.Header().Set("Location", "/foo/")
    			w.WriteHeader(StatusSeeOther)
    		case "/foo/":
    			fmt.Fprintf(w, "foo")
    		default:
    			w.WriteHeader(StatusBadRequest)
    		}
    	}))
    
    	var end = regexp.MustCompile("/foo/$")
    	r, err := cst.c.Get(cst.ts.URL)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  3. src/cmd/vendor/github.com/google/pprof/internal/driver/webui.go

    	return func(w http.ResponseWriter, r *http.Request) {
    		pathWithQuery := &gourl.URL{Path: path, RawQuery: r.URL.RawQuery}
    		w.Header().Set("Location", pathWithQuery.String())
    		w.WriteHeader(code)
    	}
    }
    
    func isLocalhost(host string) bool {
    	for _, v := range []string{"localhost", "127.0.0.1", "[::1]", "::1"} {
    		if host == v {
    			return true
    		}
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 14K bytes
    - Viewed (0)
  4. cmd/s3-zip-handlers.go

    	}
    
    	// s3zip does not allow ranges.
    	w.Header().Del(xhttp.AcceptRanges)
    
    	// Set any additional requested response headers.
    	setHeadGetRespHeaders(w, r.Form)
    
    	// Successful response.
    	w.WriteHeader(http.StatusOK)
    }
    
    // Update the passed zip object metadata with the zip contents info, file name, modtime, size, etc.
    // The returned zip index will de decrypted.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  5. src/net/http/pprof/pprof.go

    	}
    }
    
    func serveError(w http.ResponseWriter, status int, txt string) {
    	w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    	w.Header().Set("X-Go-Pprof", "1")
    	w.Header().Del("Content-Disposition")
    	w.WriteHeader(status)
    	fmt.Fprintln(w, txt)
    }
    
    // Profile responds with the pprof-formatted cpu profile.
    // Profiling lasts for duration specified in seconds GET parameter, or for 30 seconds if not specified.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 17:34:05 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  6. src/net/http/transfer.go

    	if t.ContentLength == 0 && isIdentity(t.TransferEncoding) {
    		if t.Method == "GET" || t.Method == "HEAD" {
    			return false
    		}
    		return true
    	}
    
    	return false
    }
    
    func (t *transferWriter) writeHeader(w io.Writer, trace *httptrace.ClientTrace) error {
    	if t.Close && !hasToken(t.Header.get("Connection"), "close") {
    		if _, err := io.WriteString(w, "Connection: close\r\n"); err != nil {
    			return err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 22:14:00 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  7. pkg/kubelet/server/server.go

    // Derived from go-restful writeJSON.
    func writeJSONResponse(response *restful.Response, data []byte) {
    	if data == nil {
    		response.WriteHeader(http.StatusOK)
    		// do not write a nil representation
    		return
    	}
    	response.Header().Set(restful.HEADER_ContentType, restful.MIME_JSON)
    	response.WriteHeader(http.StatusOK)
    	if _, err := response.Write(data); err != nil {
    		klog.ErrorS(err, "Error writing response")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/pcln.go

    // generator to fill in its data later.
    func (state *pclntab) generatePCHeader(ctxt *Link) {
    	ldr := ctxt.loader
    	textStartOff := int64(8 + 2*ctxt.Arch.PtrSize)
    	size := int64(8 + 8*ctxt.Arch.PtrSize)
    	writeHeader := func(ctxt *Link, s loader.Sym) {
    		header := ctxt.loader.MakeSymbolUpdater(s)
    
    		writeSymOffset := func(off int64, ws loader.Sym) int64 {
    			diff := ldr.SymValue(ws) - ldr.SymValue(s)
    			if diff <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top