Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for StatusNoContent (0.48 sec)

  1. cmd/bucket-policy-handlers_test.go

    			policyLen:          len(fmt.Sprintf(bucketPolicyTemplate, bucketName, bucketName)),
    			accessKey:          credentials.AccessKey,
    			secretKey:          credentials.SecretKey,
    			expectedRespStatus: http.StatusNoContent,
    		},
    		// Test case - 2.
    		// Setting the content length to be more than max allowed size.
    		// Expecting StatusBadRequest (400).
    		{
    			bucketName:         bucketName,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  2. cmd/bucket-lifecycle-handlers_test.go

    			accessKey:          creds.AccessKey,
    			secretKey:          creds.SecretKey,
    			bucketName:         bucketName,
    			body:               []byte(``),
    			expectedRespStatus: http.StatusNoContent,
    			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)
  3. cmd/bucket-handlers_test.go

    	// Call the ServeHTTP to execute the handler.
    	apiRouter.ServeHTTP(rec, req)
    	switch rec.Code {
    	case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent:
    		t.Fatalf("Test %v: expected failure, but succeeded with %v", instanceType, rec.Code)
    	}
    
    	// Verify response of the V2 signed HTTP request.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  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/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)
  9. 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