commit 0af0afd6997c98f7be9d394307b2ba294dd2fbc8
Author: Kota Tsuyuzaki <email address hidden>
Date: Thu Oct 16 20:38:09 2014 -0700
Fix Canned ACL Error with Empty Body
Current acl controller do a double check both ACL header and
ACL body (xml).
However, if ACL body is not given but ACL header (X-AMZ-ACL) is
given as a canned ACL, current implementation always causes ACL
Error in parsing XML since the request body is empty even though
it should be handled as a correct request on acl controller.
In addition, if both of them are given, we have to UnexpectedContent
Exception according to S3 behavior.
This patch fixes to try to parse the request body only when
the request body is not empty. This pach also fixes to raise
if both ACL header and xml are given.
Reviewed: https:/ /review. openstack. org/129123 /git.openstack. org/cgit/ stackforge/ swift3/ commit/ ?id=0af0afd6997 c98f7be9d394307 b2ba294dd2fbc8
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0af0afd6997c98f 7be9d394307b2ba 294dd2fbc8
Author: Kota Tsuyuzaki <email address hidden>
Date: Thu Oct 16 20:38:09 2014 -0700
Fix Canned ACL Error with Empty Body
Current acl controller do a double check both ACL header and
ACL body (xml).
However, if ACL body is not given but ACL header (X-AMZ-ACL) is
given as a canned ACL, current implementation always causes ACL
Error in parsing XML since the request body is empty even though
it should be handled as a correct request on acl controller.
In addition, if both of them are given, we have to UnexpectedContent
Exception according to S3 behavior.
This patch fixes to try to parse the request body only when
the request body is not empty. This pach also fixes to raise
if both ACL header and xml are given.
Change-Id: Ie23d5e3d94c47e 0411197afd22f0b 31db2ac45d1
Closes-Bug: 1382290