Bug #7730
closedContent-length should not required for initiate multipart upload
0%
Description
We are using the S3 SDK and I am getting a return from RGW claiming that Content-Length must be set. However, according to the AWS docs and the HTTP spec, Content-Length is not required (only required if a body exists).
http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html
Please see request/response below:
POST /25c8b152-2ae7-42b8-b6c8-7c5b50905a76/d415aa30-5a26-4789-bbfc-c43a9954f5e3-multi-1394837395?uploads HTTP/1.1.
Host: 192.168.1.51.
Authorization: AWS foo:bar
Date: Fri, 14 Mar 2014 22:49:55 GMT.
User-Agent: aws-sdk-java/1.5.0 Linux/2.6.32-431.5.1.el6.x86_64 OpenJDK_64-Bit_Server_VM/24.45-b08.
Content-Type: application/x-www-form-urlencoded; charset=utf-8.
Transfer-Encoding: chunked.
Connection: Keep-Alive.
.
0.
.
#
T 192.168.1.51:80 -> 192.168.1.16:57252 [A]
..
#
T 192.168.1.51:80 > 192.168.1.16:57252 [AP]//IETF//DTD HTML 2.0//EN">
HTTP/1.1 411 Length Required.
Date: Fri, 14 Mar 2014 22:49:55 GMT.
Server: Apache/2.2.15 (CentOS).
Content-Length: 239.
Connection: close.
Content-Type: text/html; charset=iso-8859-1.
.
<!DOCTYPE HTML PUBLIC "
<html><head>
<title>411 Length Required</title>
</head><body>
<h1>Length Required</h1>
<p>A request of the requested method POST requires a valid Content-length.<br />
</p>
</body></html>
Updated by Yehuda Sadeh about 10 years ago
I'm not sure we actually require it. You're not using the modified fastcgi module and therefore chunked encoding is not enabled.
Updated by Neil Soman about 10 years ago
I grabbed and compiled the patched version of FastCGI as a DSO from here:
https://github.com/ceph/mod_fastcgi.git
Past the initiate multipart issue.
Thanks!