boto/boto — pull request #594 by fejta (2012-02-22 22:00:16+00:00)
Title: Include path in resumable upload request

If we start a resumable upload request:
POST /music.mp3 HTTP/1.1
Host: example.commondatastorage.googleapis.com
x-goog-resumable: start

We receive the following respose:
HTTP/1.1 201 Created
Location: https://example.commondatastorage.googleapis.com/music.mp3?upload_id=tvA0ExBntDa...gAAEnB2Uowrot

We should then start the upload with the following request:
PUT /music.mp3?upload_id=tvA0ExBntDa...gAAEnB2Uowrot HTTP/1.1
Host: example.commondatastorage.googleapis.com

However, boto throws away the path of the location uri and replaces it with the netloc and a slash, resulting in:

PUT /example.commondatastorage.googleapis.com/?upload_id=tvA0ExBntDa...gAAEnB2Uowrot HTTP/1.1
Host: example.commondatastorage.googleapis.com

Ran the following tests:
python -m s3.test_resumable_uploads
gsutil -D foo gs://bucket # Verify path is in PUT request.