]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: make a configurable size for requests with xml params 13815/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 3 Mar 2017 15:50:33 +0000 (16:50 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 24 Mar 2017 14:19:54 +0000 (15:19 +0100)
commit35375b75160dc93beeb04c7fe010dc0d21952534
tree5e23688e05779bfc51c0d5da11922b0804db171f
parent72097c73a3640be4143770175a047d296b0cb4dd
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>
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