Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 182 for StatusOK (0.31 sec)

  1. pkg/proxy/healthcheck/proxier_health.go

    	if !healthy {
    		metrics.ProxyHealthzTotal.WithLabelValues("503").Inc()
    		resp.WriteHeader(http.StatusServiceUnavailable)
    	} else {
    		metrics.ProxyHealthzTotal.WithLabelValues("200").Inc()
    		resp.WriteHeader(http.StatusOK)
    		// In older releases, the returned "lastUpdated" time indicated the last
    		// time the proxier sync loop ran, even if nothing had changed. To
    		// preserve compatibility, we use the same semantics: the returned
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 16 10:41:18 UTC 2023
    - 8K bytes
    - Viewed (0)
  2. pkg/hbone/server.go

    	if err != nil {
    		w.WriteHeader(http.StatusServiceUnavailable)
    		log.Errorf("failed to dial upstream: %v", err)
    		return true
    	}
    	log.Infof("Connected to %v", r.Host)
    	w.WriteHeader(http.StatusOK)
    
    	wg := sync.WaitGroup{}
    	wg.Add(1)
    	go func() {
    		// downstream (hbone client) <-- upstream (app)
    		copyBuffered(w, dst, log.WithLabels("name", "dst to w"))
    		err = r.Body.Close()
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 10 02:05:07 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  3. samples/extauthz/cmd/extauthz/main_test.go

    	cases := []struct {
    		name     string
    		isGRPCV3 bool
    		isGRPCV2 bool
    		header   string
    		want     int
    	}{
    		{
    			name:   "HTTP-allow",
    			header: "allow",
    			want:   http.StatusOK,
    		},
    		{
    			name:   "HTTP-deny",
    			header: "deny",
    			want:   http.StatusForbidden,
    		},
    		{
    			name:     "GRPCv3-allow",
    			isGRPCV3: true,
    			header:   "allow",
    			want:     int(codes.OK),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 23 16:58:02 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. cmd/admin-handlers_test.go

    	}
    
    	rec := httptest.NewRecorder()
    	adminTestBed.router.ServeHTTP(rec, req)
    
    	resp, _ := io.ReadAll(rec.Body)
    	if rec.Code != http.StatusOK {
    		t.Errorf("Expected to receive %d status code but received %d. Body (%s)",
    			http.StatusOK, rec.Code, string(resp))
    	}
    
    	result := &serviceResult{}
    	if err := json.Unmarshal(resp, result); err != nil {
    		t.Error(err)
    	}
    	_ = result
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  5. pkg/credentialprovider/config.go

    	if cfg, err := ReadDockerConfigJSONFile(nil); err == nil {
    		return cfg, nil
    	}
    	// Can't find latest config file so check for the old one
    	return ReadDockercfgFile(nil)
    }
    
    // HTTPError wraps a non-StatusOK error code as an error.
    type HTTPError struct {
    	StatusCode int
    	URL        string
    }
    
    // Error implements error
    func (he *HTTPError) Error() string {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 19 15:11:57 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/filters/audit.go

    			// But Audit-Id http header will only be sent when http.ResponseWriter.WriteHeader is called.
    			fakedSuccessStatus := &metav1.Status{
    				Code:    http.StatusOK,
    				Status:  metav1.StatusSuccess,
    				Message: "Connection closed early",
    			}
    			if ev.ResponseStatus == nil && longRunningSink != nil {
    				ev.ResponseStatus = fakedSuccessStatus
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  7. pkg/test/echo/server/endpoint/http.go

    		epLog.Warn("websocket-echo read failed: " + err.Error())
    		return
    	}
    
    	body := bytes.Buffer{}
    	h.addResponsePayload(r, &body)
    	body.Write(message)
    
    	echo.StatusCodeField.Write(&body, strconv.Itoa(http.StatusOK))
    
    	// pong
    	err = c.WriteMessage(mt, body.Bytes())
    	if err != nil {
    		writeError(&body, "websocket-echo write failed: "+err.Error())
    		return
    	}
    }
    
    // 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)
  8. pkg/test/echo/server/forwarder/udp.go

    		if line != "" {
    			echo.WriteBodyLine(&msgBuilder, requestID, line)
    		}
    	}
    
    	msg := msgBuilder.String()
    	expected := fmt.Sprintf("%s=%d", string(echo.StatusCodeField), http.StatusOK)
    	if cfg.Request.ExpectedResponse != nil {
    		expected = cfg.Request.ExpectedResponse.GetValue()
    	}
    	if !strings.Contains(msg, expected) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Oct 13 17:19:22 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  9. cmd/bucket-lifecycle-handlers_test.go

    			expectedRespStatus: http.StatusOK,
    			lifecycleResponse:  []byte(``),
    			errorResponse:      APIErrorResponse{},
    			shouldPass:         true,
    		},
    		{
    			method:             http.MethodGet,
    			accessKey:          creds.AccessKey,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  10. internal/config/identity/openid/jwt.go

    	client := &http.Client{
    		Transport: r.transport,
    	}
    
    	resp, err := client.Get(pCfg.JWKS.URL.String())
    	if err != nil {
    		return err
    	}
    	defer r.closeRespFn(resp.Body)
    	if resp.StatusCode != http.StatusOK {
    		return errors.New(resp.Status)
    	}
    
    	return r.pubKeys.parseAndAdd(resp.Body)
    }
    
    // ErrTokenExpired - error token expired
    var (
    	ErrTokenExpired = errors.New("token expired")
    )
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 18:10:41 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top