From: Matt Benjamin Date: Thu, 24 May 2018 20:09:01 +0000 (-0400) Subject: rgw: add configurable AWS-compat invalid range get behavior X-Git-Tag: v12.2.6~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22302%2Fhead;p=ceph.git rgw: add configurable AWS-compat invalid range get behavior If rgw_ignore_get_invalid_range is set, treat invalid range restrictions as a request for the full object. By default, retain the RGW behavior to fail with ERANGE. Fixes: http://tracker.ceph.com/issues/24317 Signed-off-by: Matt Benjamin (cherry picked from commit b8a3baffddb0f0082a9b250693d26d934eaf2650) Signed-off-by: Matt Benjamin --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index f664c96e4f9a..51c91b0bd8db 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1342,6 +1342,7 @@ OPTION(rgw_lc_max_objs, OPT_INT) OPTION(rgw_lc_debug_interval, OPT_INT) // Debug run interval, in seconds OPTION(rgw_script_uri, OPT_STR) // alternative value for SCRIPT_URI if not set in request OPTION(rgw_request_uri, OPT_STR) // alternative value for REQUEST_URI if not set in request +OPTION(rgw_ignore_get_invalid_range, OPT_BOOL) // treat invalid (e.g., negative) range requests as full OPTION(rgw_swift_url, OPT_STR) // the swift url, being published by the internal swift auth OPTION(rgw_swift_url_prefix, OPT_STR) // entry point for which a url is considered a swift url OPTION(rgw_swift_auth_url, OPT_STR) // default URL to go and verify tokens for v1 auth (if not using internal swift auth) diff --git a/src/common/options.cc b/src/common/options.cc index 5a81dda59ecd..32c85f530818 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4539,6 +4539,12 @@ std::vector