Using swift3/test/functional/s3curl.pl "copySrc" option returns "411 Length Required"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Swift3 |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
--On Swift3 Implemented Operations - using https:/
e.g: ./s3curl.pl --id personal_ks --copySrc container1/openrc -- -v http://
* About to connect() to 9.18.76.57 port 8080 (#0)
* Trying 9.18.76.57...
* Connected to 9.18.76.57 (9.18.76.57) port 8080 (#0)
> PUT /container1/
> User-Agent: curl/7.29.0
> Host: 9.18.76.57:8080
> Accept: */*
> Date: Thu, 09 Oct 2014 16:21:38 +0000
> Authorization: AWS 24ebedc0e10f400
> x-amz-copy-source: container1/openrc
>
< HTTP/1.1 411 Length Required
< x-amz-id-2: txf3d3adb9b4304
< x-amz-request-id: txf3d3adb9b4304
< Content-Type: text/xml
< X-Trans-Id: txf3d3adb9b4304
< Date: Thu, 09 Oct 2014 16:21:38 GMT
< Transfer-Encoding: chunked
<
<?xml version='1.0' encoding='UTF-8'?>
* Connection #0 to host 9.18.76.57 left intact
<Error>
--Try to set the right Content-Length of the source object and returns: InternalError- We encountered an internal error. Please try again. Reason: Copy requests require a zero byte body.
e.g : # ./s3curl.pl --id personal_ks --copySrc container1/openrc -- -H "Content-
* About to connect() to 9.18.76.57 port 8080 (#0)
* Trying 9.18.76.57...
* Connected to 9.18.76.57 (9.18.76.57) port 8080 (#0)
> PUT /container1/
> User-Agent: curl/7.29.0
> Host: 9.18.76.57:8080
> Accept: */*
> Date: Thu, 09 Oct 2014 16:36:56 +0000
> Authorization: AWS 24ebedc0e10f400
> x-amz-copy-source: container1/openrc
> Content-Length:131
>
< HTTP/1.1 500 Internal Server Error
< x-amz-id-2: tx0ff450cf4ea84
< x-amz-request-id: tx0ff450cf4ea84
< Content-Type: text/xml
< X-Trans-Id: tx0ff450cf4ea84
< Date: Thu, 09 Oct 2014 16:36:56 GMT
< Transfer-Encoding: chunked
<
<?xml version='1.0' encoding='UTF-8'?>
* Connection #0 to host 9.18.76.57 left intact
<Error>
--Swift constraint.py from 165 to167 line of code indicates Content-length should be 0:
if 'X-Copy-From' in req.headers and req.content_length:
return HTTPBadRequest(
--For this reason the alternative requests form would be:
./s3curl.pl --id personal_ks --copySrc=
./s3curl.pl --id personal_ks -- -X PUT -H 'x-amz-
--But it would be expected that the requirement of Content-Length could be handled by the s3curl script.
Hi, ariday. We've already no longer used s3curl for the functional tests so I guess we can close this issue. Is that ok for you?