rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element
According to the AWS documentation the Code element in an error response for Multi-Object Delete should be a string with values resembling codes we usually convey as rgw_http_errors::s3_code.
Status code for the result of the failed delete. .
Values: AccessDenied, InternalError
Actually we are dumping Code as int with HTTP response number. In RGWDeleteMultiObj_ObjStore_S3::send_partial_response we have:
s->formatter->open_object_section("Error"); err_no = -op_ret; rgw_get_errno_s3(&r, err_no); s->formatter->dump_string("Key", key.name); s->formatter->dump_string("VersionId", key.instance); s->formatter->dump_int("Code", r.http_ret); s->formatter->dump_string("Message", r.s3_code); s->formatter->close_section();
#2 Updated by Chang Liu over 3 years ago
I have found whole list about S3 code/message: http://docs.aws.amazon.com/AmazonS3/latest/API/s3-api.pdf Page25. I would like to fix this bug. assign this issue to me, please.