PATCH: Capitalized Bucket Names

May 15, 2009 at 12:22 PM

In reference to this issue, where Amazon does a .tolower() on bucketnames in CallingFormat.SUBDOMAIN:

http://developer.amazonwebservices.com/connect/thread.jspa?messageID=73932

The current version of your library does not work around that issue. Here's a quick patch to ensure thatCallingFormat.REGULAR is used for any buckets with capitalized names. Without this code, your library will simply throw exceptions when you try to access such buckets.

ThreeSharpQuery.cs, insert at line 333:

if (s3Request.BucketName != null && s3Request.BucketName.ToLower() != s3Request.BucketName)
{
	config.Format = CallingFormat.REGULAR;
}