mirror of
https://github.com/versity/versitygw.git
synced 2026-08-21 22:56:28 +00:00
Issue 154 (#169)
* fix: Fixes #154, Changed GetObject range error to InvalidRange
This commit is contained in:
@@ -1031,6 +1031,20 @@ func TestRangeGet(s *S3Conf) {
|
||||
return
|
||||
}
|
||||
|
||||
// Invalid range
|
||||
invRange := "bytes=100-asd"
|
||||
ctx, cancel = context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err = s3client.GetObject(ctx, &s3.GetObjectInput{
|
||||
Bucket: &bucket,
|
||||
Key: &name,
|
||||
Range: &invRange,
|
||||
})
|
||||
defer cancel()
|
||||
if err == nil {
|
||||
failF("%v: expected range error", testname)
|
||||
return
|
||||
}
|
||||
|
||||
rangeString := "bytes=100-200"
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), shortTimeout)
|
||||
|
||||
Reference in New Issue
Block a user