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: v14.0.1~1252^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b8a3baffddb0f0082a9b250693d26d934eaf2650;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 --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 5597b6254849..cdaf6f1f8818 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1299,6 +1299,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 5768f2755909..14865f9a0988 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5080,6 +5080,12 @@ std::vector