Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for MethodHead (0.26 sec)

  1. cmd/healthcheck-handler.go

    		return
    	}
    
    	if int(globalHTTPStats.loadRequestsInQueue()) > globalAPIConfig.getRequestsPoolCapacity() {
    		apiErr := getAPIError(ErrBusy)
    		switch r.Method {
    		case http.MethodHead:
    			writeResponse(w, apiErr.HTTPStatusCode, nil, mimeNone)
    		case http.MethodGet:
    			writeErrorResponse(r.Context(), w, apiErr, r.URL)
    		}
    		return
    	}
    
    	// Verify if KMS is reachable if its configured
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. cmd/api-router.go

    		api:     "requestPayment",
    		methods: []string{http.MethodPut, http.MethodDelete},
    		queries: []string{"requestPayment", ""},
    	},
    	{
    		api:     "acl",
    		methods: []string{http.MethodDelete, http.MethodPut, http.MethodHead},
    		queries: []string{"acl", ""},
    	},
    	{
    		api:     "publicAccessBlock",
    		methods: []string{http.MethodDelete, http.MethodPut, http.MethodGet},
    		queries: []string{"publicAccessBlock", ""},
    	},
    	{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  3. cmd/generic-handlers.go

    }
    
    func setBrowserRedirectMiddleware(h http.Handler) http.Handler {
    	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		read := r.Method == http.MethodGet || r.Method == http.MethodHead
    		// Re-direction is handled specifically for browser requests.
    		if !guessIsHealthCheckReq(r) && guessIsBrowserReq(r) && read && globalBrowserRedirect {
    			// Fetch the redirect location if any.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 06 01:01:15 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  4. cmd/bucket-handlers_test.go

    		// initialize HTTP NewRecorder, this records any mutations to response writer inside the handler.
    		rec := httptest.NewRecorder()
    		// construct HTTP request for HEAD bucket.
    		req, err := newTestSignedRequestV4(http.MethodHead, getHEADBucketURL("", testCase.bucketName), 0, nil, testCase.accessKey, testCase.secretKey, nil)
    		if err != nil {
    			t.Fatalf("Test %d: %s: Failed to create HTTP request for HeadBucketHandler: <ERROR> %v", i+1, instanceType, err)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  5. internal/config/lambda/target/webhook.go

    func (target *WebhookTarget) isActive() (bool, error) {
    	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
    	defer cancel()
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodHead, target.args.Endpoint.String(), nil)
    	if err != nil {
    		if xnet.IsNetworkOrHostDown(err, false) {
    			return false, errNotConnected
    		}
    		return false, err
    	}
    	tokens := strings.Fields(target.args.AuthToken)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/cmd/init_test.go

    		}
    	}
    }
    
    func TestInitDataClientWithNonDefaultKubeconfig(t *testing.T) {
    	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		if r.Method != http.MethodHead {
    			w.WriteHeader(http.StatusMethodNotAllowed)
    		}
    	}))
    	defer ts.Close()
    
    	kubeconfigPath := filepath.Join(t.TempDir(), "custom.conf")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 19 12:26:20 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  7. cmd/server_test.go

    	response, err = s.client.Do(request)
    
    	c.Assert(err, nil)
    	// assert the http response status code.
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	request, err = newTestSignedRequest(http.MethodHead, getHeadObjectURL(s.endPoint, bucketName, "my-object-directory/"),
    		0, nil, s.accessKey, s.secretKey, s.signer)
    	c.Assert(err, nil)
    
    	// execute the HTTP request.
    	response, err = s.client.Do(request)
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 115.3K bytes
    - Viewed (0)
  8. internal/config/identity/plugin/config.go

    func (o *AuthNPlugin) checkConnectivity(ctx context.Context) bool {
    	ctx, cancel := context.WithTimeout(ctx, healthCheckTimeout)
    	defer cancel()
    	u := url.URL(*o.args.URL)
    
    	req, err := http.NewRequestWithContext(ctx, http.MethodHead, u.String(), nil)
    	if err != nil {
    		authNLogIf(ctx, err)
    		return false
    	}
    
    	if o.args.AuthToken != "" {
    		req.Header.Set("Authorization", o.args.AuthToken)
    	}
    
    	resp, err := o.client.Do(req)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. cmd/object-handlers-common.go

    func checkPreconditions(ctx context.Context, w http.ResponseWriter, r *http.Request, objInfo ObjectInfo, opts ObjectOptions) bool {
    	// Return false for methods other than GET and HEAD.
    	if r.Method != http.MethodGet && r.Method != http.MethodHead {
    		return false
    	}
    	// If the object doesn't have a modtime (IsZero), or the modtime
    	// is obviously garbage (Unix time == 0), then ignore modtimes
    	// and don't process the If-Modified-Since header.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  10. cmd/test-utils_test.go

    	}
    
    	// HEAD HTTTP request doesn't contain response body.
    	if anonReq.Method != http.MethodHead {
    		// read the response body.
    		var actualContent []byte
    		actualContent, err = io.ReadAll(rec.Body)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
Back to top