- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for parseRequestRangeSpec (0.41 sec)
-
cmd/httprange_test.go
{"bytes=1-10", 1, 9}, {"bytes=1-1", 1, 1}, {"bytes=2-5", 2, 4}, {"bytes=-5", 5, 5}, {"bytes=-1", 9, 1}, {"bytes=-1000", 0, 10}, } for i, testCase := range validRangeSpecs { rs, err := parseRequestRangeSpec(testCase.spec) if err != nil { t.Errorf("unexpected err: %v", err) } o, l, err := rs.GetOffsetLength(resourceSize) if err != nil { t.Errorf("unexpected err: %v", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun May 05 16:56:21 UTC 2024 - 3.7K bytes - Viewed (0) -
cmd/copy-part-range.go
// for full details. This function treats an empty rangeString as // referring to the whole resource. func parseCopyPartRangeSpec(rangeString string) (hrange *HTTPRangeSpec, err error) { hrange, err = parseRequestRangeSpec(rangeString) if err != nil { return nil, err } if hrange.IsSuffixLength || hrange.Start < 0 || hrange.End < 0 { return nil, errInvalidRange } return hrange, 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) -
cmd/httprange.go
if h.IsSuffixLength { start = resourceSize + h.Start if start < 0 { start = 0 } } return start, length, nil } // Parse a HTTP range header value into a HTTPRangeSpec func parseRequestRangeSpec(rangeString string) (hrange *HTTPRangeSpec, err error) { // Return error if given range string doesn't start with byte range prefix. if !strings.HasPrefix(rangeString, byteRangePrefix) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 09 08:44:07 UTC 2024 - 5.9K bytes - Viewed (0) -
cmd/encryption-v1_test.go
} } } } // Tests for issue reproduced when getting the right encrypted // offset of the object. func TestGetDecryptedRange_Issue50(t *testing.T) { rs, err := parseRequestRangeSpec("bytes=594870256-594870263") if err != nil { t.Fatal(err) } objInfo := ObjectInfo{ Bucket: "bucket", Name: "object", Size: 595160760, UserDefined: map[string]string{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Sep 24 04:17:08 UTC 2022 - 19.9K bytes - Viewed (0) -
cmd/object-handlers.go
if rangeHeader != "" { rs, _ = parseRequestRangeSpec(rangeHeader) } if rangeHeader != "" { // Both 'Range' and 'partNumber' cannot be specified at the same time if opts.PartNumber > 0 { writeErrorResponseHeadersOnly(w, errorCodes.ToAPIErr(ErrInvalidRangePartNumber)) return } if rs, err = parseRequestRangeSpec(rangeHeader); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 05 05:16:15 UTC 2024 - 117.4K bytes - Viewed (0) -
cmd/object-handlers_test.go
instanceType, object, i+1, byteRange, rec.Code, string(bd), err1) } var off, length int64 var rs *HTTPRangeSpec if byteRange != "" { rs, err = parseRequestRangeSpec(byteRange) if err != nil { t.Fatalf("Object: %s Case %d ByteRange: %s: Unexpected err: %v", object, i+1, byteRange, err) } } off, length, err = rs.GetOffsetLength(objectLength(oi))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 20:10:44 UTC 2024 - 163.2K bytes - Viewed (0)