mattetti/BubbleWrap — pull request #16 by noahhl (2012-05-10 11:21:38+00:00)
Title: Allow Authorization header to be set specifically

In https://github.com/mattetti/BubbleWrap/pull/13, the credentials option was added to the Authorization header. This tramples on any other use of the `Authorization` header, such as a token for an Oauth2 implementation.

Immediately after setting the header in `new_request`, the original request object has it's explicit headers re-applied, but the actual request is made with `new_request`, so that has no effect. The result of this is that the specified Authorization header is ignored.

This pull request re-applies the header fields to the `new_request` object, which should fix this issue.