Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] jewel: rgw: copying part without http header x-amz-copy-source-range will be mistaken for copying object #21209

Closed
wants to merge 1 commit into from

Conversation

smithfarm
Copy link
Contributor

it will copy an entire source object

Signed-off-by: Malcolm Lee <fengxueyu35@126.com>
(cherry picked from commit 753b3a7)

Conflicts:
	src/rgw/rgw_rest_s3.cc - add url_decode() from 9688fcc
@smithfarm smithfarm self-assigned this Apr 3, 2018
@smithfarm smithfarm added this to the jewel milestone Apr 3, 2018
@smithfarm smithfarm added rgw and removed core labels Apr 3, 2018
@smithfarm
Copy link
Contributor Author

@mattbenjamin See the conflict resolution - it made sense in my mind to add the url_decode(...)

@smithfarm
Copy link
Contributor Author

rgw/rgw_op.cc: In member function ‘virtual void RGWPutObj::execute()’:
rgw/rgw_op.cc:2673:22: error: request for member ‘empty’ in ‘((RGWPutObj*)this)->RGWPutObj::copy_source’, which is of non-class type ‘const char*’
   if ((! copy_source.empty()) && !copy_source_range) {
                      ^
rgw/rgw_op.cc:2679:85: error: no matching function for call to ‘RGWRados::get_obj_state(RGWObjectCtx*, RGWBucketInfo&, rgw_obj&, RGWObjState**, bool, bool)’
                                   copy_source_bucket_info, obj, &astate, true, false);
                                                                                     ^
In file included from rgw/rgw_op.cc:16:0:
rgw/rgw_rados.h:2732:7: note: candidate: int RGWRados::get_obj_state(RGWObjectCtx*, rgw_obj&, RGWObjState**, bool)
   int get_obj_state(RGWObjectCtx *rctx, rgw_obj& obj, RGWObjState **state, bool follow_olh);
       ^
rgw/rgw_rados.h:2732:7: note:   candidate expects 4 arguments, 6 provided
rgw/rgw_rados.h:2733:7: note: candidate: int RGWRados::get_obj_state(RGWObjectCtx*, rgw_obj&, RGWObjState**)
   int get_obj_state(RGWObjectCtx *rctx, rgw_obj& obj, RGWObjState **state) {
       ^
rgw/rgw_rados.h:2733:7: note:   candidate expects 3 arguments, 6 provide

@smithfarm smithfarm added the DNM label Apr 6, 2018
@smithfarm smithfarm changed the title jewel: rgw: copying part without http header x-amz-copy-source-range will be mistaken for copying object [DNM] jewel: rgw: copying part without http header x-amz-copy-source-range will be mistaken for copying object Apr 6, 2018
@mattbenjamin
Copy link
Contributor

@smithfarm I think your merge of the url_decode patch lost a bit--the member copy_source was a char pointer, and is now a std::string iirc.

Matt

@joke-lee
Copy link
Contributor

joke-lee commented Apr 9, 2018

hi @malc0lm @mattbenjamin @smithfarm ,i update the code in this pr #21294

@smithfarm
Copy link
Contributor Author

closing in favor of #21294

@smithfarm smithfarm closed this Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants