Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 65 for wroteHeader (0.18 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go

    			// Timeout error with retry supplied
    			w.WriteHeader(http.StatusGatewayTimeout)
    			json.NewEncoder(w).Encode(apierrors.NewServerTimeout(gr, "get", 2))
    		case 2:
    			// Internal server error
    			w.WriteHeader(http.StatusInternalServerError)
    			json.NewEncoder(w).Encode(apierrors.NewInternalError(fmt.Errorf("nope")))
    		case 3:
    			// HTTP error that is not retryable
    			w.WriteHeader(http.StatusNotAcceptable)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  2. src/cmd/distpack/pack.go

    			Mode: dirMode,
    		}
    		h := check(tar.FileInfoHeader(df.Info(), ""))
    		h.Name = dir + "/"
    		if err := tw.WriteHeader(h); err != nil {
    			panic(err)
    		}
    	}
    
    	for _, f = range a.Files {
    		h := check(tar.FileInfoHeader(f.Info(), ""))
    		mkdirAll(path.Dir(f.Name))
    		h.Name = f.Name
    		if err := tw.WriteHeader(h); err != nil {
    			panic(err)
    		}
    		r := check(os.Open(f.Src))
    		check(io.Copy(tw, r))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  3. pkg/istio-agent/xds_proxy.go

    		}
    		response, err := p.tapRequest(&dr, 5*time.Second)
    		if err != nil {
    			w.WriteHeader(http.StatusServiceUnavailable)
    			fmt.Fprintf(w, "%v\n", err)
    			return
    		}
    
    		if response == nil {
    			log.Infof("timed out waiting for Istiod to respond to %q", typeURL)
    			w.WriteHeader(http.StatusGatewayTimeout)
    			return
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  4. src/net/http/responsecontroller_test.go

    	errc := make(chan error, 1)
    	startwritec := make(chan struct{})
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		ctl := NewResponseController(w)
    		w.WriteHeader(200)
    		if err := ctl.Flush(); err != nil {
    			t.Errorf("ctl.Flush() = %v, want nil", err)
    		}
    		<-startwritec // don't set the deadline until the client reads response headers
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 19:20:31 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. src/net/http/fs.go

    	if ch == condNone {
    		ch = checkIfUnmodifiedSince(r, modtime)
    	}
    	if ch == condFalse {
    		w.WriteHeader(StatusPreconditionFailed)
    		return true, ""
    	}
    	switch checkIfNoneMatch(w, r) {
    	case condFalse:
    		if r.Method == "GET" || r.Method == "HEAD" {
    			writeNotModified(w)
    			return true, ""
    		} else {
    			w.WriteHeader(StatusPreconditionFailed)
    			return true, ""
    		}
    	case condNone:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/config_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	delegateServer.Handler.NonGoRestfulMux.HandleFunc("/foo", func(w http.ResponseWriter, _ *http.Request) {
    		w.WriteHeader(http.StatusForbidden)
    	})
    
    	delegatePostStartHookChan := make(chan struct{})
    	delegateServer.AddPostStartHookOrDie("delegate-post-start-hook", func(context PostStartHookContext) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  7. src/net/http/httputil/reverseproxy.go

    				// the ResponseWriter's header map.
    				return nil
    			}
    			h := rw.Header()
    			copyHeader(h, http.Header(header))
    			rw.WriteHeader(code)
    
    			// Clear headers, it's not automatically done by ResponseWriter.WriteHeader() for 1xx responses
    			clear(h)
    			return nil
    		},
    	}
    	outreq = outreq.WithContext(httptrace.WithClientTrace(outreq.Context(), trace))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  8. cmd/object-handlers-common.go

    	if ifNoneMatchETagHeader != "" {
    		if isETagEqual(objInfo.ETag, ifNoneMatchETagHeader) {
    			// If the object ETag matches with the specified ETag.
    			writeHeadersPrecondition(w, objInfo)
    			w.WriteHeader(http.StatusNotModified)
    			return true
    		}
    	}
    
    	// If-Modified-Since : Return the object only if it has been modified since the specified time,
    	// otherwise return a 304 (not modified).
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  9. pilot/cmd/pilot-agent/status/server_test.go

    	case "header":
    		if r.Host != testHostValue {
    			log.Errorf("Missing expected host value %s, got %v", testHostValue, r.Host)
    			w.WriteHeader(http.StatusBadRequest)
    		}
    		if r.Header.Get(testHeader) != testHeaderValue {
    			log.Errorf("Missing expected Some-Header, got %v", r.Header)
    			w.WriteHeader(http.StatusBadRequest)
    		}
    	case "redirect":
    		http.Redirect(w, r, "/", http.StatusMovedPermanently)
    	case "redirect-loop":
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  10. pkg/test/echo/server/endpoint/http.go

    	}
    	if !h.IsServerReady() {
    		// Handle readiness probe failure.
    		epLog.Infof("HTTP service not ready, returning 503")
    		w.WriteHeader(http.StatusServiceUnavailable)
    		return
    	}
    
    	if common.IsWebSocketRequest(r) {
    		h.webSocketEcho(w, r)
    	} else {
    		h.echo(w, r, id)
    	}
    }
    
    // nolint: interfacer
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 12.8K bytes
    - Viewed (0)
Back to top