100 Continue behaviour is not correct
Hi,
I would like to report a problem with Boto, as it seems that it is not implementing correctly the 100-Continue HTTP protocol. In particular, this is what I get on the wire (with wireshark) when I attemp to create a given object in a bucket:
PUT /anarcardo.bucket5/examples/prueba3 HTTP/1.1
Host: s3.amazonaws.com
Accept-Encoding: identity
Content-Length: 20
Content-MD5: 9Os31TZ1KGziiXV7Zp9p3Q==
Expect: 100-Continue
Date: Thu, 21 Jun 2012 16:27:33 GMT
User-Agent: Boto/2.5.1 (linux2)
Content-Type: text/plain
Authorization: AWS AKIAJZ77MCZLJV2GR7XQ:X2eBTLMfADR4daPlYYOu+2sJegE=
Contenido de pruebaHTTP/1.1 100 ContinueHTTP/1.1 200 OK
x-amz-id-2: iXt2TQrQFJGrE5TklW2XDwKgEFl34oHcdhm0DvOeMHbipBvXLyKXgSTBGBAg7v3C
x-amz-request-id: 9C2353D5A7D138B3
Date: Thu, 21 Jun 2012 16:27:35 GMT
ETag: "f4eb37d53675286ce289757b669f69dd"
Content-Length: 0
Server: AmazonS3In summary, although Boto is including the "Expect: 100-Continue" header in the request, it is not honoring it, as it is starting to send the content of the request (i.e. the 20-bytes string "Contenido de prueba") before it receives the "HTTP/1.1 100 Continue" from the server. I have done tests also with large objects (around 4 MBytes) and the behaviour is the same.
I'm using Boto 2.5.1, creating the connection in the following way:
calling_format=boto.s3.connection.OrdinaryCallingFormat()
conn = S3Connection(is_secure=False, path = "/", calling_format=calling_format)and the object in the following way ('bucket' is a given bucket, obtained using the above conn):
key = bucket.new_key('examples/prueba3')
key.set_contents_from_filename('/boot/vmlinuz-2.6.32-220.el6.x86_64')I'm not sure if this is actually a bug in Boto or I'm missing something in the API (e.g. using a given parameter in some of the methods). Any help or information related with this problem is highly welcome, please.
Thanks!
Best regards,
Fermín
Source: boto/boto