http: handle request range like Amazon S3. (#2112)

Fixes #2098
This commit is contained in:
Bala FA
2016-07-07 01:20:24 +05:30
committed by Harshavardhana
parent 26b7d79a85
commit a51bb1d728
5 changed files with 158 additions and 100 deletions

View File

@@ -1646,7 +1646,7 @@ func (s *TestSuiteCommon) TestGetObjectRangeErrors(c *C) {
request, err = newTestRequest("GET", getGetObjectURL(s.endPoint, bucketName, objectName),
0, nil, s.accessKey, s.secretKey)
// Invalid byte range set.
request.Header.Add("Range", "bytes=13-")
request.Header.Add("Range", "bytes=-0")
c.Assert(err, IsNil)
client = http.Client{}