basho/riak_cs — pull request #587 by kellymclaughlin (2013-06-10 21:00:57+00:00)
Title: Can't do multi-part uploads with query string authentication

When multi-part uploads and query string authentication are used together, Riak CS raises several different exceptions.

I want to upload some files with an AJAX client. To this end, I need to apply the multi-part upload and the query string authentication. However, I met some problems.

The first issue is the lack of CORS support. I fixed that by setting up nginx to reply to `OPTIONS` requests with the correct headers.

After that, when uploading with the `PUT` method, Riak CS replies with a 405 (Method not allowed) HTTP code with no additional message.
If I use the `POST` method, I get a 403 (Forbidden) HTTP code and "Access Denied" in the XML response.

I tried with both URL formats:
- /bucket/key?Signature=X&Expires=X&AWSAccessKeyId=X&uploadId=X&partNumber=X
- /bucket/key/uploads/uploadId?Signature=X&Expires=X&AWSAccessKeyId=X&partNumber=X

My script works well on Amazon S3 (with the first URL format) but fails on Riak CS 1.3.1 on Debian 64-bits.