Fix object copy requests.

Currently, we run PUT Object Copy  without 'content-length: 0' or 'transfer-encoding: chunked' returns '411 Length Required'.
This is because Swift returns 'HTTPLengthRequired' when we run object copy without them.
AWS is not required them, so I add ’Content-Length: 0' to Switf3's internal processing.

Change-Id: Ie0b02f49662301de3aa3d3b93d730d2cdf98b66e
Fix multipart upload is required SLO in pipeline

Multipart upload is enable by default, but it needs "slo" middleware
support. If it isn't exist in pipeline, multipart upload still work, but
download is not work(that's only xml file you can get.)

If there is no "slo" in pipeline, all requests of multipart from client
will be reject(return S3NotImplemented, 501 Not Implemented).

Change-Id: If0a862d9f80cc806f5b0a8a0e87c70b17920f635
Closes-Bug: #1396039
Draft: Acl class design for supporting S3 ACL

This comes from previous work to achieve real S3's ACL model.
Previous discussion is here. (https://review.openstack.org/#/c/122029/)

This supports ACL class and its related model (e.g. Grant, Grantee)
with a feature to translate between a python class and an ElemntTree for
XML used for S3's request and response.

The model we need to disscuss is as follows:

AccessControlPolicy:
    Owner:
    AccessControlList:
        Grant[n]:
            (Grantee, Permission)

It comes from official S3 model overview. Please see official
documentation here (http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
in detail.

TODO:
A stuff to translate between a python class and JSON format used for
implementations to achieve ACL handling at backend swift.

Change-Id: Ic6765f2a530caba6e22d5805323e31eb3d3013e7
acl: add preliminary support for S3 ACL

Currently, Swift3 sets and retrieves Swift ACLs for S3 ACL requests.  However,
S3 ACL is too different from Swift ACL to implement the below reference.
  http://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
With this patch, Swift3 uses its own metadata for ACL
(e.g. X-Container-Sysmeta-Swift3-Acl) to achieve the best S3 compatibility.
This patch only embeds the S3 ACL into the Swift metadata.  The swift3
middleware does not use it for S3 requests yet; this will be addressed later.

Change-Id: I4522910b6b3a0066f24caa98727fdeb85837e42b
acl: use S3 ACL for object and bucket APIs

Change-Id: I8ec79fe4cea1370cbf433a5c20f5e4cdf5b0d298
Refactor test_s3_acl

This patch introduces generate_s3acl_environ() function
for refactoring of test_s3_acl. It registers necessary verbs against
to both a bucket and an object which keep ACL information for testing.

It achieves really good portability to make s3_acl testing environment
for other test cases so that What we have to do for s3_acl testing is
just calling generate_s3acl_environ() before testing.

Change-Id: I3f5d0d9bae021513d63b0ca35f015241873e3fd5
Show warn/error log when no slo middleware

Change-Id: Iccb5d7f5342c6aecf3fd4da936e104daca2534aa
Draft: s3acl decorator

Current swift3 has a couple of ways for acl handling.
To simplify test code, this introduces s3acl decorator
which suggests which way the test method will check.

In default, swift3 do the native acl testing.
If needed, we can add the s3acl decorater and an argument
like as follows:

No decorator -> test only native acl
@s3acl -> test both of native acl and s3acl
@s3acl(s3acl_only=True) -> test only s3acl

This is still a draft version and most of tests should
be fixed.

TODO:
- keeping sysmeta for s3acl when the test override
  backend swift by register.

Change-Id: I17a423b5c655a670a4304d47ff927df28ac0a37f
Support FakeSwift register overwritten

Current swift3.test.unit.helpers.FakeSwift.register overwrites
whole things for swift response. However, sometimes it deletes
necessary acl information on s3acl decorator.

Change-Id: I42f398526c832f0d25e8e090c0a80dd239a91508
Fix 500 error when no DisplayName in request body.

The original data of body from client to set acl like below:

<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Owner>
    <ID>test:tester</ID>
    <DisplayName>test:tester</DisplayName>
  </Owner>
  <AccessControlList>
    ...
  </AccessControlList>
</AccessControlPolicy>

If the attribute "<DisplayName>" isn't exist, proxy will return
500 Internal Server Error.

Change-Id: Ia02af110109d5ecbcda05f707707b30e604af8f0
Closes-Bug: #1400367
Merge "Fix object copy requests."
Merge "Fix 500 error when no DisplayName in request body."
Merge "Show warn/error log when no slo middleware"
Merge "Draft: s3acl decorator"
Merge "Support FakeSwift register overwritten"