Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 193 for StatusOK (0.15 sec)

  1. pkg/istio-agent/health/health_check_test.go

    		sss := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
    			if httpServerEventCount < len(httpHealthStatuses) && httpHealthStatuses[httpServerEventCount] {
    				writer.WriteHeader(http.StatusOK)
    				writer.Write([]byte("foobar"))
    			} else {
    				writer.WriteHeader(http.StatusInternalServerError)
    			}
    			httpServerEventCount++
    		}))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 09 16:50:11 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  2. pkg/wasm/httpfetcher.go

    				return nil, fmt.Errorf("wasm module download failed after %v attempts, last error: %v", attempts, lastError)
    			}
    			time.Sleep(b.NextBackOff())
    			continue
    		}
    		if resp.StatusCode == http.StatusOK {
    			// Limit wasm module to 256mb; in reality it must be much smaller
    			body, err := io.ReadAll(io.LimitReader(resp.Body, 1024*1024*256))
    			if err != nil {
    				return nil, err
    			}
    			err = resp.Body.Close()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 14 20:23:34 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  3. internal/config/cache/cache.go

    	resp, err := c.clnt.Do(req)
    	if err != nil {
    		return nil, err
    	}
    	defer xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusNotFound:
    		return nil, ErrKeyMissing
    	case http.StatusOK:
    		co := &ObjectInfo{}
    		return co, co.DecodeMsg(msgp.NewReader(resp.Body))
    	default:
    		return nil, ErrInvalidArgument
    	}
    }
    
    // Set sets the cache object info
    func (c Config) Set(ci *ObjectInfo) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. pkg/test/echo/server/endpoint/tcp.go

    	ip, _, _ := net.SplitHostPort(conn.RemoteAddr().String())
    	// Write non-request fields specific to the instance
    	out := &strings.Builder{}
    	echo.StatusCodeField.Write(out, strconv.Itoa(http.StatusOK))
    	echo.ClusterField.WriteNonEmpty(out, s.Cluster)
    	echo.IstioVersionField.WriteNonEmpty(out, s.IstioVersion)
    	echo.NamespaceField.WriteNonEmpty(out, s.Namespace)
    	echo.ServiceVersionField.Write(out, s.Version)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 16:20:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. pkg/istio-agent/health/health_probers.go

    	if err != nil {
    		return Unhealthy, err
    	}
    	defer func() {
    		err = res.Body.Close()
    		if err != nil {
    			healthCheckLog.Error(err)
    		}
    	}()
    	// from [200,400)
    	if res.StatusCode >= http.StatusOK && res.StatusCode < http.StatusBadRequest {
    		return Healthy, nil
    	}
    	return Unhealthy, fmt.Errorf("status code was not from [200,400), bad code %v", res.StatusCode)
    }
    
    type TCPProber struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  6. src/net/http/cgi/child.go

    	r.bufw.Flush()
    }
    
    func (r *response) Header() http.Header {
    	return r.header
    }
    
    func (r *response) Write(p []byte) (n int, err error) {
    	if !r.wroteHeader {
    		r.WriteHeader(http.StatusOK)
    	}
    	if !r.wroteCGIHeader {
    		r.writeCGIHeader(p)
    	}
    	return r.bufw.Write(p)
    }
    
    func (r *response) WriteHeader(code int) {
    	if r.wroteHeader {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. pkg/bootstrap/platform/azure.go

    		return ""
    	}
    	req.Header.Add("Metadata", "True")
    
    	response, err := client.Do(req)
    	if err != nil {
    		log.Warnf("HTTP request failed: %v", err)
    		return ""
    	}
    	if response.StatusCode != http.StatusOK {
    		log.Warnf("HTTP request unsuccessful with status: %v", response.Status)
    	}
    	defer response.Body.Close()
    	body, err := io.ReadAll(response.Body)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go

    	// No timeouts
    	ctx = context.Background()
    	sendResponse <- resp
    	res, err := http.Get(ts.URL)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if res.StatusCode != http.StatusOK {
    		t.Errorf("got res.StatusCode %d; expected %d", res.StatusCode, http.StatusOK)
    	}
    	body, _ := ioutil.ReadAll(res.Body)
    	if string(body) != resp {
    		t.Errorf("got body %q; expected %q", string(body), resp)
    	}
    	if err := <-writeErrors; err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  9. docs/sts/web-identity.go

    		return d, err
    	}
    	clnt := http.Client{
    		Transport: http.DefaultTransport,
    	}
    	resp, err := clnt.Do(req)
    	if err != nil {
    		return d, err
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != http.StatusOK {
    		return d, fmt.Errorf("unexpected error returned by %s : status(%s)", ustr, resp.Status)
    	}
    	dec := json.NewDecoder(resp.Body)
    	if err = dec.Decode(&d); err != nil {
    		return d, err
    	}
    	return d, nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 19 09:13:33 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  10. src/cmd/go/internal/web/api.go

    }
    
    func (e *HTTPError) Unwrap() error {
    	return e.Err
    }
    
    // GetBytes returns the body of the requested resource, or an error if the
    // response status was not http.StatusOK.
    //
    // GetBytes is a convenience wrapper around Get and Response.Err.
    func GetBytes(u *url.URL) ([]byte, error) {
    	resp, err := Get(DefaultSecurity, u)
    	if err != nil {
    		return nil, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 13:00:34 UTC 2022
    - 6.9K bytes
    - Viewed (0)
Back to top