Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CheckPreconditions (0.15 sec)

  1. cmd/object-handlers-common_test.go

    	}
    	for _, test := range testCases {
    		etag := canonicalizeETag(test.etag)
    		if test.canonicalizedETag != etag {
    			t.Fatalf("Expected %s , got %s", test.canonicalizedETag, etag)
    		}
    	}
    }
    
    // Tests - CheckPreconditions()
    func TestCheckPreconditions(t *testing.T) {
    	objModTime := time.Date(2024, time.August, 26, 0o2, 0o1, 0o1, 0, time.UTC)
    	objInfo := ObjectInfo{ETag: "aa", ModTime: objModTime}
    	testCases := []struct {
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. cmd/s3-zip-handlers.go

    	opts.CheckPrecondFn = func(oi ObjectInfo) bool {
    		if _, err := DecryptObjectInfo(&oi, r); err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return true
    		}
    
    		return checkPreconditions(ctx, w, r, oi, opts)
    	}
    
    	zipObjInfo, err := getObjectInfo(ctx, bucket, zipPath, opts)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  3. cmd/object-handlers-common.go

    // Validates the preconditions. Returns true if GET/HEAD operation should not proceed.
    // Preconditions supported are:
    //
    //	If-Modified-Since
    //	If-Unmodified-Since
    //	If-Match
    //	If-None-Match
    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 {
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. cmd/object-handlers.go

    		}
    
    		if s3Error := authorizeRequest(ctx, r, policy.GetObjectAction); s3Error != ErrNone {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(s3Error), r.URL)
    			return true
    		}
    
    		return checkPreconditions(ctx, w, r, oi, opts)
    	}
    
    	opts.FastGetObjInfo = true
    
    	var proxy proxyResult
    	gr, err := getObjectNInfo(ctx, bucket, object, rs, r.Header, opts)
    	if err != nil {
    		var (
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Sat Oct 05 05:16:15 UTC 2024
    - 117.4K bytes
    - Viewed (0)
Back to top