Add missing Content-MD5 header to the POST Object Restore request #2068

wants to merge 1 commit into

2 participants


I tried to write a unit test for this change but unfortunately AWS takes an indefinite amount of time to transition objects to glacier even when you set 0 days which makes automating a restore test case difficult.

I tested this manually though and sniffed the request/response to show its setting the header now and that AWS accepted the request. Note: I modified the Authorization header when I pasted it below.

POST /meta?restore HTTP/1.1.
Accept-Encoding: identity.
Date: Mon, 03 Feb 2014 02:29:34 GMT.
Content-Length: 155.
User-Agent: Boto/2.23.0 Python/2.7.3 Linux/3.9.10-100.fc17.x86_64.
Authorization: AWS BLAH:BLAH.
Content-MD5: 52ovPBx7I1yaJo86KXcVdQ==.
<?xml version="1.0" encoding="UTF-8"?>
      <RestoreRequest xmlns="">
T -> [A]
T -> [AP]
HTTP/1.1 202 Accepted.
x-amz-id-2: Tr0my0QQoMKf3Ru7pym0b+8mtHQIBR5ZqOuiugYh+5dEl4SzQriEIlRKk1N+JGEc.
x-amz-request-id: 9460B322F2BFCF8C.
Date: Mon, 03 Feb 2014 02:29:35 GMT.
Content-Length: 0.
Server: AmazonS3.

Hi @danielgtaylor, Anything I need to do to get this pull request in. I saw that you labelled it. We've been using it for over a year now in a branch that I maintain and its working well. If you want it rebased against a latest develop branch I can do that.


Does the label 'Needs repro' mean I need to do something? Sorry can't think what repro could mean right now. Probably obvious in retrospect... Bracing...


I rebased this against the latest develop branch just in case. Let me know if you need anything else. As mentioned earlier it's a hard one to write a unit test for because of the long time involved.


@jamesls - This still looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment