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.
Date: Mon, 03 Feb 2014 02:29:34 GMT.
User-Agent: Boto/2.23.0 Python/2.7.3 Linux/3.9.10-100.fc17.x86_64.
Authorization: AWS BLAH:BLAH.
<?xml version="1.0" encoding="UTF-8"?>
T 188.8.131.52:80 -> 10.181.164.198:49398 [A]
T 184.108.40.206:80 -> 10.181.164.198:49398 [AP]
HTTP/1.1 202 Accepted.
Date: Mon, 03 Feb 2014 02:29:35 GMT.
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...
Add missing Content-MD5 header to the POST Object Restore request
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.