Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for checkCopyPartRangeWithSize (0.29 sec)

  1. cmd/copy-part-range.go

    		return nil, errInvalidRange
    	}
    	return hrange, nil
    }
    
    // checkCopyPartRangeWithSize adds more check to the range string in case of
    // copy object part. This API requires having specific start and end  range values
    // e.g. 'bytes=3-10'. Other use cases will be rejected.
    func checkCopyPartRangeWithSize(rs *HTTPRangeSpec, resourceSize int64) (err error) {
    	if rs == nil {
    		return nil
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 18 03:27:04 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. cmd/copy-part-range_test.go

    	errorRangeString := []string{
    		"bytes=10-10",
    		"bytes=20-30",
    	}
    	for _, rangeString := range errorRangeString {
    		rs, err := parseCopyPartRangeSpec(rangeString)
    		if err == nil {
    			err1 := checkCopyPartRangeWithSize(rs, objectSize)
    			if err1 != errInvalidRangeSource {
    				t.Fatalf("expected: %s, got: %s", errInvalidRangeSource, err)
    			}
    		} else {
    			t.Fatalf("expected: %s, got: <nil>", errInvalidRangeSource)
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  3. cmd/object-multipart-handlers.go

    	if err := enforceBucketQuotaHard(ctx, dstBucket, actualPartSize); err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Special care for CopyObjectPart
    	if partRangeErr := checkCopyPartRangeWithSize(rs, actualPartSize); partRangeErr != nil {
    		writeCopyPartErr(ctx, w, partRangeErr, r.URL)
    		return
    	}
    
    	// Get the object offset & length
    	startOffset, length, err := rs.GetOffsetLength(actualPartSize)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
Back to top