]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: make a configurable size for requests with xml params
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 3 Mar 2017 15:50:33 +0000 (16:50 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 6 Jul 2017 18:08:18 +0000 (20:08 +0200)
commitdea9a69c3f85504070a56f8a2dbf1a4c129b9ef4
treef28e75beb166810139fdec6fa199506ce75818c1
parente12eae92b04d30d322740a6c7a33d86e448bf9c5
rgw: make a configurable size for requests with xml params

We currently read all user input for a few apis accepting xml, avoid
doing this and error out early, most s3 apis limit to about 1000 xml
entries, make this configurable via a new config param,
`rgw_max_put_param_size` defaulting to 1MB. Also modified
`rgw_rest_read_all_input` with an additional param to not allow for
chunked uploads, though we error out in a better way by responding with
content length required rather than S3's 501 if chunked is set.

This also adds the same behavior in RGWPutCORS reusing
`rgw_rest_read_all_input`, and using a data_deleter to manage the char*

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
rgw: rgw_rest_s3: make PUT CORS accept only a configured max input

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 35375b75160dc93beeb04c7fe010dc0d21952534)
src/common/config_opts.h
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc