Project

General

Profile

Actions

Bug #24317

closed

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

Added by Matt Benjamin almost 6 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous, jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 3 (0 open3 closed)

Copied to rgw - Backport #24352: mimic: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRangeResolvedPrashant DActions
Copied to rgw - Backport #24353: luminous: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRangeResolvedMatt BenjaminActions
Copied to rgw - Backport #24354: jewel: rgw: request with range defined as "bytes=0--1" returns 416 InvalidRangeRejectedMatt BenjaminActions
Actions #2

Updated by Matt Benjamin almost 6 years ago

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

Actions #3

Updated by Matt Benjamin almost 6 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Assignee set to Matt Benjamin
Actions #4

Updated by Matt Benjamin almost 6 years ago

  • Backport changed from mimic, luminous to mimic, luminous, jewel
Actions #5

Updated by Matt Benjamin almost 6 years 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)@
Actions #6

Updated by Nathan Cutler almost 6 years ago

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

Updated by Nathan Cutler almost 6 years ago

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

Updated by Nathan Cutler almost 6 years ago

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

Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF