Project

General

Profile

Actions

Bug #6449

closed

Initiating multipart upload fails with no Content-Length header being set

Added by Tobias F over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

It seems that some internal verification routine requires the "Content-Length" header being set for the "Initiate Multipart Upload" [ http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html ], while from the API, this is not required.

This is problematic, since the official Java client from the Amazon SDK actively removes this header even if it is set to "0" explicitly, see https://github.com/aws/aws-sdk-java/blob/master/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java , lines 2260ff:

// Be careful that we don't send the object's total size as the content
// length for the InitiateMultipartUpload request.
request.getHeaders().remove(Headers.CONTENT_LENGTH);

This currently leads to the following response:

>>

POST /bucket/891299b6e0a14522a0b2c766d3c798ee?uploads HTTP/1.1
Host: radosgw.example.com
Authorization: AWS [...]
Date: Tue, 01 Oct 2013 10:33:27 GMT
User-Agent: aws-sdk-java/1.5.8 Windows_7/6.1 Java_HotSpot(TM)_64-Bit_Server_VM/20.0-b11
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-Alive

<<

HTTP/1.1 411 Length Required
Date: Tue, 01 Oct 2013 10:33:41 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 239
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<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>

Actions #1

Updated by Ian Colle over 10 years ago

  • Assignee set to Yehuda Sadeh
  • Priority changed from Normal to High
Actions #2

Updated by Sage Weil over 10 years ago

  • Project changed from Ceph to rgw
Actions #3

Updated by Yehuda Sadeh over 10 years ago

Hmm, looking at it now, we don't test for content length existence as the request itself doesn't have any input data. From what I can tell you're running the wrong fastcgi module and getting that response directly from apache (because of the chunked encoding).

Actions #4

Updated by Yehuda Sadeh over 10 years ago

This should work with the modified fastcgi module. The error is being sent directly from apache, as the vanilla module doesn't support chunked data.

Actions #5

Updated by Yehuda Sadeh over 10 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF