PATCH: Capitalized Bucket Names

May 15, 2009 at 11:22 AM

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

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;