recurly/recurly-client-ruby — pull request #65 by kastiglione (2012-04-18 16:55:27+00:00)
Title: Remove headers with nil values

The change I previously contributed, #62, contains a bug.

In allowing clients to specify HTTP request headers, it allows header values to be set to `nil`. This was discovered because `Recurly::Railtie` sets the `Accept-Language` header to `request.env['HTTP_ACCEPT_LANGUAGE']`, but in a test environment this value is `nil` and causes an exception later within `Net::HTTP`.

This fix cleans the headers hash just prior to passing it to `Net::HTTP`.