Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for StatusNoContent (0.33 sec)

  1. internal/logger/target/http/http.go

    	}
    
    	// Drain any response.
    	xhttp.DrainBody(resp.Body)
    
    	switch resp.StatusCode {
    	case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent:
    		// accepted HTTP status codes.
    		return nil
    	case http.StatusForbidden:
    		return fmt.Errorf("%s returned '%s', please check if your auth token is correctly set", h.Endpoint(), resp.Status)
    	default:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jun 02 03:03:39 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. cmd/admin-handlers-site-replication.go

    			if time.Since(connectTime) < (globalNetPerfMinDuration - time.Second) {
    				adminLogIf(ctx, err)
    			}
    		}
    		if err != nil {
    			if errors.Is(err, io.EOF) {
    				w.WriteHeader(http.StatusNoContent)
    			} else {
    				w.WriteHeader(http.StatusBadRequest)
    			}
    			break
    		}
    	}
    }
    
    // SiteReplicationNetPerf - everything goes to io.Discard
    // [POST] /minio/admin/v3/site-replication/netperf
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go

    	// the caller may return a flag indicating whether the result should be flushed as writes occur
    	// and a content type string that indicates the type of the stream.
    	// If a null stream is returned, a StatusNoContent response wil be generated.
    	InputStream(ctx context.Context, apiVersion, acceptHeader string) (stream io.ReadCloser, flush bool, mimeType string, err error)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 20 14:29:25 UTC 2023
    - 18.6K bytes
    - Viewed (0)
  4. cmd/api-response.go

    	writeResponse(w, http.StatusOK, response, mimeXML)
    }
    
    // writeSuccessNoContent writes success headers with http status 204
    func writeSuccessNoContent(w http.ResponseWriter) {
    	writeResponse(w, http.StatusNoContent, nil, mimeNone)
    }
    
    // writeRedirectSeeOther writes Location header with http status 303
    func writeRedirectSeeOther(w http.ResponseWriter, location string) {
    	w.Header().Set(xhttp.Location, location)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/installer.go

    	// and api error codes
    	// Note that if we specify a versioned Status object here, we may need to
    	// create one for the tests, also
    	// Success:
    	// http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent
    	//
    	// test/integration/auth_test.go is currently the most comprehensive status code test
    
    	for _, s := range a.group.Serializer.SupportedMediaTypes() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  6. cmd/object-handlers_test.go

    			expectedRespStatus: http.StatusNoContent,
    		},
    		// Test case - 2.
    		// Attempt to delete an object which is already deleted.
    		// Still should return http response status 204.
    		{
    			bucketName: bucketName,
    			objectName: objectName,
    			accessKey:  credentials.AccessKey,
    			secretKey:  credentials.SecretKey,
    
    			expectedRespStatus: http.StatusNoContent,
    		},
    		// Test case - 3.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 161.9K bytes
    - Viewed (0)
  7. src/net/http/serve_test.go

    	time.Sleep(2 * timeout)
    	res, err := c.Get(ts.URL)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer res.Body.Close()
    	if res.StatusCode != StatusNoContent {
    		t.Errorf("got res.StatusCode %d, want %v", res.StatusCode, StatusNoContent)
    	}
    }
    
    func TestTimeoutHandlerContextCanceled(t *testing.T) { run(t, testTimeoutHandlerContextCanceled) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  8. src/net/http/client_test.go

    func testClientCallsCloseOnlyOnce(t *testing.T, mode testMode) {
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		w.WriteHeader(StatusNoContent)
    	}))
    
    	// Issue occurred non-deterministically: needed to occur after a successful
    	// write (into TCP buffer) but before end of body.
    	for i := 0; i < 50 && !t.Failed(); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  9. src/net/http/server.go

    			te, w.contentLength)
    		delHeader("Content-Length")
    		hasCL = false
    	}
    
    	if w.req.Method == "HEAD" || !bodyAllowedForStatus(code) || code == StatusNoContent {
    		// Response has no body.
    		delHeader("Transfer-Encoding")
    	} else if hasCL {
    		// Content-Length has been provided, so no chunking is to be done.
    		delHeader("Transfer-Encoding")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  10. src/net/http/transport_test.go

    func testChunkedNoContent(t *testing.T, mode testMode) {
    	ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		w.WriteHeader(StatusNoContent)
    	})).ts
    
    	c := ts.Client()
    	for _, closeBody := range []bool{true, false} {
    		const n = 4
    		for i := 1; i <= n; i++ {
    			res, err := c.Get(ts.URL)
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top