Project

General

Profile

Bug #24317

rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange

Added by Matt Benjamin about 1 year ago. Updated about 1 year ago.

Status:
Pending Backport
Priority:
High
Assignee:
Target version:
-
Start date:
05/25/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous, jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Client application issues an S3 request with range defined as "bytes=0--1". The RadosGW will respond with 416 InvalidRange. AWS S3 will simply ignore the range and provide the whole object.


Related issues

Copied to rgw - Backport #24352: mimic: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange Resolved
Copied to rgw - Backport #24353: luminous: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange Resolved
Copied to rgw - Backport #24354: jewel: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange In Progress

History

#2 Updated by Matt Benjamin about 1 year ago

Casey noted that bytes=0--1 could be intended as a Python range. I haven't tried other negative range values against AWS.

#3 Updated by Matt Benjamin about 1 year ago

  • Status changed from Need Review to Pending Backport
  • Assignee set to Matt Benjamin

#4 Updated by Matt Benjamin about 1 year ago

  • Backport changed from mimic, luminous to mimic, luminous, jewel

#5 Updated by Matt Benjamin about 1 year ago

Here's a trivial S3 test for the invalid range behavior when ignore invalid range is set:

@@attr(resource='object')
@attr(method='get')
@attr(operation='range')
def test_ranged_request_negative_range():
content = 'testcontent'

bucket_name = get_new_bucket()
client = get_client()
client.put_object(Bucket=bucket_name, Key='testobj', Body=content)
  1. read it back w/negative range
    import pdb; pdb.set_trace()
    response = client.get_object(Bucket=bucket_name, Key='testobj',
    Range='bytes=0--1')
    status = response['ResponseMetadata']['HTTPStatusCode']
    eq(status, 200)
    body = _get_body(response)
    eq(body, content)@

#6 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24352: mimic: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange added

#7 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24353: luminous: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange added

#8 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24354: jewel: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRange added

Also available in: Atom PDF