boto/botocore — pull request #379 by jamesls (2014-11-17 22:12:53+00:00)
Title: Fix auth error when resigning requests

More fallout from reusing the same request object to resign
a request. Before setting a value for a header, we need to first
check if the key exists and delete it first, otherwise it's an
append, not a replace, which will cause signing errors.

Though not strictly required for some signers, I think it's important
to be consistent and just state that before setting a header value,
we should delete it first if it exists.

Couple of other things I noticed:

* Clients aren't plumbed into retry logic. I moved the event registration
over to service-data-loaded in the hopes that we can make this accessible
to the client interface
* To ensure we can retry as expected I've updated our smoke test with a new
suite of tests. These tests mock out the HTTPAdapter such that the first
attempt to send the request always triggers a ConnectionError (the second
attempt calls the original send() method). This ensures we are retrying
requests properly for all the services in the smoke tests.

cc @kyleknap @danielgtaylor